public abstract class Aspect extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AVAILABLE_ASPECTS |
Constructor and Description |
---|
Aspect() |
Modifier and Type | Method and Description |
---|---|
abstract void |
associate(Resource resource,
Registry registry)
Associate a new Resource with this aspect.
|
abstract void |
dissociate(RequestContext context)
Remove this Aspect from the referenced resource.
|
abstract String[] |
getAvailableActions(RequestContext context)
Get a list of available actions for the resource in the RequestContext, taking into account
current state, user, etc.
|
abstract void |
invoke(RequestContext context,
String action)
Do something - action names are aspect-specific, and it's up to the implementation to decide
if a given action is allowed, and what to do if so.
|
void |
invoke(RequestContext context,
String action,
Map<String,String> parameters)
Do something - action names are aspect-specific, and it's up to the implementation to decide
if a given action is allowed, and what to do if so.
|
public static final String AVAILABLE_ASPECTS
public abstract void associate(Resource resource, Registry registry) throws RegistryException
resource
- Resource which we want to change the stateregistry
- Current registry instanceRegistryException
- If the condition is not met or some thing is wrongpublic abstract void invoke(RequestContext context, String action) throws RegistryException
context
- the RequestContext containing all the state about this requestaction
- action to performRegistryException
- If the condition is not met or some thing is wrongpublic void invoke(RequestContext context, String action, Map<String,String> parameters) throws RegistryException
context
- the RequestContext containing all the state about this requestaction
- action to performparameters
- parameters to be used for the operationRegistryException
- If the condition is not met or some thing is wrongpublic abstract String[] getAvailableActions(RequestContext context)
context
- the RequestContext containing info about the Resource, Registry, User, etc.public abstract void dissociate(RequestContext context)
context
- the RequestContext containing all the state about this requestCopyright © 2016 WSO2 Inc. All Rights Reserved.