org.openpermis.subject.assignment
Class RoleAssignmentController<T extends RoleAssignmentContext>

java.lang.Object
  extended by org.openpermis.subject.assignment.RoleAssignmentController<T>
Type Parameters:
T - the context of this role assignment controller.
All Implemented Interfaces:
SubjectIdentityNormalizer
Direct Known Subclasses:
CachingRoleAssignmentController

public abstract class RoleAssignmentController<T extends RoleAssignmentContext>
extends Object
implements SubjectIdentityNormalizer

Controls role assignments.

Since:
0.9.0

Constructor Summary
RoleAssignmentController()
           
 
Method Summary
protected abstract  T createContext(URI identity, URI issuer, Set<RoleDefinition> roles, Date validFrom, Date validTo)
          Creates a context for a role assignment.
 RoleAssignment<T> issue(URI identity, URI issuer, Set<RoleDefinition> roles, Date validFrom, Date validTo)
          Issues a new role assignment.
abstract  List<RoleAssignment<T>> list(URI identity)
          Lists all role assignments that are held by the specified identity.
abstract  void revoke(RoleAssignment<T> roleAssignment)
          Revokes a role assignment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openpermis.subject.norm.SubjectIdentityNormalizer
normalize
 

Constructor Detail

RoleAssignmentController

public RoleAssignmentController()
Method Detail

createContext

protected abstract T createContext(URI identity,
                                   URI issuer,
                                   Set<RoleDefinition> roles,
                                   Date validFrom,
                                   Date validTo)
                                                          throws RoleAssignmentControllerException
Creates a context for a role assignment.

Parameters:
identity - holder of the role assignment.
issuer - the issuer of the role assignment.
roles - roles of the role assignment,
validFrom - validity start of the role assignment.
validTo - validity end of the role assignment.
Returns:
the context for the role assignment.
Throws:
RoleAssignmentControllerException - signals that the assignment failed.
Since:
0.9.0

list

public abstract List<RoleAssignment<T>> list(URI identity)
Lists all role assignments that are held by the specified identity.

Parameters:
identity - an URI that specifies the holder of role assignments.
Returns:
list of role assignments that are held by identity.
Since:
0.9.0

issue

public RoleAssignment<T> issue(URI identity,
                               URI issuer,
                               Set<RoleDefinition> roles,
                               Date validFrom,
                               Date validTo)
                                                      throws RoleAssignmentControllerException
Issues a new role assignment.

Parameters:
identity - holder of the role assignment.
issuer - the issuer of the role assignment.
roles - roles of the role assignment,
validFrom - validity start of the role assignment.
validTo - validity end of the role assignment.
Returns:
the role assignment.
Throws:
RoleAssignmentControllerException - signals that the assignment failed.
Since:
0.9.0

revoke

public abstract void revoke(RoleAssignment<T> roleAssignment)
                     throws RoleAssignmentControllerException
Revokes a role assignment.

Parameters:
roleAssignment - the role assignment to revoke.
Throws:
RoleAssignmentControllerException - signals that the revocation failed.
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG