com.silverpeas.accesscontrol
Class AccessControlContext

java.lang.Object
  extended by com.silverpeas.accesscontrol.AccessControlContext

public class AccessControlContext
extends Object

This class permits to define the context of access to a resource. User: Yohann Chastagnier Date: 30/12/13


Method Summary
<T> T
get(String key, Class<T> classType)
          Gets from context a value from a key that has been stored into the context instance.
 Set<AccessControlOperation> getOperations()
          Gets the operations performed into the context.
static AccessControlContext init()
          Gets an initialized instance of access control context.
 AccessControlContext onOperationsOf(AccessControlOperation... operations)
          Defines the operations performed into the context.
<T> AccessControlContext
put(String key, T value)
          Puts into context a value linked to a key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public static AccessControlContext init()
Gets an initialized instance of access control context.

Returns:

onOperationsOf

public AccessControlContext onOperationsOf(AccessControlOperation... operations)
Defines the operations performed into the context.

Parameters:
operations -
Returns:

getOperations

public Set<AccessControlOperation> getOperations()
Gets the operations performed into the context.

Returns:

put

public <T> AccessControlContext put(String key,
                                    T value)
Puts into context a value linked to a key.

Type Parameters:
T -
Parameters:
key - the key.
value - the value.
Returns:
the current instance.

get

public <T> T get(String key,
                 Class<T> classType)
Gets from context a value from a key that has been stored into the context instance.

Type Parameters:
T -
Parameters:
key - the key associated to the searched value.
classType - the type of expected value.
Returns:
the value if any, null if the expected type does not match with the one of the existing value.


Copyright © 2016 Silverpeas. All Rights Reserved.