Class ContextAccessController
- java.lang.Object
-
- org.glassfish.contextpropagation.bootstrap.ContextAccessController
-
public abstract class ContextAccessController extends Object
-
-
Constructor Summary
Constructors Constructor Description ContextAccessController()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
checkAccessAllowed(String key, AccessControlledMap.ContextAccessLevel type)
Checks if access is allowed and throws an InsufficientCredentialException if access is not allowed.abstract boolean
isAccessAllowed(String key, AccessControlledMap.ContextAccessLevel type)
Checks whether access of typetype
is allowed onkey
based on the user associated to the current thread.abstract boolean
isEveryoneAllowedToRead(String key)
-
-
-
Method Detail
-
isAccessAllowed
public abstract boolean isAccessAllowed(String key, AccessControlledMap.ContextAccessLevel type)
Checks whether access of typetype
is allowed onkey
based on the user associated to the current thread.- Parameters:
key
- the key to check access fortype
- the type of access required- Returns:
- true if access is allowed, false otherwise
-
checkAccessAllowed
public void checkAccessAllowed(String key, AccessControlledMap.ContextAccessLevel type) throws InsufficientCredentialException
Checks if access is allowed and throws an InsufficientCredentialException if access is not allowed.- Throws:
InsufficientCredentialException
- if access could not be granted
-
isEveryoneAllowedToRead
public abstract boolean isEveryoneAllowedToRead(String key)
- Parameters:
key
- The name of a context- Returns:
- true if everyone can read the context named by key
-
-