com.ibm.pim.attribute
Interface AttributeCollectionManager

All Superinterfaces:
Manager

public interface AttributeCollectionManager
extends Manager

Manager for the creation and retrieval of AttributeCollections

Since:
6.0.0

Field Summary
 
Fields inherited from interface com.ibm.pim.common.Manager
copyright
 
Method Summary
 AttributeCollection createAttributeCollection(java.lang.String name)
          Creates an empty attribute collection with the specified name.
 AttributeCollection getAttributeCollection(java.lang.String name)
          Retrieves an attribute collection by name
 java.util.Collection<AttributeCollection> getAttributeCollections()
          Gets all AttributeCollections available in the current context.
 java.util.Collection<AttributeCollection> getAttributeCollections(AttributeDefinition attributeDefinition)
          Returns all attribute collections that currently contain the specified AttributeDefinition.
 java.util.Collection<AttributeCollection> getAttributeCollections(Spec spec)
          Gets all attribute collections that currently contain the specified Spec as a dynamic attribute source.
 java.util.Collection<AttributeCollection> getAttributeCollections(java.lang.String attributeDefinitionPath)
          Gets all attribute collections that currently contain the specified AttributeDefinition, as specified by its path.
 
Methods inherited from interface com.ibm.pim.common.Manager
getManagerName
 

Method Detail

getAttributeCollections

java.util.Collection<AttributeCollection> getAttributeCollections()
Gets all AttributeCollections available in the current context.

Returns:
a Collection of AttributeCollections
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - Reserved for future use

createAttributeCollection

AttributeCollection createAttributeCollection(java.lang.String name)
Creates an empty attribute collection with the specified name. Once created, the description and attributes for the collection can be set using methods on the AttributeCollection. Any changes must be saved by calling the AttributeCollection's save() method.

Parameters:
name - the name for the attribute collection
Throws:
java.lang.IllegalArgumentException - if name is null or an empty string
PIMInternalException - if an internal error occurs, or if an attribute collection already exists by this name.
PIMAuthorizationException - Reserved for future use

getAttributeCollections

java.util.Collection<AttributeCollection> getAttributeCollections(AttributeDefinition attributeDefinition)
Returns all attribute collections that currently contain the specified AttributeDefinition. If no attribute collections include the specified AttributeDefinition, an empty Collection will be returned.

Parameters:
attributeDefinition - the attribute definition for which to retrieve attribute collections
Returns:
a Collection of attribute collections which include the specified attribute definition at the current time. If there are none, an empty collection will be returned.
Throws:
java.lang.IllegalArgumentException - if attributeDefinition is null
java.lang.IllegalStateException - if the AttributeCollection has not been saved, or if attributeDefinition belongs to a spec that has not been saved.
PIMInternalException - if an internal error occurs, or the AttributeCollection no longer exists
PIMAuthorizationException - Reserved for future use

getAttributeCollections

java.util.Collection<AttributeCollection> getAttributeCollections(java.lang.String attributeDefinitionPath)
Gets all attribute collections that currently contain the specified AttributeDefinition, as specified by its path. If no attribute collections include the specified AttributeDefinition, an empty Collection will be returned.

Parameters:
attributeDefinitionPath - the path to the attribute to retrieve attribute collections for
Returns:
a Collection of attribute collections which include the specified attribute’s attribute definition at the current time. If there are none, an empty collection will be returned.
Throws:
java.lang.IllegalArgumentException - if attributeDefinition is null or invalid
java.lang.IllegalStateException - if the AttributeCollection has not been saved, or if the identified attributeDefinition belongs to a spec that has not been saved.
PIMInternalException - if an internal error occurs, or the AttributeCollection no longer exists
PIMInvalidPathException - if the attribute definition path is invalid
PIMAuthorizationException - Reserved for future use

getAttributeCollections

java.util.Collection<AttributeCollection> getAttributeCollections(Spec spec)
Gets all attribute collections that currently contain the specified Spec as a dynamic attribute source. Note that this will not include those attribute collections that contain individual references to attribute definitions in the specified Spec. If no attribute collections include the specified Spec as a dynamic attribute source, an empty Collection will be returned.

Parameters:
spec - the spec to retrieve attribute collections for
Returns:
a Collection of attribute collections which include the specified spec as a dynamic attribute source If there are none, an empty collection will be returned.
Throws:
java.lang.IllegalArgumentException - if spec is null
java.lang.IllegalStateException - if the AttributeCollection has not been saved, or if spec that has not been saved.
PIMInternalException - if an internal error occurs, or the AttributeCollection no longer exists
PIMAuthorizationException - Reserved for future use

getAttributeCollection

AttributeCollection getAttributeCollection(java.lang.String name)
Retrieves an attribute collection by name

Parameters:
name - the name of the attribute collection to return
Returns:
the specified attribute collection, or null if no such AttributeCollection exists with this name
Throws:
java.lang.IllegalArgumentException - if name is null
java.lang.IllegalStateException - if the AttributeCollection has not been saved
PIMInternalException - if an internal error occurs, or the AttributeCollection no longer exists
PIMAuthorizationException - Reserved for future use