CA Identity Manager
Java SDK r12.5 SP 8

 

com.netegrity.llsdk6.imsapi.collections
Class AttributeRightsCollection

java.lang.Object
  extended by com.netegrity.llsdk6.imsapi.collections.AttributeRightsCollection
All Implemented Interfaces:
java.io.Serializable

public class AttributeRightsCollection
extends java.lang.Object
implements java.io.Serializable

Contains AttributeRight objects consisting of an attribute name and an associated permission request.

An instance of AttributeRightsCollection is used as a parameter in many provider methods that retrieve managed objects.

The AttributeRightsCollection parameter lets you specify the attributes (and their associated access permissions) to include in the retrieved managed object, as follows: Calculated Permissions vs. Permission Requests

Many methods that pass in an AttributeRightsCollection object also pass in a TSContext object for the current task. Identity Manager calculates an attribute's permission based on this context information and on the attribute-level permissions defined on the server for all relevant roles (roles that contain the current task and that apply to the current administrator and operation). Identity Manager then determines the applicable permission for each attribute as follows: Example

Create and populate an AttributeRightsCollection object as follows:
     AttributeRightsCollection attributes = new AttributeRightsCollection();
     // add the friendly name attribute
     AttributeRight right1 = new AttributeRight(User.PROPERTY_FRIENDLY_NAME, PermissionType.READONLY);
     attributes.addEntry(right1);
     // add the unique name attribute
     AttributeRight right2 = new AttributeRight(User.PROPERTY_UNIQUE_NAME, PermissionType.READONLY);
     attributes.addEntry(right2);
 

Since:
IdentityMinder 6.0
See Also:
Serialized Form

Constructor Summary
AttributeRightsCollection()
          Creates a new AttributeRightsCollection.
 
Method Summary
 void addAll(AttributeRightsCollection attributeRightsCollection)
          Adds another attribute rights collection to this one
 void addEntry(AttributeRight right)
          Adds a new right to this collection.
 boolean fetchDefaultAttrs()
           
static AttributeRightsCollection getAllAtributeRightsCollection(java.util.Vector attrs)
           
static AttributeRightsCollection getAllAttributeRightsCollection(ImsDirectory dir, ObjectType objectType)
          Get a complete AttributeRightsCollection for specified object type in specified environment
static AttributeRightsCollection getAllAttributeRightsCollection(ImsEnvironment env, ObjectType objectType)
          Get a complete AttributeRightsCollection for specified object type in specified environment
static AttributeRightsCollection getAllAttributeRightsCollection(ImsManagedObjectDefinition managedObjectDefinition)
          Get a complete AttributeRightsCollection for specified object defintion
static AttributeRightsCollection getAttributeRightsCollection(ImsEnvironment env, ObjectType objectType, java.util.Enumeration attribs)
          Get AttributeRightsCollection for the attributes in the enumeration
static AttributeRightsCollection getAttributeRightsCollection(ImsManagedObjectDefinition managedObjectDefinition, java.util.Enumeration attribs)
          Get AttributeRightsCollection for the attributes in the enumeration.
 java.util.Enumeration getAttributes()
          Retrieves the names of the attributes in the collection.
 java.util.Hashtable getCollection()
          Retrieves the collection Hashtable.
 AttributeRight getEntry(java.lang.String attribute)
          Retrieves an attribute right from the collection, specified by attribute name.
 java.util.Hashtable getPermissionCollection()
          Returns the permissions for each attribute.
 void removeEntry(AttributeRight attribute)
          Removes the passed-in attribute right object from the collection.
 void removeEntry(java.lang.String attributeName)
          Removes an attribute right from the collection, specified by attribute name.
 void setAttributeRight(AttributeRight right)
          Adds a new right to this collection.
 void setFetchDefaultAttrs(boolean fetchDefaultAttrs)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeRightsCollection

public AttributeRightsCollection()
Creates a new AttributeRightsCollection.

Method Detail

addEntry

public void addEntry(AttributeRight right)
Adds a new right to this collection. If there is an existing right for this attribute, the new right is merged with the existing right.

Parameters:
right - The attribute right to add.

setAttributeRight

public void setAttributeRight(AttributeRight right)
Adds a new right to this collection. If there is an existing right for this attribute, the new addition replaces it.

Parameters:
right - The attribute right to add.

removeEntry

public void removeEntry(java.lang.String attributeName)
Removes an attribute right from the collection, specified by attribute name. If the specified right doesn't exist in the collection, the method fails silently.

Parameters:
attributeName - The name of the attribute right to remove.

removeEntry

public void removeEntry(AttributeRight attribute)
Removes the passed-in attribute right object from the collection. If the specified right doesn't exist in the collection, the method fails silently.

Parameters:
attribute - The attribute right object to remove.

getEntry

public AttributeRight getEntry(java.lang.String attribute)
Retrieves an attribute right from the collection, specified by attribute name. If the specified right doesn't exist in the collection, null is returned.

Parameters:
attribute - The name of the attribute right to retrieve.
Returns:
An attribute right, or null if the specified attribute name isn't found in any attribute right.

getCollection

public java.util.Hashtable getCollection()
Retrieves the collection Hashtable.

Returns:
The _collection Hashtable.

getPermissionCollection

public java.util.Hashtable getPermissionCollection()
Returns the permissions for each attribute. This is a helper method for populating the permissions on an object.

Returns:
a Hashtable of attributes with their permissions.

getAttributes

public java.util.Enumeration getAttributes()
Retrieves the names of the attributes in the collection.

Returns:
The attribute names.

addAll

public void addAll(AttributeRightsCollection attributeRightsCollection)
Adds another attribute rights collection to this one

Parameters:
attributeRightsCollection - the attribute rights collection to be added to this one

getAllAttributeRightsCollection

public static AttributeRightsCollection getAllAttributeRightsCollection(ImsEnvironment env,
                                                                        ObjectType objectType)
                                                                 throws SmApiException
Get a complete AttributeRightsCollection for specified object type in specified environment

Parameters:
env -
objectType -
Returns:
Throws:
SmApiException

getAllAttributeRightsCollection

public static AttributeRightsCollection getAllAttributeRightsCollection(ImsDirectory dir,
                                                                        ObjectType objectType)
                                                                 throws SmApiException
Get a complete AttributeRightsCollection for specified object type in specified environment

Parameters:
dir -
objectType -
Returns:
Throws:
SmApiException

getAllAttributeRightsCollection

public static AttributeRightsCollection getAllAttributeRightsCollection(ImsManagedObjectDefinition managedObjectDefinition)
                                                                 throws SmApiException
Get a complete AttributeRightsCollection for specified object defintion

Parameters:
managedObjectDefinition -
Returns:
Throws:
SmApiException

getAllAtributeRightsCollection

public static AttributeRightsCollection getAllAtributeRightsCollection(java.util.Vector attrs)

getAttributeRightsCollection

public static AttributeRightsCollection getAttributeRightsCollection(ImsEnvironment env,
                                                                     ObjectType objectType,
                                                                     java.util.Enumeration attribs)
                                                              throws SmApiException
Get AttributeRightsCollection for the attributes in the enumeration

Parameters:
attribs -
Returns:
Throws:
SmApiException

getAttributeRightsCollection

public static AttributeRightsCollection getAttributeRightsCollection(ImsManagedObjectDefinition managedObjectDefinition,
                                                                     java.util.Enumeration attribs)
                                                              throws SmApiException
Get AttributeRightsCollection for the attributes in the enumeration. In some cases (specifically when called from the management interface) an environment will not be available.

Parameters:
managedObjectDefinition -
attribs -
Returns:
Throws:
SmApiException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

fetchDefaultAttrs

public boolean fetchDefaultAttrs()

setFetchDefaultAttrs

public void setFetchDefaultAttrs(boolean fetchDefaultAttrs)

CA Identity Manager
Java SDK r12.5 SP 8

06/13/2011

© 2011 CA Technologies, Inc. All rights reserved.