|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.commands.MgnlCommand
public abstract class MgnlCommand
To make the coding of commands as easy as possible the default values set in the config are set and the values of the context are set as properties too if the naming matches.
Field Summary | |
---|---|
static org.slf4j.Logger |
log
|
Fields inherited from interface info.magnolia.commands.chain.Command |
---|
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Constructor Summary | |
---|---|
MgnlCommand()
|
Method Summary | |
---|---|
Command |
clone()
This method allows to create new clone of a command, so the instances in the CommandManager's catalogs are masters, and the execution always uses clone created by this method. NOTE: CommandsManager clone the command instances by standard Java cloning mechanism. |
boolean |
execute(Context ctx)
Make sure that the context is castable to a magnolia context. |
abstract boolean |
execute(Context context)
This is the actual method to be overridden in descendant classes. |
boolean |
isEnabled()
|
void |
release()
If a clone is passivated we call this method. |
void |
setEnabled(boolean isEnabled)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static org.slf4j.Logger log
Constructor Detail |
---|
public MgnlCommand()
Method Detail |
---|
public boolean execute(Context ctx) throws Exception
execute
in interface Command
Exception
public abstract boolean execute(Context context) throws Exception
Exception
public void release()
public boolean isEnabled()
public void setEnabled(boolean isEnabled)
public Command clone() throws CloneNotSupportedException
Command
clone
in interface Command
clone
in class Object
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |