roles
Interface RoleProtocol

All Known Implementing Classes:
ObjectWithRoles, RoleType

public interface RoleProtocol

This interface defines the behavior for managing roles (i.e., switching roles, checking on role existence, and checking on entity equivalence), which is implemented by classes ObjectWithRoles and RoleType.


Method Summary
 java.util.Enumeration allAs(java.lang.String qualifiedRoleTypeName)
          Returns an enumeration of qualified role objects whose class is the qualified role type with name qualifiedRoleTypeName.
 RoleType as(java.lang.String roleTypeName)
          Returns an (unqualified) role object whose class is the role type with name roleTypeName.
 QualifiedRoleType as(java.lang.String qualifiedRoleTypeName, java.lang.Object qualifyingObj)
          Returns an instance of the qualified role type with name qualifiedRoleTypeName whose qualifier is identical with qualifyingObject.
 boolean existsAs(java.lang.String roleTypeName)
          Examines whether an instance of the role type with name roleTypeName has been registered by the receiver.
 boolean existsAs(java.lang.String qualifiedRoleTypeName, java.lang.Object qualifyingObj)
          Examines whether an instance of the qualified role type with name qualifiedRoleTypeName has been registered by the receiver using qualifier qualifyingObj.
 ObjectWithRoles getRoot()
          Returns the root of the role hierarchy (must be an ObjectWithRoles).
 boolean isEntityEquivalentWith(RoleProtocol anotherObject)
          Examines whether the receiver and anotherObject represent the same role player.
 

Method Detail

getRoot

public ObjectWithRoles getRoot()
Returns the root of the role hierarchy (must be an ObjectWithRoles).

as

public RoleType as(java.lang.String roleTypeName)
            throws NoSuchRoleException
Returns an (unqualified) role object whose class is the role type with name roleTypeName. Throws a NoSuchRoleException if no such role object exists.
Parameters:
roleTypeName - fully qualified class name of the intended role type. The class name must be qualified by the package name, e.g., if class Employee belongs to package persons then "persons.Employee" would be the correct class name of that role type.

allAs

public java.util.Enumeration allAs(java.lang.String qualifiedRoleTypeName)
                            throws NoSuchRoleException
Returns an enumeration of qualified role objects whose class is the qualified role type with name qualifiedRoleTypeName.
Parameters:
qualifiedRoleTypeName - fully qualified class name of the intended qualified role type. The class name must be qualified by the package name, e.g., if class Customer belongs to package persons then "persons.Customer" would be the correct class name of that qualified role type.

as

public QualifiedRoleType as(java.lang.String qualifiedRoleTypeName,
                            java.lang.Object qualifyingObj)
                     throws NoSuchRoleException
Returns an instance of the qualified role type with name qualifiedRoleTypeName whose qualifier is identical with qualifyingObject. Throws a NoSuchRoleException if no such qualifying role object exists for the receiver.
Parameters:
qualifiedRoleTypeName - fully qualified class name of the intended qualified role type. The class name must be qualified by the package name, e.g., if class Customer belongs to package persons then "persons.Customer" would be the correct class name of that qualified role type.
qualifyingObject - represents the qualifier

existsAs

public boolean existsAs(java.lang.String roleTypeName)
Examines whether an instance of the role type with name roleTypeName has been registered by the receiver.

existsAs

public boolean existsAs(java.lang.String qualifiedRoleTypeName,
                        java.lang.Object qualifyingObj)
Examines whether an instance of the qualified role type with name qualifiedRoleTypeName has been registered by the receiver using qualifier qualifyingObj.

isEntityEquivalentWith

public boolean isEntityEquivalentWith(RoleProtocol anotherObject)
Examines whether the receiver and anotherObject represent the same role player.