org.wso2.registry.lifecycle
Class Lifecycle
java.lang.Object
org.wso2.registry.lifecycle.Lifecycle
- Direct Known Subclasses:
- DefaultLifecycle
public abstract class Lifecycle
- extends java.lang.Object
Method Summary |
abstract void |
associate(Resource resource,
Registry registry)
Associate a new Resource with this lifecycle. |
java.lang.String |
getName()
|
void |
setName(java.lang.String name)
|
abstract void |
transition(RequestContext context,
java.lang.String action)
Do something (change state) - action names are lifecycle-specific, and it's up to the
implementation to decide if a given transition 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 |
CURRENT_LIFE_CYCLE
public static final java.lang.String CURRENT_LIFE_CYCLE
- See Also:
- Constant Field Values
AVAILABLE_LIFE_CYCLES
public static final java.lang.String AVAILABLE_LIFE_CYCLES
- See Also:
- Constant Field Values
COMPLETED
public static final java.lang.String COMPLETED
- See Also:
- Constant Field Values
Lifecycle
public Lifecycle()
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
associate
public abstract void associate(Resource resource,
Registry registry)
throws RegistryException
- Associate a new Resource with this lifecycle. This could set custom properties, create
sub-directories, etc... If this throws an Exception, the association has FAILED.
- Parameters:
resource
- Resource which we want to change the stateregistry
- Current registry instance
- Throws:
RegistryException
- If the condition is not met or some thing is wrong
transition
public abstract void transition(RequestContext context,
java.lang.String action)
throws RegistryException
- Do something (change state) - action names are lifecycle-specific, and it's up to the
implementation to decide if a given transition is allowed, and what to do if so.
- Parameters:
context
- the RequestContext containing all the state about this requestaction
- action to perform
- Throws:
RegistryException
- If the condition is not met or some thing is wrong
Copyright © 2007 Apache Web Services Project. All Rights Reserved.