com.ibm.portal
Interface MetaDataNameLocator

All Superinterfaces:
Locator

public interface MetaDataNameLocator
extends Locator

A locator for the meta data names list model that can be used to determine if a specific key is present. This locator is optionally provided by the list model exposing the meta data names of a meta data object.
Coding example:

     MetaData metaData = ...;
     ListModel namesList = metaData.getNames();
     if (namesList instanceof LocatorProvider) {
         Locator locator = ((LocatorProvider) namesList).getLocator();
         if (locator instanceof MetaDataNameLocator) {
             boolean containsName = ((MetaDataNameLocator) locator).contains(aName);
             ...
         } else {
             // no name locator available
         }
     } else {
         // no locator available!
     }
 

Since:
6.0
See Also:
LocatorProvider

Method Summary
 boolean contains(java.lang.String aName)
          Indicates whether the given name exists in the associated meta data object.
 java.lang.Object findByID(ObjectID anObjectID)
          This operation is not allowed on this locator and will result in a UnsupportedOperationException.
 java.lang.Object findByUniqueName(java.lang.String aName)
          This operation is not allowed on this locator and will result in a UnsupportedOperationException.
 

Method Detail

contains

boolean contains(java.lang.String aName)
Indicates whether the given name exists in the associated meta data object.

Parameters:
aName - the name to check, must not be null
Returns:
true if the name is known, false otherwise

findByID

java.lang.Object findByID(ObjectID anObjectID)
This operation is not allowed on this locator and will result in a UnsupportedOperationException.

Specified by:
findByID in interface Locator
Parameters:
anObjectID - the id of the object to find. Must not be null.
Returns:
this method is not supported and will result in an exception
Throws:
java.lang.UnsupportedOperationException

findByUniqueName

java.lang.Object findByUniqueName(java.lang.String aName)
This operation is not allowed on this locator and will result in a UnsupportedOperationException.

Specified by:
findByUniqueName in interface Locator
Parameters:
aName - the name of the object to find. Must not be null.
Returns:
this method is not supported and will result in an exception
Throws:
java.lang.UnsupportedOperationException