|
Java SDK r12.5 SP 8 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttributeCollection
Allows a custom object to access managed object attributes through the methods inherited from this interface.
This interface includes methods that restrict access to attributes according to the permissions, if any, in the managed object.AttributeCollection
, an attribute can have one
of three kinds of values:AttributeCollection
was created. An AttributeCollection
is created when an instance of a managed object is created.
set...
methods in this AttributeCollection
.
AttributeCollection
, any changes you make to the attributes
are committed to the data store as follows:modifyObject()
,
if the managed object is accessed through
ProviderAccessor
.
get...
method
of BLTHContext
.
EventContext
, and the event in
EventContext
is one of the
events that is successfully executed.
AttributeCollection
when accessing a managed object
through a tab handler.
ManagedObject
and the section
Managed Objects in the Guide.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Method Summary | |
---|---|
void |
addAttributes(AttributeRightsCollection attrRequests)
Adds the specified attributes to this attribute collection and fetches their values into the object. |
void |
addValueToAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
Adds a value to the specified multi-value attribute. |
boolean |
containsAttribute(java.lang.String name)
Determines whether the current managed object instance contains the specified attribute. |
boolean |
doesAttributeHaveMultipleValues(java.lang.String attributeName)
Determines whether two or more values have been assigned to the specified attribute. |
java.util.Vector |
enumerateAttributes()
Retrieves the names of all the attributes that are present in this instance of the managed object. |
java.lang.String |
getAttribute(java.lang.String attributeName)
Retrieves the current value of the specified attribute. |
java.util.Vector |
getAttributeMultiValue(java.lang.String attributeName)
Retrieves the current values of the specified multi-value attribute. |
PermissionType |
getAttributePermission(java.lang.String attributeName)
Retrieves the current permission of the specified attribute. |
java.util.Hashtable |
getAttributes()
Deprecated. Deprecated in IdentityMinder 6.0. Use of this method is strongly discouraged. Use an attribute retrieval method such as getAttribute() or
getAttributeMultiValue() . |
ExtendedAttribute |
getExtendedAttribute(java.lang.String attributeName)
Get the underlying ExtendedAttribute object for an extended attribute. |
java.lang.String |
getLastCommittedAttribute(java.lang.String attributeName)
Retrieves the value of the specified attribute as it existed when the managed object was last committed to the data store. |
java.util.Vector |
getLastCommittedAttributeMultiValue(java.lang.String attributeName)
Retrieves the values of the specified multi-value attribute as they existed when the managed object was last committed to the data store. |
java.lang.Object |
getLastCommittedValue(java.lang.String attributeName)
Get the last committed value of an attribute. |
java.lang.String |
getOriginalAttribute(java.lang.String attributeName)
Retrieves the original value of the specified attribute. |
java.util.Vector |
getOriginalAttributeMultiValue(java.lang.String attributeName)
Retrieves the original values of the specified multi-value attribute. |
java.lang.Object |
getOriginalValue(java.lang.String attributeName)
Get the original value of an attribute. |
java.lang.Object |
getValue(java.lang.String attributeName)
Get the current value of an attribute. |
boolean |
hasAttributeChanged(java.lang.String attributeName)
Determines whether the current value of the specified attribute has changed from the original value when the instance of this managed object was created. |
boolean |
isAttributeUncommitted(java.lang.String attributeName)
Determines whether the current value of the specified attribute is different from the value last committed to the data store. |
boolean |
isUncommitted()
Determines whether any attribute in the collection is uncommitted. |
void |
makeCurrentValueOriginal(java.lang.String attributeName)
Takes the current value of the attribute and makes it the original value. |
void |
removeAttributes(java.util.Vector attrNames)
Removes the specified attributes from this attribute collection. |
void |
setAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
Updates the current value of the specified attribute. |
void |
setAttributeMultiValue(java.lang.String attributeName,
java.util.Vector values)
Sets the current values of the specified multi-value attribute. |
void |
setAttributes(java.util.Hashtable attributes)
Deprecated. Deprecated in IdentityMinder 6.0. Use of this method is strongly discouraged. Use a method such as setAttribute() or
setAttributeMultiValue() to
assign values to attributes. |
void |
setValue(java.lang.String attributeName,
java.lang.Object value)
Set the current value of an attribute. |
void |
updateAttributeSet(AttributeRightsCollection attrRequests)
Updates the attributes in this attribute collection with the attributes specified in attrRequests . |
Methods inherited from interface com.netegrity.llsdk6.imsapi.abstractinterface.ModifiableObject |
---|
modifyObject, modifyObject |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Method Detail |
---|
boolean containsAttribute(java.lang.String name)
Determines whether the current managed object instance contains the specified attribute.
This method is useful to call before attempting to retrieve an attribute with a method such asgetAttribute()
or
getAttributeMultiValue()
.
If containsAttribute()
returns
true
, your subsequent attempt
to retrieve the attribute will not throw AttributeNotPresentException
.
name
- The name of the attribute to check.
true
if the attribute exists, or false
otherwise.boolean doesAttributeHaveMultipleValues(java.lang.String attributeName) throws SmApiException
Determines whether two or more values have been assigned to the specified attribute.
If the specified attribute is not included in the managed object instance, an exception is thrown.
attributeName
- The name of the attribute.
true
if two or more values are currently assigned
to the attribute, or false
otherwise.
com.netegrity.llsdk6.imsapi.exception.DeletedObjectException
- This AttributeCollection
represents an object that can be deleted and that has already been deleted.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
SmApiException
java.util.Hashtable getAttributes()
getAttribute()
or
getAttributeMultiValue()
.
Retrieves the current attributes of the managed object, as set through
this AttributeCollection
.
java.util.Vector enumerateAttributes()
Retrieves the names of all the attributes that are present in this instance of the managed object.
void setAttributes(java.util.Hashtable attributes)
setAttribute()
or
setAttributeMultiValue()
to
assign values to attributes.
Updates the current values of the specified attributes. Only the attributes specified in
the attributes
parameter are updated.
modifyObject()
. The changes are then immediately persisted to the data store. No Identity Manager
events are generated, and no workflow approvals, auditing, or security checks are performed.
attributes
- The attributes being set. Values of attributes unspecified in this
parameter are unchanged.
com.netegrity.llsdk6.imsapi.exception.DeletedObjectException
- This AttributeCollection
represents an object that can be deleted and that has already been deleted.void setAttribute(java.lang.String attributeName, java.lang.Object attributeValue) throws SmApiException
Updates the current value of the specified attribute.
For this method to succeed, both of the following conditions must be met:AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown.
modifyObject()
. The changes are then immediately persisted to the data store. No Identity Manager
events are generated, and no workflow approvals, auditing, or security checks are performed.
attributeName
- The name of the attribute to update.attributeValue
- The value to set for the attribute.
com.netegrity.llsdk6.imsapi.exception.DeletedObjectException
- This AttributeCollection
represents an object that can be deleted and that has already been deleted.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to set an attribute you have no write rights to.
com.netegrity.llsdk6.imsapi.exception.AttributeTypeException
- Attempt to set an attribute with the wrong type data.
SmApiException
void addValueToAttribute(java.lang.String attributeName, java.lang.Object attributeValue) throws SmApiException
Adds a value to the specified multi-value attribute. If the attribute is a single-value attribute, Identity Manager converts it to a multi-value attribute.
For this method to succeed, both of the following conditions must be met:AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown.
modifyObject()
. The changes are then immediately persisted to the data store. No Identity Manager
events are generated, and no workflow approvals, auditing, or security checks are performed.
attributeName
- The name of the attribute to update.attributeValue
- The value to add to the attribute.
com.netegrity.llsdk6.imsapi.exception.DeletedObjectException
- This AttributeCollection
represents an object that can be deleted and that has already been deleted.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to set an attribute you have no write rights to.
com.netegrity.llsdk6.imsapi.exception.AttributeTypeException
- Attempt to set an attribute with the wrong type data.
SmApiException
java.lang.String getAttribute(java.lang.String attributeName) throws SmApiException
Retrieves the current value of the specified attribute.
For this method to succeed, both of the following conditions must be met:AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown, and the
attribute's value is not retrieved.
attributeName
- The name of the attribute to retrieve.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to read an attribute you have no read rights to.
SmApiException
java.util.Vector getAttributeMultiValue(java.lang.String attributeName) throws SmApiException
Retrieves the current values of the specified multi-value attribute.
For this method to succeed, both of the following conditions must be met:AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown, and the
attribute's values are not retrieved.
attributeName
- The name of the attribute to retrieve.
com.netegrity.llsdk6.imsapi.exception.DeletedObjectException
- This AttributeCollection
represents an object that can be deleted and that has already been deleted.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to read an attribute you have no read rights to.
SmApiException
void setAttributeMultiValue(java.lang.String attributeName, java.util.Vector values) throws SmApiException
Sets the current values of the specified multi-value attribute.
For this method to succeed, both of the following conditions must be met:AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown.
modifyObject()
. The changes are then immediately persisted to the data store. No Identity Manager
events are generated, and no workflow approvals, auditing, or security checks are performed.
attributeName
- The name of the attribute to update.values
- A Vector strings to set for the attribute.
com.netegrity.llsdk6.imsapi.exception.DeletedObjectException
- This AttributeCollection
represents an object that can be deleted and that has already been deleted.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to set an attribute you have no write rights to.
com.netegrity.llsdk6.imsapi.exception.AttributeTypeException
- Attempt to set an attribute with the wrong type data.
SmApiException
java.lang.String getOriginalAttribute(java.lang.String attributeName) throws SmApiException
Retrieves the original value of the specified attribute. The value retrieved is the value that was set for the attribute when the instance of the managed object was created.
For this method to succeed, both of the following conditions must be met:AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown, and the
attribute's original value is not retrieved.
attributeName
- The name of the attribute to retrieve.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to read an attribute you have no read rights to.
SmApiException
java.util.Vector getOriginalAttributeMultiValue(java.lang.String attributeName) throws SmApiException
Retrieves the original values of the specified multi-value attribute. The values retrieved are the values that were set for the attribute when the instance of the managed object was created.
For this method to succeed, both of the following conditions must be met:AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown, and the
attribute's original values are not retrieved.
attributeName
- The name of the multi-value attribute to retrieve.
com.netegrity.llsdk6.imsapi.exception.DeletedObjectException
- This AttributeCollection
represents an object that can be deleted and that has already been deleted.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to read an attribute you have no read rights to.
SmApiException
java.lang.String getLastCommittedAttribute(java.lang.String attributeName) throws SmApiException
AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown, and the
attribute's last-committed value is not retrieved.
attributeName
- The name of the attribute to retrieve.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to read an attribute you have no read rights to.
SmApiException
java.util.Vector getLastCommittedAttributeMultiValue(java.lang.String attributeName) throws SmApiException
Retrieves the values of the specified multi-value attribute as they existed when the managed object was last committed to the data store.
For this method to succeed, both of the following conditions must be met:AttributeNotPresentException
is thrown.
AttributePermissionException
is thrown, and the
attribute's last-committed values are not retrieved.
attributeName
- The name of the attribute to retrieve.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
com.netegrity.llsdk6.imsapi.exception.AttributePermissionException
- Attempt to read an attribute you have no read rights to.
SmApiException
boolean hasAttributeChanged(java.lang.String attributeName) throws SmApiException
Determines whether the current value of the specified attribute has changed from the original value when the instance of this managed object was created.
If the specified attribute is not included in the managed object instance, an exception is thrown.
attributeName
- The name of the attribute to check.
true
if the value has changed, or false
otherwise.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
SmApiException
boolean isAttributeUncommitted(java.lang.String attributeName) throws SmApiException
Determines whether the current value of the specified attribute is different from the value last committed to the data store.
If the specified attribute is not included in the managed object instance, an exception is thrown. This method does not consider any permissions that might be stored in the managed object instance for the specified attribute. The method will succeed as long as the instance contains the attribute.
attributeName
- The name of the attribute to check.
true
if the value has not been committed, or false
otherwise.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
SmApiException
PermissionType getAttributePermission(java.lang.String attributeName) throws SmApiException
attributeName
- The name of the attribute.
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- This AttributeCollection
does not contain a "slot" for attributeName
. For example, if a User
was created without requesting User.PROPERTY_FRIENDLY_NAME
, you cannot call User.setAttribute(User.PROPERTY_FRIENDLY_NAME, object)
.
SmApiException
void removeAttributes(java.util.Vector attrNames)
Removes the specified attributes from this attribute collection.
If any specified attributes are not present in the instance, the method ignores these attributes and still succeeds. Any uncommitted changes in the values of these attributes will be lost.
attrNames
- A Vector of Strings containing the names of the attributes
to remove.void addAttributes(AttributeRightsCollection attrRequests) throws SmApiException
Adds the specified attributes to this attribute collection and fetches their values into the object.
If any specified attributes are already present in the instance, the method updates the associated permissions with the maximum of the previous and new permissions. The attribute values themselves are not changed.
attrRequests
- A Vector of objects containing attribute names
and their associated permissions.
SmApiException
void updateAttributeSet(AttributeRightsCollection attrRequests) throws SmApiException
Updates the attributes in this attribute collection with the
attributes specified in attrRequests
.
attrRequests
already exist in the instance, the original, last committed, and
current values of the existing attributes remain in place. However,
the permissions associated with the existing attributes may change,
depending on the corresponding permission requests in AttributeRight
.
attrRequests
,
are lost, along with all information on the original, last committed,
and current values.
attrRequests
, have their values
and associated permissions fetched into the instance of the object.
AttributeCollection
was instantiated.
attrRequests
- A collection of AttributeRight
objects.
SmApiException
void makeCurrentValueOriginal(java.lang.String attributeName) throws SmApiException
attributeName
-
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- if the attribute is not there
SmApiException
java.lang.Object getValue(java.lang.String attributeName) throws SmApiException
attributeName
-
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- if the attribute is not there
SmApiException
java.lang.Object getLastCommittedValue(java.lang.String attributeName) throws SmApiException
attributeName
-
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- if the attribute is not there
SmApiException
java.lang.Object getOriginalValue(java.lang.String attributeName) throws SmApiException
attributeName
-
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- if the attribute is not there
SmApiException
void setValue(java.lang.String attributeName, java.lang.Object value) throws SmApiException
attributeName
-
com.netegrity.llsdk6.imsapi.exception.AttributeNotPresentException
- if the attribute is not there
SmApiException
ExtendedAttribute getExtendedAttribute(java.lang.String attributeName) throws SmApiException
attributeName
-
SmApiException
boolean isUncommitted()
Determines whether any attribute in the collection is uncommitted.
true
if there are any uncommitted attributes, or false
otherwise.
|
Java SDK r12.5 SP 8 06/13/2011 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |