|
![]() |
||||||||
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<UrlContext>
org.openpermis.subject.assignment.url.UrlController
public class UrlController
Controls read-only url based role assignments .
This url controller supports only read operations.
Constructor Summary | |
---|---|
UrlController(List<URL> urls,
Decoder<UrlContext> decoder)
Creates an url controller that controls role assignments from url's. |
Method Summary | |
---|---|
static UrlController |
createClasspathUrlController(Decoder<UrlContext> decoder,
ClassLoader classLoader,
String... resources)
Creates a url controller for a list of resources loaded from a class loader. |
static UrlController |
createUrlController(Decoder<UrlContext> decoder,
Class<?> clazz,
String... resources)
Creates a url controller for a list of resources loaded from a class loader. |
protected UrlContext |
creatingNewContext(URI identity,
URI issuer,
Set<RoleDefinition> roles,
Date validFrom,
Date validTo)
Creates a context for a role assignment. |
protected List<UrlContext> |
getContexts()
Returns all contexts of this controller. |
protected byte[] |
readFromContext(UrlContext context)
Reads the content of a context. |
protected void |
revokingAssignment(RoleAssignment<UrlContext> roleAssignment)
Revoking the specified role assignment. |
protected void |
writeToContext(UrlContext context,
byte[] content)
Writes the a byte array into a context. |
Methods inherited from class org.openpermis.subject.assignment.CachingRoleAssignmentController |
---|
createContext, issue, list, normalize, refresh, revoke |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UrlController(List<URL> urls, Decoder<UrlContext> decoder)
This url controller supports only read operations.
urls
- a List
of URL
's.decoder
- used to decode role assignments.Method Detail |
---|
public static UrlController createClasspathUrlController(Decoder<UrlContext> decoder, ClassLoader classLoader, String... resources)
Uses the Thread.getContextClassLoader()
as a fallback if a resource cannot
be retrieved using the specified class loader.
decoder
- used to decode role assignments.
certificates, must not be null
.classLoader
- the class loader to use for retrieving the resource URLs.resources
- list of resource locations to process, must not be null
or empty.ClassLoader.getResource(String)
public static UrlController createUrlController(Decoder<UrlContext> decoder, Class<?> clazz, String... resources)
decoder
- used to decode role assignments.
certificates, must not be null
.clazz
- the class to use for retrieving the resource URLs.resources
- list of resource locations to process, must not be null
or empty.Class.getResource(String)
protected void writeToContext(UrlContext context, byte[] content) throws RoleAssignmentControllerException
CachingRoleAssignmentController
writeToContext
in class CachingRoleAssignmentController<UrlContext>
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 byte[] readFromContext(UrlContext context) throws RoleAssignmentControllerException
CachingRoleAssignmentController
readFromContext
in class CachingRoleAssignmentController<UrlContext>
context
- the context whose content is returned.
RoleAssignmentControllerException
- signals that the assignment failed.protected List<UrlContext> getContexts()
CachingRoleAssignmentController
getContexts
in class CachingRoleAssignmentController<UrlContext>
protected UrlContext creatingNewContext(URI identity, URI issuer, Set<RoleDefinition> roles, Date validFrom, Date validTo)
CachingRoleAssignmentController
creatingNewContext
in class CachingRoleAssignmentController<UrlContext>
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.
protected void revokingAssignment(RoleAssignment<UrlContext> roleAssignment)
CachingRoleAssignmentController
revokingAssignment
in class CachingRoleAssignmentController<UrlContext>
roleAssignment
- the role assignment to revoke.
|
![]() |
||||||||
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