|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The SlideToken interface identifies the current acting principal and its credentials, and maintains information about the state of the user transaction.
An object implementing this interface is required to use any of the
methods provided by the helpers API. The default implementation of this
interface is SlideTokenImpl
. In the context of a
Java servlet, such an object should be instantiated like this:
Principal principal = request.getUserPrincipal(); CredentialsToken credentials; if (principal == null) { credentials = new CredentialsToken(""); } else { credentials = new CredentialsToken(principal); } SlideToken token = new SlideTokenImpl(credentials);
Method Summary | |
void |
addLockToken(java.lang.String lockId)
Add a new lock token to the lock token list. |
void |
addParameter(java.lang.String parameterName,
java.lang.Object parameterValue)
Add a new parameter to the parameter list. |
void |
cacheLock(ObjectNode object,
ActionNode action,
boolean lock)
allows to cache the result of a lock check |
void |
cacheMatchPrincipal(SubjectNode checkSubject,
SubjectNode matchSubject,
boolean match)
Allows to cache the result of a matchPrincipal operation |
void |
cachePermission(ObjectNode object,
ActionNode action,
boolean permission)
allows to cache the result of a permission check |
void |
cacheResolve(Uri uri,
ResourceId resourceId)
Allows to cache the result of a resolve operation |
java.lang.Boolean |
checkLockCache(ObjectNode object,
ActionNode action)
checks if the lock cache contains an entry for the ObjectNode and ActionNode combination. |
boolean |
checkLockToken(java.lang.String lockToken)
Checks if the given lock token is present. |
java.lang.Boolean |
checkMatchPrincipalCache(SubjectNode checkSubject,
SubjectNode matchSubject)
Checks if the matchPrincipal cache |
java.lang.Boolean |
checkPermissionCache(ObjectNode object,
ActionNode action)
checks if the permission cache contains an entry for the ObjectNode and ActionNode combination. |
ResourceId |
checkResolveCache(Uri uri)
Checks if the resolve cache contains an entry for the specified uri. |
void |
clearLockTokens()
Clears the lock token list. |
void |
clearParameters()
Clears the parameter list. |
CacheInfoToken |
getCacheInfoToken()
Returns the CacheInfo token. |
CredentialsToken |
getCredentialsToken()
Returns the credentials token. |
java.lang.Object |
getParameter(java.lang.String name)
Returns a parameter given by name. |
java.util.Enumeration |
getParameterNames()
Return parameter list. |
boolean |
isEnforceLockTokens()
Use lock tokens in lock resolution ? |
boolean |
isExternalTransaction()
Checks if this request is part of an externally controlled transaction. |
boolean |
isForceLock()
Force lock check. |
boolean |
isForceSecurity()
Force security check. |
boolean |
isForceStoreEnlistment()
Force store enlistment flag accessor. |
void |
removeLockToken(java.lang.String lockId)
Removes a lock token from the lock token list. |
void |
removeParameter(java.lang.String parameterName)
Removes a parameter from the parameter list. |
void |
setCacheInfoToken(CacheInfoToken cacheInfoToken)
CacheInfo token mutator. |
void |
setCredentialsToken(CredentialsToken credentialsToken)
Credentials token mutator. |
void |
setEnforceLockTokens(boolean enforceLockTokens)
Enforce lock tokens flag mutator. |
void |
setExternalTx()
Sets if this request is part of an externally controlled transaction. |
void |
setForceLock(boolean forceLock)
|
void |
setForceSecurity(boolean forceSecurity)
|
void |
setForceStoreEnlistment(boolean forceStoreEnlistment)
Force store enlistment flag mutator. |
java.util.List |
showLockTokens()
For debugging purposes ONLY |
Method Detail |
public CredentialsToken getCredentialsToken()
public void setCredentialsToken(CredentialsToken credentialsToken)
public CacheInfoToken getCacheInfoToken()
public void setCacheInfoToken(CacheInfoToken cacheInfoToken)
public boolean isEnforceLockTokens()
public void setEnforceLockTokens(boolean enforceLockTokens)
enforceLockTokens
- New flag valuepublic boolean isForceStoreEnlistment()
public void setForceStoreEnlistment(boolean forceStoreEnlistment)
forceStoreEnlistment
- New flag valuepublic void addLockToken(java.lang.String lockId)
lockId
- Lock token to addpublic void removeLockToken(java.lang.String lockId)
lockId
- Lock token to removepublic void clearLockTokens()
public java.util.List showLockTokens()
public boolean checkLockToken(java.lang.String lockToken)
lockToken
- Lock token to check
public void addParameter(java.lang.String parameterName, java.lang.Object parameterValue)
parameterName
- Parameter to addparameterValue
- Parameter valuepublic void removeParameter(java.lang.String parameterName)
parameterName
- Parameter to removepublic void clearParameters()
public java.util.Enumeration getParameterNames()
public java.lang.Object getParameter(java.lang.String name)
name
or
null
if no such parameter exists.public void cachePermission(ObjectNode object, ActionNode action, boolean permission)
public java.lang.Boolean checkPermissionCache(ObjectNode object, ActionNode action)
public boolean isForceSecurity()
public void setForceSecurity(boolean forceSecurity)
public void cacheLock(ObjectNode object, ActionNode action, boolean lock)
public java.lang.Boolean checkLockCache(ObjectNode object, ActionNode action)
public void cacheResolve(Uri uri, ResourceId resourceId)
public void cacheMatchPrincipal(SubjectNode checkSubject, SubjectNode matchSubject, boolean match)
public java.lang.Boolean checkMatchPrincipalCache(SubjectNode checkSubject, SubjectNode matchSubject)
public ResourceId checkResolveCache(Uri uri)
public boolean isForceLock()
public void setForceLock(boolean forceLock)
public boolean isExternalTransaction()
public void setExternalTx()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |