com.ibm.pim.attribute
Interface ExtendedAttributeOwner

All Superinterfaces:
AttributeOwner
All Known Subinterfaces:
CollaborationItem, Item

public interface ExtendedAttributeOwner
extends AttributeOwner


Field Summary
 
Fields inherited from interface com.ibm.pim.attribute.AttributeOwner
copyright
 
Method Summary
 void executeNonPersistedScript()
          Execute non-persisted script for all attributes in the item to populate their values.
 ExtendedAttributeChanges getAttributeChangesComparedTo(ExtendedAttributeOwner otherAttributeOwner)
          Identify Attribute Changes between this and another AttributeOwner.
 ExtendedAttributeChanges getAttributeChangesSinceLastSave()
          Identify Attribute Changes since the last time the AttributeOwner was saved.
 PIMCollection<Category> getAvailableLocations(Category location)
          Returns the locations this item is available in from the set of locations given by the passed in location and its descendants.
 LocationAttributeInstance getLocationAttributeInstance(Category location, java.lang.String attributeInstancePath)
          Retrieve the attribute instance at the specified path
 java.lang.Object getLocationAttributeValue(Category location, java.lang.String attributeInstancePath)
          Retrieve the attribute value at the specified path for this entry at this location.
 PIMCollection<Category> getLocationsHavingData(Category location)
          Identifies the locations this item has location specific data for from the set of locations given by the passed in location and its descendants.
 LocationAttributeInstance getRootLocationAttributeInstance(Category location)
          Retrieve the root attribute instance at the specified location.
 boolean isAvailableInLocation(Category location)
          Determines if the item is available in the given location.
 void makeAvailableInLocation(Category location)
          Make this item available at the given location.
 void makeAvailableInLocationRecursively(Category location)
          Make this item available in given location and all its descendant locations.
 void makeUnavailableInLocation(Category location)
          This will make the item unavailable in the given location.
 void makeUnavailableInLocationRecursively(Category location)
          This will make the item unavailable in the given location and all its descendant locations.
 void setLocationAttributeValue(Category location, java.lang.String attributePath, java.lang.Object value)
          This will set an attribute value on this AttributeOwner at the specified Attribute Instance Path on the location.
 
Methods inherited from interface com.ibm.pim.attribute.AttributeOwner
getAttributeChangesComparedTo, getAttributeInstance, getAttributeValue, getRootAttributeInstance, getRootAttributeInstances, getSpecs, isComparable, setAttributeValue
 

Method Detail

isAvailableInLocation

boolean isAvailableInLocation(Category location)
Determines if the item is available in the given location. Available means that the item can store data specific to this location

Parameters:
location - - The Category object representing the location.
Returns:
true if this item is available in this location.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use

makeAvailableInLocation

void makeAvailableInLocation(Category location)
Make this item available at the given location. Available means that the item can store location data for this location

Parameters:
location - - The Category object representing the location.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - If the user does not have the equivalent of Permission.CATALOG_MODIFY_ITEMS

makeAvailableInLocationRecursively

void makeAvailableInLocationRecursively(Category location)
Make this item available in given location and all its descendant locations. Available means that the item can store location data for this location

Parameters:
location - - the Category object representing the location.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - If the user does not have the equivalent of Permission.CATALOG_MODIFY_ITEMS

makeUnavailableInLocation

void makeUnavailableInLocation(Category location)
This will make the item unavailable in the given location. Available means that the item can store location data for this location

Parameters:
location - - The Category object representing the location.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - If the user does not have the equivalent of Permission.CATALOG_MODIFY_ITEMS

makeUnavailableInLocationRecursively

void makeUnavailableInLocationRecursively(Category location)
This will make the item unavailable in the given location and all its descendant locations. Available means that the item can store location data for this location.

Parameters:
location - - The Category object representing the location.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - If the user does not have the equivalent of Permission.CATALOG_MODIFY_ITEMS

getAvailableLocations

PIMCollection<Category> getAvailableLocations(Category location)
Returns the locations this item is available in from the set of locations given by the passed in location and its descendants.

Parameters:
location - - the category object representing a location
Returns:
PIMCollection of Category objects Please note this is a lazily instantiated collection
Throws:
java.lang.IllegalArgumentException - If the location parameter is null
PIMInternalException - if an internal error occurs
PIMAuthorizationException - reserved for future use.
See Also:
for more info

getLocationsHavingData

PIMCollection<Category> getLocationsHavingData(Category location)
Identifies the locations this item has location specific data for from the set of locations given by the passed in location and its descendants.

Please note this is a lazily instantiated collection

Parameters:
location - - The Category object representing a location
Returns:
PIMCollection of Category objects representing locations
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - reserved for future use
See Also:
for more info

getLocationAttributeInstance

LocationAttributeInstance getLocationAttributeInstance(Category location,
                                                       java.lang.String attributeInstancePath)
Retrieve the attribute instance at the specified path

Parameters:
location - The category for this location
attributeInstancePath - - the path to return the instance from This path must be valid (per AttributePathHelper.isValid()) and can be instantiated (per canInstantiateAttributeAt(path), and hasAttributeInstance must return true.
Returns:
the attribute instance at the specified path
Throws:
java.lang.UnsupportedOperationException - If the category is not an available location or the attribute path is invalid
PIMInternalException - If an internal error occurs
java.lang.IllegalArgumentException - If the location or attributeInstancePath parameters is null or empty
PIMAuthorizationException - Reserved for future use

getRootLocationAttributeInstance

LocationAttributeInstance getRootLocationAttributeInstance(Category location)
Retrieve the root attribute instance at the specified location.

This is equivalent to getLocationAttributeInstance("/" + locationSpec.getName()), which returns the attribute instance that corresponds to the top grouping level of the only spec for the location hierarchy.

Parameters:
location - The category for this location
Returns:
the root attribute instance for this location.
Throws:
PIMInternalException - If an internal error occurs
java.lang.IllegalArgumentException - If the location parameter is null or empty

getAttributeChangesComparedTo

ExtendedAttributeChanges getAttributeChangesComparedTo(ExtendedAttributeOwner otherAttributeOwner)
Identify Attribute Changes between this and another AttributeOwner.

Parameters:
otherAttributeOwner - - a previous version of this AttributeOwner to compare with the current attribute values for this version
Returns:
an AttributeChanges object which can be queried to find information about the differences between this item (B) and the previousVersion (A)
Throws:
java.lang.IllegalArgumentException - If the previousVersion parameters is null
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getAttributeChangesSinceLastSave

ExtendedAttributeChanges getAttributeChangesSinceLastSave()
Identify Attribute Changes since the last time the AttributeOwner was saved. This is to find information about the differences between this attribute owner when it was last saved (A) and the current in memory form of this category (B)

Note: This method suggests that save() should be exposed at the attribute owner level.

Specified by:
getAttributeChangesSinceLastSave in interface AttributeOwner
Returns:
an AttributeChanges object
Throws:
PIMInternalException - If an internal error occurs

getLocationAttributeValue

java.lang.Object getLocationAttributeValue(Category location,
                                           java.lang.String attributeInstancePath)
Retrieve the attribute value at the specified path for this entry at this location.

Note, this is slightly more efficient than getting the value from the corresponding attribute instance because this method is much lighter weight. Thus, if a value is needed, prefer getLocationAttributeValue(location, path) over getLocationAttributeInstance(location, path).getValue()

Parameters:
location - The category for this location
attributeInstancePath - - a valid attribute instance path
Returns:
the value of the attribute instance
Throws:
java.lang.IllegalArgumentException - If the attributeInstancePath parameters is null or empty
PIMInternalException - If the category is not an available location, the attribute path is invalid, or an internal error occurs

setLocationAttributeValue

void setLocationAttributeValue(Category location,
                               java.lang.String attributePath,
                               java.lang.Object value)
This will set an attribute value on this AttributeOwner at the specified Attribute Instance Path on the location.

Note, calling setLocationAttributeValue(location, path, value) is more efficient than calling getLocationAttributeInstance(location, path).setValue() because setLocationAttributeValue(location, path) is far lighter.

Parameters:
location - The category for this location
attributePath - - a path at which an attribute instance exists or can be created
value - - the value for the AttributeInstance
Throws:
java.lang.IllegalArgumentException - If the attributeInstancePath parameters is null or empty
PIMInternalException - If the category is not an available location, the attribute path is invalid, the value is invalid, or if an internal error occurs
See Also:
for more details on attribute paths

executeNonPersistedScript

void executeNonPersistedScript()
Execute non-persisted script for all attributes in the item to populate their values.

Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - If the user does not have the equivalent of Permission.CATALOG_MODIFY_ITEMS