info.magnolia.commands
Class DelegateCommand

java.lang.Object
  extended by info.magnolia.commands.DelegateCommand
All Implemented Interfaces:
Command

public class DelegateCommand
extends Object
implements Command

Delegate to an other command at runtime.


Field Summary
 
Fields inherited from interface info.magnolia.commands.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
DelegateCommand(CommandsManager commandsManager)
           
 
Method Summary
 DelegateCommand 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)
           
 String getCommandName()
           
 void setCommandName(String commandName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateCommand

@Inject
public DelegateCommand(CommandsManager commandsManager)
Method Detail

execute

public boolean execute(Context ctx)
                throws Exception
Specified by:
execute in interface Command
Throws:
Exception

getCommandName

public String getCommandName()

setCommandName

public void setCommandName(String commandName)

copy

public DelegateCommand copy(Command command)
Description copied from interface: 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.

Specified by:
copy in interface Command


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.