public class ExampleAnnotationBasedMethodInvocationAuthorizer extends Object implements MethodInvocationAuthorizer
|Constructor and Description|
|Modifier and Type||Method and Description|
Executes the authorization logic to determine whether the
public void initialize(Cache cache, Set<String> parameters)
This method exists to allow user-specified method authorizers to be configured and used at runtime. If this method is not overridden in a user-specified authorizer then that authorizer will not be configurable.
Cacheto which the MethodInvocationAuthorizer will belong
Stringthat will be used to configure the
public boolean authorize(Method method, Object target)
methodis allowed to be executed on the
Implementation Note: the query engine will remember whether the method invocation has been already authorized or not for the current query context, so this method will be called once in the lifetime of a query for every new method seen while traversing the objects. Nevertheless, the implementation should be lighting fast as it will be called by the OQL engine in runtime during the query execution.
Methodthat should be authorized.
Objecton which the
Methodwill be executed.
trueif the method is annotated with
ExampleAnnotationBasedMethodInvocationAuthorizer.Authorizedand not permanently forbidden,