com.ibm.itim.dataservices.model.domain
Class RoleEntity

java.lang.Object
  extended by com.ibm.itim.dataservices.model.DirectoryObjectEntity
      extended by com.ibm.itim.dataservices.model.domain.RoleEntity
All Implemented Interfaces:
com.ibm.itim.util.Sortable, java.io.Serializable
Direct Known Subclasses:
DynamicRoleEntity

public class RoleEntity
extends DirectoryObjectEntity

Represents a Role in the data model.

See Also:
Serialized Form

Field Summary
static java.lang.String ORGANIZATION
          Constant (String) for the organization relationship name.
static java.lang.String OWNER
          Constant (String ) for the owner relationship name
 
Fields inherited from class com.ibm.itim.dataservices.model.DirectoryObjectEntity
PARENT
 
Fields inherited from interface com.ibm.itim.util.Sortable
ATTR_NAME
 
Constructor Summary
RoleEntity(DirectoryObject role)
          Constructs a Role with a DirectoryObject.
RoleEntity(Role role)
          Constructs a Role with a value object.
 
Method Summary
 void addMemberRole(RoleEntity memberRoleEntity)
          Adds a member role to this role.
 java.util.Set<RoleAssignmentAttribute> getAllAssignmentAttributes()
          Get all assignment attributes from the current role and all the parent roles.
 java.util.Set<RoleAssignmentAttribute> getAssignmentAttributes()
          Gets the assignment attribute.
 java.util.Collection<RoleEntity> getMemberRoles()
          Returns all immediate member roles of the role.
 java.util.Collection getMembers()
          Returns all members of the role.
 java.util.Collection getMembers(java.util.Collection returnAttributes)
          Returns all members of the role.
 OrganizationEntity getOrganization()
          Returns the organization of the current object.
 java.util.Collection<PersonEntity> getOwner()
          Returns the owner(s) of the role, if any.
 java.util.Collection<DirectoryObjectEntity> getOwnerObjects()
          Returns the owner objects of the role, if any.
 java.util.Collection<RoleEntity> getParentRoles()
          Returns all immediate parent roles of the role.
 boolean isAssignmentAttributeInUse(java.lang.String attributeName)
          Checks to see if any person has the assignment attribute values for the specified assignment.
 void remove()
          Removes the role from the data store.
 void setAssignmentAttributes(java.util.Set<RoleAssignmentAttribute> assignmentAttributes)
          Sets the assignment attributes to the role.
 void update()
          Overwrites base implement to validate object class and include "eraccessitem" class and then Updates the attributes of the entity in the data store.
 void update(DirectoryObject updObject)
          Deprecated. please use update()
 
Methods inherited from class com.ibm.itim.dataservices.model.DirectoryObjectEntity
equals, getDirectoryObject, getDistinguishedName, getEntity, getLifecycle, getObjectCategory, getParent, getParentDN, getProfile, getRelationship, getSortValue, getSupportedRelationships, hashCode, initialize, initialize, isSupportedRelationship, remove, setLifecycle, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ORGANIZATION

public static final java.lang.String ORGANIZATION
Constant (String) for the organization relationship name.

See Also:
Constant Field Values

OWNER

public static final java.lang.String OWNER
Constant (String ) for the owner relationship name

See Also:
Constant Field Values
Constructor Detail

RoleEntity

public RoleEntity(Role role)
Constructs a Role with a value object.

Parameters:
role - Role object holding the attributes of the role.

RoleEntity

public RoleEntity(DirectoryObject role)
Constructs a Role with a DirectoryObject.

Parameters:
role - DirectoryObject holding the attributes of the role.
Method Detail

addMemberRole

public void addMemberRole(RoleEntity memberRoleEntity)
                   throws ModelCommunicationException,
                          ModelIntegrityException
Adds a member role to this role. If the member is already a member then no action will be taken.

Parameters:
memberRoleEntity - The member role to add
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.
Since:
ITIM 5.1

getMembers

public java.util.Collection getMembers()
                                throws ModelCommunicationException,
                                       ModelIntegrityException
Returns all members of the role.

Returns:
Collection of PersonEntities that are members of the role.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.

getMembers

public java.util.Collection getMembers(java.util.Collection returnAttributes)
                                throws ModelCommunicationException,
                                       ModelIntegrityException
Returns all members of the role.

Parameters:
returnAttributes - Collection of attributes contained in the PersonEntity objects returned by this method.
Returns:
Collection of PersonEntities that are members of the role.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.

getMemberRoles

public java.util.Collection<RoleEntity> getMemberRoles()
                                                throws ModelCommunicationException,
                                                       ModelIntegrityException
Returns all immediate member roles of the role.

Returns:
Collection of RoleEntity that are immediate members of the role.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.
Since:
ITIM 5.1

getParentRoles

public java.util.Collection<RoleEntity> getParentRoles()
                                                throws ModelCommunicationException,
                                                       ModelIntegrityException
Returns all immediate parent roles of the role.

Returns:
Collection of RoleEntity that are immediate parents of the role.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.
Since:
ITIM 5.1

getOrganization

public OrganizationEntity getOrganization()
                                   throws ModelCommunicationException,
                                          ModelIntegrityException
Returns the organization of the current object.

Returns:
OrganizationEntity representing the object's organization.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.

update

public void update(DirectoryObject updObject)
            throws ModelCommunicationException,
                   ObjectNotFoundException
Deprecated. please use update()

Overwrites base implement to validate object class and include "eraccessitem" class and then Updates the attributes of the entity in the data store. An DirectoryObject value object is used to obtain the changes that need to be made.

Overrides:
update in class DirectoryObjectEntity
Parameters:
updObject - DirectoryObject that holds the changes.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.
Since:
TIM 5.0

update

public void update()
            throws ModelCommunicationException,
                   ObjectNotFoundException
Overwrites base implement to validate object class and include "eraccessitem" class and then Updates the attributes of the entity in the data store. An DirectoryObject value object is used to obtain the changes that need to be made.

Overrides:
update in class DirectoryObjectEntity
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

getOwner

public java.util.Collection<PersonEntity> getOwner()
                                            throws ModelCommunicationException,
                                                   ModelIntegrityException
Returns the owner(s) of the role, if any.

Returns:
A collection of PersonEntity objects representing the owner(s) of the role. The collection is empty if no owners are defined. If roles are defined as the owner(s), this method returns all members of the roles in addition to people that are defined directly as owners. Role inheritance is considered when computing members. Duplicate owners are included only once.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model, which prevents the evaluation of the relationship.
Since:
5.0

getOwnerObjects

public java.util.Collection<DirectoryObjectEntity> getOwnerObjects()
                                                            throws ModelCommunicationException,
                                                                   ModelIntegrityException
Returns the owner objects of the role, if any. The may be either PersonEntity or RoleEntity objects.

Returns:
DirectoryObjectEntity representing the owner object of the service. The collection is empty if no owner objects are defined.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model, which prevents the evaluation of the relationship.
Since:
5.1

getAssignmentAttributes

public java.util.Set<RoleAssignmentAttribute> getAssignmentAttributes()
                                                               throws ModelCommunicationException,
                                                                      ModelIntegrityException
Gets the assignment attribute.

Returns:
The set of RoleAssignmentAttribute objects that represents role assignment attributes. The empty collection is returned if the role does not have any assignment attribute.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the evaluation of the relationship.
Since:
6.0

setAssignmentAttributes

public void setAssignmentAttributes(java.util.Set<RoleAssignmentAttribute> assignmentAttributes)
                             throws ModelCommunicationException,
                                    ModelIntegrityException
Sets the assignment attributes to the role. This method sets the assignmentAttributes as current assignment attributes. If the empty set is passed as assignment attributes, all the existing assignment attributes are removed.

Parameters:
assignmentAttributes - Set of RoleAssignmentAttribute objects that represents role assignment attributes. Only the name of the RoleAssignmentAttribute is used for this method. The role DN and role name are ignored. If the empty set is passed, then existing assignment attributes are deleted.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the evaluation of the relationship.
Since:
6.0

isAssignmentAttributeInUse

public boolean isAssignmentAttributeInUse(java.lang.String attributeName)
                                   throws ModelCommunicationException,
                                          ModelIntegrityException
Checks to see if any person has the assignment attribute values for the specified assignment.

Parameters:
attributeName - The name of assignment attribute.
Returns:
Returns true if there is any person who has the value for assignment attribute. Returns false otherwise.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the evaluation of the relationship.
Since:
6.0

getAllAssignmentAttributes

public java.util.Set<RoleAssignmentAttribute> getAllAssignmentAttributes()
                                                                  throws ModelCommunicationException,
                                                                         ModelIntegrityException
Get all assignment attributes from the current role and all the parent roles.

Returns:
The set of RoleAssignmentAttribute objects that represents role assignment attributes.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents getting the assignment attributes.
Since:
6.0

remove

public void remove()
            throws ModelCommunicationException,
                   ObjectNotFoundException,
                   ModelRemoveException
Removes the role from the data store. The object is copied to the recycle bin before being deleted.

Overrides:
remove in class DirectoryObjectEntity
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have already been removed by another client.
ModelRemoveException - Thrown if unable to remove an object of the data store.


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.