|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RgyEntity
This Interface provides the common methods for the RgyUser and RgyGroup Interfaces.
Security Access Manager entities are extensions (layered on top) of the underlying registry's User and Group entities. This interface provides access to both layers attributes and IDs. The underlying registry's entity is referred to as the Native entity by this API. When the Security Access Manager extensions are added to the Native entity, the entity is then known as the SAM entity by this API. This Interface can be used for the Native entity or a complete SAM entity.
To detect if the Interface represents a complete SAM entity, a virtual attribute
(one that does not exist in the registry) is provided by the implementation of
this interface to allow determination. See RgyAttributes.IS_SEC_ENTITY_NAME
.
For User entities, almost all the Native entity attributes will be provided (for example, if there is a telephoneNumber attribute associated with the LDAP registry entry (say cn=testuser,o=ibm,c=us), it will be available). For security and integrity purposes, if there is an attribute at the Registry level that has the same name as any available at the SAM level, it will not be returned.
Also for User entities any per-user policy attributes that exists will be returned. This will not include any global policy attributes, though global policy attributes will still have an effect on the user if the corresponding per-user policy attribute does not exist.
Binary attributes are returned as byte[], non-binary as String.
For User entities, "userPassword" is not returned, and can not be updated as an Attribute. There are specific methods in the RgyUser interface for updating "userPassword".
Multiple threads should not access the same instance of this interface at the same time.
Method Summary | |
---|---|
void |
attributeAdd(java.lang.String name,
java.lang.Object value)
Adds an additional value to attribute. |
void |
attributeAdd(java.lang.String name,
java.lang.Object[] values)
Adds an additional values to attribute. |
void |
attributeDelete(java.lang.String name)
Deletes an entity's attribute from the registry. |
void |
attributeDelete(java.lang.String name,
java.lang.Object value)
Deletes a specific attribute/value pair. |
void |
attributeDelete(java.lang.String name,
java.lang.Object[] values)
Deletes the specific attribute values. |
java.util.Iterator<java.lang.String> |
attributeNameIterator()
|
void |
attributeReplace(java.lang.String name,
java.lang.Object value)
Replaces all the values for the specific attribute with the one provided. |
void |
attributeReplace(java.lang.String name,
java.lang.Object[] values)
Replaces all the values for the specific attribute with the ones provided. |
java.lang.Object[] |
getAttributeValues(java.lang.String name)
Returns all of the attribute's values. |
java.lang.String |
getDomain()
Returns the SAM domain this RgyEntity was fetched from. |
java.lang.String |
getId()
Returns the Security Access Manager ID for the entity, for example, "sec_master". |
java.lang.String |
getNativeId()
Returns the registry Native ID for the Entity. |
java.lang.Object |
getOneAttributeValue(java.lang.String name)
Returns one of the attribute's values. |
RgyRegistry |
getRgyRegistry()
Return the RgyRegistry instance that generated this RgyEntity. |
Method Detail |
---|
java.lang.String getId()
java.lang.String getNativeId()
RgyRegistry getRgyRegistry()
java.lang.String getDomain()
java.util.Iterator<java.lang.String> attributeNameIterator()
java.lang.Object getOneAttributeValue(java.lang.String name) throws RgyException
name
- The name of the attribute to fetch the value from.
RgyException
java.lang.Object[] getAttributeValues(java.lang.String name) throws RgyException
name
- The name of the attribute.
RgyException
void attributeDelete(java.lang.String name) throws RgyException
name
- The name of the attribute to delete.
RgyException
void attributeDelete(java.lang.String name, java.lang.Object value) throws RgyException
The underlying JNDI/LDAP registry values may be case-insensitive allowing a different case for the value than is stored in the RgyEntry cache of attributes. To ensure consistency between the cache of attribute values in the RgyEntity and the JNDI/LDAP registry, it is recommended that you pass in values returned from getOneAttributeValue or getAttributeValues to this method to ensure the case matches, thus the cached attribute value is also removed.
name
- The name of the attribute who's value is to be removed.value
- The specific value of the attribute to remove.
RgyException
NoSuchAttributeRgyException
- If the attribute/value pair does
not exist.
ObjectClassViolationRgyException
- if the Registry does not allow
modification of the attribute, or the attribute is a required attribute
that must exist in the Entity.void attributeDelete(java.lang.String name, java.lang.Object[] values) throws RgyException
The underlying JNDI/LDAP registry values may be case-insensitive allowing a different case for the value than is stored in the RgyEntry cache of attributes. To ensure consistency between the cache of attribute values in the RgyEntity and the JNDI/LDAP registry, it is recommended that you pass in values returned from getOneAttributeValue or getAttributeValues to this method to ensure the case matches, thus the cached attribute value is also removed.
name
- The name of the attribute who's value is to be removed.values
- The specific values of the attribute to remove.
RgyException
NoSuchAttributeRgyException
- If the attribute/value pair does
not exist.
ObjectClassViolationRgyException
- if the Registry does not allow
modification of the attribute, or the attribute is a required attribute
that must exist in the Entity.void attributeReplace(java.lang.String name, java.lang.Object value) throws RgyException
name
- The name of the entity attribute to replace.value
- The new value of the attribute.
RgyException
ObjectClassViolationRgyException
- For attributes that this API
does not allow modification to.void attributeReplace(java.lang.String name, java.lang.Object[] values) throws RgyException
name
- The name of the entity attribute to replace.values
- The new value of the attribute.
RgyException
ObjectClassViolationRgyException
- For attributes that this API
does not allow modification to.void attributeAdd(java.lang.String name, java.lang.Object value) throws RgyException
name
- The name of the attribute to add the value to.value
- The value to add to the attribute.
RgyException
ObjectClassViolationRgyException
- For attributes that this API
does not allow modification to.void attributeAdd(java.lang.String name, java.lang.Object[] values) throws RgyException
name
- The name of the attribute to add the value to.values
- The values to add to the attribute. Must be all the same class.
RgyException
ObjectClassViolationRgyException
- For attributes that this API
does not allow modification to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |