|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.subject.assignment.RoleAssignmentController<T>
org.openpermis.subject.assignment.CachingRoleAssignmentController<T>
T
- the role assignment context.public abstract class CachingRoleAssignmentController<T extends RoleAssignmentContext>
Controller that cache role assignments and handles encoding and decoding.
Constructor Summary | |
---|---|
CachingRoleAssignmentController(Decoder<T> decoder)
Creates a controller which use decoder for decoding role assignments. |
|
CachingRoleAssignmentController(Decoder<T> decoder,
Encoder encoder)
Creates a controller which use decoder for decoding and encoder for encoding role assignments. |
Method Summary | |
---|---|
protected T |
createContext(URI identity,
URI issuer,
Set<RoleDefinition> roles,
Date validFrom,
Date validTo)
Creates a context for a role assignment. |
protected abstract T |
creatingNewContext(URI identity,
URI issuer,
Set<RoleDefinition> roles,
Date validFrom,
Date validTo)
Creates a context for a role assignment. |
protected abstract List<T> |
getContexts()
Returns all contexts of this controller. |
RoleAssignment<T> |
issue(URI identity,
URI issuer,
Set<RoleDefinition> roles,
Date validFrom,
Date validTo)
Issues a new role assignment. |
List<RoleAssignment<T>> |
list(URI identity)
Searches the local cache for role assignments for holder with identity. |
URI |
normalize(URI identity)
Normalize the specified identity. |
protected abstract byte[] |
readFromContext(T context)
Reads the content of a context. |
void |
refresh()
Refreshes the the cache. |
void |
revoke(RoleAssignment<T> roleAssignment)
Revokes a role assignment. |
protected abstract void |
revokingAssignment(RoleAssignment<T> roleAssignment)
Revoking the specified role assignment. |
protected abstract void |
writeToContext(T context,
byte[] content)
Writes the a byte array into a context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingRoleAssignmentController(Decoder<T> decoder)
UnsupportedOperationException
if method
RoleAssignmentController.issue(URI, URI, Set, Date, Date)
is called.decoder
- used to decode role assignments.public CachingRoleAssignmentController(Decoder<T> decoder, Encoder encoder)
decoder
- used to decode role assignments.encoder
- used to encode role assignments.Method Detail |
---|
protected abstract List<T> getContexts()
protected abstract byte[] readFromContext(T context) throws RoleAssignmentControllerException
context
- the context whose content is returned.
RoleAssignmentControllerException
- signals that the assignment failed.protected abstract void writeToContext(T context, byte[] content) throws RoleAssignmentControllerException
context
- the context in which the byte array is written.content
- the byte array that gets written into the context.
RoleAssignmentControllerException
- signals that the assignment failed.protected abstract T creatingNewContext(URI identity, URI issuer, Set<RoleDefinition> roles, Date validFrom, Date validTo) throws RoleAssignmentControllerException
RoleAssignmentController.createContext(URI, URI, Set, Date, Date)
.identity
- holder of the role assignment.issuer
- the issuer of the role assignment.roles
- roles of the role assignment,validFrom
- the validity start of the role assignment.validTo
- the validity end of the role assignment.
RoleAssignmentControllerException
- signals that the assignment failed.protected abstract void revokingAssignment(RoleAssignment<T> roleAssignment) throws RoleAssignmentControllerException
roleAssignment
- the role assignment to revoke.
RoleAssignmentControllerException
- signals that the specified role assignment could
not be revoked.public void refresh()
public RoleAssignment<T> issue(URI identity, URI issuer, Set<RoleDefinition> roles, Date validFrom, Date validTo) throws RoleAssignmentControllerException
RoleAssignmentController
issue
in class RoleAssignmentController<T extends RoleAssignmentContext>
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.
RoleAssignmentControllerException
- signals that the assignment failed.public final void revoke(RoleAssignment<T> roleAssignment) throws RoleAssignmentControllerException
RoleAssignmentController
revoke
in class RoleAssignmentController<T extends RoleAssignmentContext>
roleAssignment
- the role assignment to revoke.
RoleAssignmentControllerException
- signals that the revocation failed.public final List<RoleAssignment<T>> list(URI identity)
list
in class RoleAssignmentController<T extends RoleAssignmentContext>
identity
- an URI
that specifies the holder of role assignments.
protected final T createContext(URI identity, URI issuer, Set<RoleDefinition> roles, Date validFrom, Date validTo) throws RoleAssignmentControllerException
RoleAssignmentController
createContext
in class RoleAssignmentController<T extends RoleAssignmentContext>
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.
RoleAssignmentControllerException
- signals that the assignment failed.public URI normalize(URI identity)
SubjectIdentityNormalizer
In case that identity is null or could not be normalized, identity is returned.
identity
- to normalize.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG