|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.Aspect
public abstract class Aspect
Aspects are using to associate custom behaviors with resources; Aspects differ form handlers, in that handlers are automatically applied to a resource, whereas, aspects are needed to be invoked manually through user action (e.g. by clicking a button in the user interface).
Field Summary | |
---|---|
static String |
AVAILABLE_ASPECTS
|
Constructor Summary | |
---|---|
Aspect()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String AVAILABLE_ASPECTS
Constructor Detail |
---|
public Aspect()
Method Detail |
---|
public abstract void associate(Resource resource, Registry registry) throws RegistryException
resource
- Resource which we want to change the stateregistry
- Current registry instance
RegistryException
- 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 perform
RegistryException
- 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 request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |