org.riotfamily.pages.riot.command
Class PublishPageCommand

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

public class PublishPageCommand
extends AbstractCommand
implements BatchCommand

Author:
Felix Gnass [fgnass at neteye dot de]

Field Summary
static String ACTION_PUBLISH
           
 
Fields inherited from class org.riotfamily.riot.list.command.core.AbstractCommand
log
 
Constructor Summary
PublishPageCommand(PageDao pageDao)
           
 
Method Summary
 CommandResult execute(CommandContext context)
          Executes the command.
 String getAction()
          Returns the command's id.
 String getBatchConfirmationMessage(CommandContext context)
           
 String getConfirmationMessage(CommandContext context)
          Returns a localized message that is displayed to the user asking for a confirmation.
 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
getDefaultMessageArgs, getId, getItemStyleClass, 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
 
Methods inherited from interface org.riotfamily.riot.list.command.Command
getId, getItemStyleClass, getLabel, getStyleClass, isShowOnForm, setId
 

Field Detail

ACTION_PUBLISH

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

PublishPageCommand

public PublishPageCommand(PageDao pageDao)
Method Detail

getAction

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

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

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

execute

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

Specified by:
execute in interface Command

getConfirmationMessage

public String getConfirmationMessage(CommandContext context)
Description copied from interface: Command
Returns a localized message that is displayed to the user asking for a confirmation. Implementors may return null if no confirmation is needed. Otherwise a dialog containing an Ok and a Cancel button is displayed. If the user clicks Ok the command is executed otherwise no action takes place.

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

getBatchConfirmationMessage

public String getBatchConfirmationMessage(CommandContext context)
Specified by:
getBatchConfirmationMessage in interface BatchCommand