info.magnolia.ui.framework.action
Class DeleteItemAction

java.lang.Object
  extended by info.magnolia.ui.api.action.AbstractAction<D>
      extended by info.magnolia.ui.framework.action.AbstractMultiItemAction<DeleteItemActionDefinition>
          extended by info.magnolia.ui.framework.action.DeleteItemAction
All Implemented Interfaces:
Action
Direct Known Subclasses:
AbstractDeleteGroupOrRoleAction, DeleteComponentAction

public class DeleteItemAction
extends AbstractMultiItemAction<DeleteItemActionDefinition>

Deletes a node or property from the repository.

See Also:
DeleteItemActionDefinition

Constructor Summary
DeleteItemAction(DeleteItemActionDefinition definition, JcrItemAdapter item, info.magnolia.event.EventBus eventBus, UiContext uiContext, info.magnolia.i18nsystem.SimpleTranslator i18n)
           
DeleteItemAction(DeleteItemActionDefinition definition, List<JcrItemAdapter> items, info.magnolia.event.EventBus eventBus, UiContext uiContext, info.magnolia.i18nsystem.SimpleTranslator i18n)
           
 
Method Summary
 void execute()
          Executes the action.
protected  void executeAfterConfirmation()
           
protected  void executeOnItem(JcrItemAdapter item)
          Executes the action on ONE item.
protected  String getFailureMessage()
          Returns the message to display, if the execution fails on at least ONE item.
protected  String getSuccessMessage()
          Returns the message to display, if the execution succeeds on ALL items.
 
Methods inherited from class info.magnolia.ui.framework.action.AbstractMultiItemAction
getCurrentItem, getErrorNotification, 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

DeleteItemAction

public DeleteItemAction(DeleteItemActionDefinition definition,
                        JcrItemAdapter item,
                        @Named(value="admincentral")
                        info.magnolia.event.EventBus eventBus,
                        UiContext uiContext,
                        info.magnolia.i18nsystem.SimpleTranslator i18n)

DeleteItemAction

public DeleteItemAction(DeleteItemActionDefinition definition,
                        List<JcrItemAdapter> items,
                        @Named(value="admincentral")
                        info.magnolia.event.EventBus eventBus,
                        UiContext uiContext,
                        info.magnolia.i18nsystem.SimpleTranslator i18n)
Method Detail

execute

public void execute()
             throws ActionExecutionException
Description copied from interface: Action
Executes the action.

Specified by:
execute in interface Action
Overrides:
execute in class AbstractMultiItemAction<DeleteItemActionDefinition>
Throws:
ActionExecutionException - if an error occurs performing the action

executeAfterConfirmation

protected void executeAfterConfirmation()

executeOnItem

protected void executeOnItem(JcrItemAdapter item)
                      throws Exception
Description copied from class: AbstractMultiItemAction
Executes the action on ONE item.

Specified by:
executeOnItem in class AbstractMultiItemAction<DeleteItemActionDefinition>
Throws:
Exception

getSuccessMessage

protected String getSuccessMessage()
Description copied from class: AbstractMultiItemAction
Returns the message to display, if the execution succeeds on ALL items. May return null, if the implementing action handles the user notification on its own.

Specified by:
getSuccessMessage in class AbstractMultiItemAction<DeleteItemActionDefinition>

getFailureMessage

protected String getFailureMessage()
Description copied from class: AbstractMultiItemAction
Returns the message to display, if the execution fails on at least ONE item. May return null, if the implementing action handles the user notification on its own.

Specified by:
getFailureMessage in class AbstractMultiItemAction<DeleteItemActionDefinition>


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