public abstract class MgnlCommand extends Object implements Command
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
CONTINUE_PROCESSING, PROCESSING_COMPLETE
Constructor and Description |
---|
MgnlCommand() |
Modifier and Type | Method and Description |
---|---|
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) |
public boolean execute(Context ctx) throws 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
Copyright © 2003–2017 Magnolia International Ltd.. All rights reserved.