org.riotfamily.pages.riot.command
Class TranslatePageCommand

java.lang.Object
  extended by org.riotfamily.riot.list.command.core.AbstractCommand
      extended by org.riotfamily.riot.list.command.core.EditCommand
          extended by org.riotfamily.pages.riot.command.TranslatePageCommand
All Implemented Interfaces:
Command, RiotRuntimeAware, BeanNameAware

public class TranslatePageCommand
extends EditCommand


Field Summary
static String ACTION_TRANSLATE
           
 
Fields inherited from class org.riotfamily.riot.list.command.core.EditCommand
ACTION_EDIT
 
Fields inherited from class org.riotfamily.riot.list.command.core.AbstractCommand
log
 
Constructor Summary
TranslatePageCommand(PageDao pageDao)
           
 
Method Summary
 CommandResult execute(CommandContext context)
          Executes the command.
 String getAction()
          Returns the command's id.
 String getItemStyleClass(CommandContext context)
          Returns a CSS class that is added to the list of class names of the whole item/row. The default implementation always returns null.
 boolean isEnabled(CommandContext context)
          Implementors may inspect the given context to decide whether the command should be enabled. The default implementation always returns true.
 
Methods inherited from class org.riotfamily.riot.list.command.core.AbstractCommand
getConfirmationMessage, getDefaultMessageArgs, getId, getLabel, getRuntime, getStyleClass, isShowOnForm, setBeanName, setId, setRiotRuntime, setShowOnForm, setStyleClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_TRANSLATE

public static final String ACTION_TRANSLATE
See Also:
Constant Field Values
Constructor Detail

TranslatePageCommand

public TranslatePageCommand(PageDao pageDao)
Method Detail

isEnabled

public boolean isEnabled(CommandContext context)
Description copied from class: AbstractCommand
Implementors may inspect the given context to decide whether the command should be enabled. Commands don't need to check the policy since commands will be automatically disabled if the action returned by Command.getAction() is denied. The default implementation always returns true.

Specified by:
isEnabled in interface Command
Overrides:
isEnabled in class AbstractCommand

getAction

public String getAction()
Description copied from class: AbstractCommand
Returns the command's id.

Specified by:
getAction in interface Command
Overrides:
getAction in class EditCommand

getItemStyleClass

public String getItemStyleClass(CommandContext context)
Description copied from class: AbstractCommand
Returns a CSS class that is added to the list of class names of the whole item/row. The default implementation always returns null. Subclasses may override this method to highlight a list item depending on the context. The default implementation always returns null.

Specified by:
getItemStyleClass in interface Command
Overrides:
getItemStyleClass in class AbstractCommand

execute

public CommandResult execute(CommandContext context)
Description copied from interface: Command
Executes the command.

Specified by:
execute in interface Command
Overrides:
execute in class EditCommand