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

java.lang.Object
  |
  +--com.ibm.itim.dataservices.model.domain.PersonRole
All Implemented Interfaces:
Relationship

public class PersonRole
extends java.lang.Object
implements Relationship

The PersonRole class implements the role relationship to a PersonEntity. The subject of this relationship is a PersonEntity and the participants are 0 to many RoleEntities that the subject is a member of.


Constructor Summary
PersonRole()
           
 
Method Summary
 boolean doesParticipate(DirectoryObjectEntity participant)
          Determines if the given entity is a role of the subject person.
 java.util.Collection evaluate()
          Evaluates the relationship returning 0 or one RoleEntity objects that the subject is a member of.
 java.util.Collection evaluateReferences()
          Evaluates the relationship returning 0 to many entity DNs that participate opposite the subject entity.
 void setSubject(DirectoryObjectEntity entity)
          Sets the subject entity for the relationship.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonRole

public PersonRole()
Method Detail

setSubject

public void setSubject(DirectoryObjectEntity entity)
Sets the subject entity for the relationship.

Specified by:
setSubject in interface Relationship
Parameters:
entity - DirectoryObjectEntity acting as the subject of this relationship. This parameter must be a PersonEntity.

evaluate

public java.util.Collection evaluate()
                              throws ModelIntegrityException,
                                     ModelCommunicationException
Evaluates the relationship returning 0 or one RoleEntity objects that the subject is a member of.

Specified by:
evaluate in interface Relationship
Returns:
Collection of 0 or one RoleEntity objects.
Throws:
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the relationship from being evaluated properly.
ModelCommunicationException - Thrown if unable to communicate with the data store.

evaluateReferences

public java.util.Collection evaluateReferences()
                                        throws ModelIntegrityException,
                                               ModelCommunicationException
Evaluates the relationship returning 0 to many entity DNs that participate opposite the subject entity.

Specified by:
evaluateReferences in interface Relationship
Returns:
Collection of DistinguishedName instances that participate.
Throws:
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the relationship from being evaluated properly.
ModelCommunicationException - Thrown if unable to communicate with the data store.

doesParticipate

public boolean doesParticipate(DirectoryObjectEntity participant)
                        throws ModelIntegrityException,
                               ModelCommunicationException
Determines if the given entity is a role of the subject person. The given entity must be a RoleEntity to even be considered as the subject's role.

Specified by:
doesParticipate in interface Relationship
Parameters:
participant - Proposed role (RoleEntity).
Returns:
True if participant is a role of the subject, false if not.
Throws:
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the relationship from being evaluated properly.
ModelCommunicationException - Thrown if unable to communicate with the data store.


IBM Tivoli Identity Manager 4.6
© Copyright International Business Machines Corporation 2005. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.