public class AuthorizationCallbackProxy extends Object implements DpAuthorizationCallback
DpAuthorizationCallback interface and delegates calls
 to the registered callback POJO with annotated methodsM_CHECK_CMD_ACCESS, M_CHECK_DATA_ACCESS| Constructor and Description | 
|---|
AuthorizationCallbackProxy(Object backupObject)
Constructor for Callback proxys. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addActionCapability(AuthorizationCBType authorizationCBType)
Add action capability from annotated callType used to register
 capabilities on the server 
 | 
void | 
addActionMethod(String name,
               Method method)
Add callback action method to proxy 
 | 
AuthorizationResult | 
checkCommandAccess(DpAuthorizationContext context,
                  String[] commandTokens,
                  AuthorizationOperCheck operation)
This callback is invoked for command authorization, i.e. 
 | 
AuthorizationResult | 
checkDataAccess(DpAuthorizationContext context,
               ConfObject[] kp,
               AuthorizationOperCheck operation,
               AuthorizationOperCheck how)  | 
EnumSet<AuthorizationOperCheck> | 
commandFilter()
Thus method can be used to prevent access checks from causing invocation
 of a checkCommandAccess callback even though it is registered. 
 | 
EnumSet<AuthorizationOperCheck> | 
dataFilter()
Thus method can be used to prevent access checks from causing invocation
 of a checkDataAccess callback even though it is registered. 
 | 
static AuthorizationCallbackProxy[] | 
getAuthorizationCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback. 
 | 
Object | 
getBackupObject()
Retrieve the callback POJO 
 | 
int | 
mask()
Mask of flags for each method that is supported by this callback:
 
   
DpAuthorizationCallback.M_CHECK_CMD_ACCESS
  DpAuthorizationCallback.M_CHECK_DATA_ACCESS
  | 
public AuthorizationCallbackProxy(Object backupObject)
backupObject - registered callback POJOpublic Object getBackupObject()
public void addActionMethod(String name, Method method)
name - canonical action namemethod - registered callback methodpublic void addActionCapability(AuthorizationCBType authorizationCBType)
authorizationCBType - action typepublic int mask()
DpAuthorizationCallbackmask in interface DpAuthorizationCallbackpublic AuthorizationResult checkCommandAccess(DpAuthorizationContext context, String[] commandTokens, AuthorizationOperCheck operation) throws DpCallbackException
DpAuthorizationCallbackcheckCommandAccess in interface DpAuthorizationCallbackcontext - the authorization contextcommandTokens - command represented as a string of tokensoperation - AuthorizationOperCheck describing the operatopn typeDpCallbackExceptionpublic AuthorizationResult checkDataAccess(DpAuthorizationContext context, ConfObject[] kp, AuthorizationOperCheck operation, AuthorizationOperCheck how) throws DpCallbackException
checkDataAccess in interface DpAuthorizationCallbackcontext - the authorization contextkp - the data element represented by an array of ConfObjectoperation - AuthorizationOperCheck describing the operatopn typehow - checking state INTERMEDIATE or FINALDpCallbackExceptionpublic EnumSet<AuthorizationOperCheck> commandFilter()
DpAuthorizationCallbackcommandFilter in interface DpAuthorizationCallbackpublic EnumSet<AuthorizationOperCheck> dataFilter()
DpAuthorizationCallbackdataFilter in interface DpAuthorizationCallbackpublic static AuthorizationCallbackProxy[] getAuthorizationCallbackProxys(Object obj) throws DpCallbackException
obj - registered Callback POJODpCallbackException