|
||||||||||
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 | |
---|---|
MgnlCommand |
copy(Command command)
This method allows to create new copy of a command, so the instances in the CommandManager's catalogs are masters, and the execution always uses new instance created by this method. NOTE: If your command uses default parameters (set from a JCR property), you MUST override this method to copy the values from the master command to the actually used copy. |
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 |
---|
clone, 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 MgnlCommand copy(Command command)
Command
copy
in interface Command
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |