public interface PolicyManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
Modifier and Type | Method and Description |
---|---|
AccessClause |
getAccessClause(CommandContext context,
java.lang.String action,
java.lang.String resouceClass)
Implement this method to generate the query based on the metadata information available for the
resource class and the policies based on the given action.
|
boolean |
isAllowed(CommandContext context,
java.lang.String action,
Protectable resource)
Implement this method to determine if a user (part of the context) can execute a given "action" against a given "resource".
|
static final java.lang.String COPYRIGHT
AccessClause getAccessClause(CommandContext context, java.lang.String action, java.lang.String resouceClass) throws java.lang.Exception
context
- The CommandContextaction
- The nameresourceClass
- The class namejava.lang.Exception
AccessClause
,
CommandContext
boolean isAllowed(CommandContext context, java.lang.String action, Protectable resource) throws java.lang.Exception
context
- The CommandContextaction
- The nameresource
- 'Protectable' resource instancejava.lang.Exception
Protectable
,
CommandContext