com.ibm.portal
Interface AggregatedMetaDataLocator

All Superinterfaces:
Locator

public interface AggregatedMetaDataLocator
extends Locator

This interface provides a locator for meta data which is composed of more than one meta data instance. It provides a method to determine if a meta data value is inherited or not. A value is considered inherited if the meta data value for a given name is set on a parent layer of the composed meta data and not on the current layer itself.
Coding example:

     MetaData metaData = ...;
     if (metaData instanceof LocatorProvider) {
         Locator locator = ((LocatorProvider) metaData).getLocator();
         if (locator instanceof AggregatedMetaDataLocator) {
             boolean inherited = ((AggregatedMetaDataLocator) locator).isInherited(aName);
             ...
         } else {
             // no meta data locator available
         }
     } else {
         // no locator available!
     }
 

Since:
6.0
See Also:
LocatorProvider

Method Summary
 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.
 ListModel getValues(java.lang.String aName)
          Returns a list model for the given name of the aggregated meta data.
 boolean isInherited(java.lang.String aName)
          Indicates whether the value corresponding to the given name is inherited or not.
 

Method Detail

isInherited

boolean isInherited(java.lang.String aName)
Indicates whether the value corresponding to the given name is inherited or not.

Parameters:
aName - the name to check, must not be null
Returns:
false if the value is defined on the current layer, true otherwise

getValues

ListModel getValues(java.lang.String aName)
Returns a list model for the given name of the aggregated meta data. The list starts with the value that can be obtained from MetaData.getValue(String) and then continues with the values in the order of the inheritance of the aggregated meta data.

Parameters:
aName - the meta data name
Returns:
a list model of values, never null

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