|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttributeOwner
This is the group of common methods for objects that have Spec Driven attributes.
Field Summary | |
---|---|
static java.lang.String |
copyright
|
Method Summary | |
---|---|
AttributeChanges |
getAttributeChangesComparedTo(AttributeOwner otherAttributeOwner)
Return the difference between this and another AttributeOwner at attribute level. |
AttributeChanges |
getAttributeChangesSinceLastSave()
Return the changes at the attribute level since the last time the attribute owner was saved successfully. |
AttributeInstance |
getAttributeInstance(java.lang.String attributeInstancePath)
Retrieve the attribute instance at the specified path. |
java.lang.Object |
getAttributeValue(java.lang.String attributeInstancePath)
Retrieve the attribute value at the specified path for this item. |
long |
getLastModifiedTimeMillis()
Get the last modified time in milliseconds for the given attribute |
AttributeOwner |
getOriginalAttributeOwner()
Get the original attribute owner |
AttributeInstance |
getRootAttributeInstance(Spec spec)
Return the root attribute instance for the spec. |
java.util.List<AttributeInstance> |
getRootAttributeInstances()
Return all the root attribute instances for all specs, including primary spec, secondary spec, etc. |
java.util.Collection<Spec> |
getSpecs()
Returns all the specs in which this item participates. |
boolean |
isComparable(AttributeOwner owner)
Check if this attribute owner is comparable with the given owner. |
void |
setAttributeValue(java.lang.String attributeInstancePath,
java.lang.Object value)
Set an attribute value on this item at the specified Attribute Path. |
Field Detail |
---|
static final java.lang.String copyright
Method Detail |
---|
java.util.Collection<Spec> getSpecs()
Collection
of Spec
PIMInternalException
- If an internal error occurs.
PIMAuthorizationException
- reserved for future useAttributeInstance getAttributeInstance(java.lang.String attributeInstancePath)
The path should be of the same format as the attribute definition (starting with a "/") and should use the "#" to indicate the occurrence number.
attributeInstancePath
- -
the attribute instance path
java.lang.IllegalArgumentException
- If the attributeInstancePath parameter is null or empty
java.lang.UnsupportedOperationException
- If the attribute path is invalid
PIMInternalException
- If an internal error occurs.
PIMAuthorizationException
- See subclasses for the specific permissionfor more information on
attribute instance paths
java.util.List<AttributeInstance> getRootAttributeInstances()
For each spec, there is one root attribute instance. A root attribute instance is the top level grouping.
PIMInternalException
- If an internal error occurs.
PIMAuthorizationException
- Reserved for future useAttributeInstance getRootAttributeInstance(Spec spec)
This is the top level grouping. Calling getChildren on this method gives the attribute instances that correspond to the first level of the spec, and these instances will be either of type "value" or "multi-occurrence"
Note, this is equivalent to calling getAttributeInstance("/" + theSpec.getName()) and it is possible that this convenience method is not necessary.
spec
-
PIMInternalException
- If an internal error occurs.
PIMAuthorizationException
- Reserved for future useboolean isComparable(AttributeOwner owner)
owner
- an attribute owner
AttributeChanges getAttributeChangesComparedTo(AttributeOwner otherAttributeOwner)
otherAttributeOwner
- - another AttributeOwner to compare with
java.lang.IllegalArgumentException
- If the previousVersion parameters is null
PIMInternalException
- If an internal error occurs.
PIMAuthorizationException
- Reserved for future useAttributeChanges getAttributeChangesSinceLastSave()
java.lang.Object getAttributeValue(java.lang.String attributeInstancePath)
attributeInstancePath
- -
an attribute instance path that is valid & can be
instantiated.
java.lang.IllegalArgumentException
- If the attributeInstancePath parameters is null or empty
java.lang.UnsupportedOperationException
- If the path is invalid
PIMInternalException
- If an internal error occurs
PIMAuthorizationException
- Reserved for future usevoid setAttributeValue(java.lang.String attributeInstancePath, java.lang.Object value)
If an AttributeInstance exists at this path, the value will be overwritten. If an AttributeInstance does not exist at this path, one will be created with the specified value, and returned.
Note that if there is a type conversion exception due to invalid value, that will result in a validation error and the value will not be saved. Validation errors can be obtained using save or validate methods.
attributeInstancePath
- -
a path at which an attribute instance exists or can be createdvalue
- -
the value for the AttributeInstance
java.lang.IllegalArgumentException
- If the attributeInstancePath parameters is null or empty
java.lang.UnsupportedOperationException
- If the path is invalid or cannot be instantiated
PIMInternalException
- If an internal error occurs
PIMAuthorizationException
- If the user does not have the equivalent of
Permission.CATALOG_MODIFY_ITEMS
for more details on attribute paths
AttributeOwner getOriginalAttributeOwner()
PIMInternalException
- If an internal error occurs
PIMAuthorizationException
- Reserved for future uselong getLastModifiedTimeMillis()
PIMInternalException
- If an internal error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |