info.magnolia.module.forum.app.action
Class DeleteMessageAction

java.lang.Object
  extended by info.magnolia.ui.api.action.AbstractAction<D>
      extended by info.magnolia.ui.framework.action.AbstractMultiItemAction<D>
          extended by info.magnolia.ui.framework.action.AbstractCommandAction<D>
              extended by info.magnolia.module.forum.app.action.ForumCommandAction
                  extended by info.magnolia.module.forum.app.action.DeleteMessageAction
All Implemented Interfaces:
info.magnolia.ui.api.action.Action

public class DeleteMessageAction
extends ForumCommandAction

This is the action-class to delete a message. It extends DeleteAction. It takes care, that a user cannot delete the last message, since a thread must have at least one message.

See Also:
DeleteAction

Field Summary
 
Fields inherited from class info.magnolia.module.forum.app.action.ForumCommandAction
eventBus, jcrItem, uiContext
 
Fields inherited from class info.magnolia.ui.framework.action.AbstractCommandAction
COMMAND_RESULT
 
Constructor Summary
DeleteMessageAction(DeleteMessageActionDefinition definition, info.magnolia.ui.vaadin.integration.jcr.JcrItemAdapter item, info.magnolia.commands.CommandsManager commandsManager, info.magnolia.event.EventBus eventBus, info.magnolia.ui.api.context.UiContext uiContext, info.magnolia.i18nsystem.SimpleTranslator i18n)
           
 
Method Summary
protected  String getErrorNotification()
           
protected  void onError(Exception e)
           
protected  void onPostExecute()
           
protected  void onPreExecute()
           
 
Methods inherited from class info.magnolia.module.forum.app.action.ForumCommandAction
getFailureMessage, getSuccessMessage
 
Methods inherited from class info.magnolia.ui.framework.action.AbstractCommandAction
buildParams, executeOnItem, getCommand, getCommandsManager, getParams
 
Methods inherited from class info.magnolia.ui.framework.action.AbstractMultiItemAction
execute, getCurrentItem, getFailedItems, getItemComparator, getItems, getSortedItems, getUiContext, setCurrentItem
 
Methods inherited from class info.magnolia.ui.api.action.AbstractAction
getDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteMessageAction

public DeleteMessageAction(DeleteMessageActionDefinition definition,
                           info.magnolia.ui.vaadin.integration.jcr.JcrItemAdapter item,
                           info.magnolia.commands.CommandsManager commandsManager,
                           @Named(value="admincentral")
                           info.magnolia.event.EventBus eventBus,
                           info.magnolia.ui.api.context.UiContext uiContext,
                           info.magnolia.i18nsystem.SimpleTranslator i18n)
Method Detail

onPreExecute

protected void onPreExecute()
                     throws Exception
Overrides:
onPreExecute in class info.magnolia.ui.framework.action.AbstractCommandAction
Throws:
Exception

onError

protected void onError(Exception e)
Overrides:
onError in class info.magnolia.ui.framework.action.AbstractCommandAction

onPostExecute

protected void onPostExecute()
                      throws Exception
Overrides:
onPostExecute in class ForumCommandAction
Throws:
Exception

getErrorNotification

protected String getErrorNotification()
Overrides:
getErrorNotification in class info.magnolia.ui.framework.action.AbstractMultiItemAction


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.