info.magnolia.security.app.action
Class AbstractDeleteGroupOrRoleAction<D extends DeleteItemActionDefinition>

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
              extended by info.magnolia.security.app.action.AbstractDeleteGroupOrRoleAction<D>
Type Parameters:
D - the action definition type, must extend the DeleteItemActionDefinition class.
All Implemented Interfaces:
Action
Direct Known Subclasses:
DeleteGroupAction, DeleteRoleAction

public abstract class AbstractDeleteGroupOrRoleAction<D extends DeleteItemActionDefinition>
extends DeleteItemAction

Abstract common supertype for DeleteGroupAction and DeleteRoleAction.


Constructor Summary
AbstractDeleteGroupOrRoleAction(D definition, JcrItemAdapter item, info.magnolia.event.EventBus eventBus, UiContext uiContext, info.magnolia.i18nsystem.SimpleTranslator i18n)
           
 
Method Summary
protected  void executeAfterConfirmation()
           
protected abstract  String getBaseErrorMessage()
           
protected abstract  Collection<String> getGroupsOrRoles(info.magnolia.cms.security.Group group)
          Gets a collection of group or role names (according to where it is implemented) assigned to the group.
protected abstract  Collection<String> getGroupsOrRoles(info.magnolia.cms.security.User user)
          Gets a collection of group or role names (according to where it is implemented) assigned to the user.
protected  info.magnolia.i18nsystem.SimpleTranslator getI18n()
           
 JcrItemAdapter getItem()
           
protected abstract  String getVerificationErrorMessage()
           
 
Methods inherited from class info.magnolia.ui.framework.action.DeleteItemAction
execute, executeOnItem, getFailureMessage, getSuccessMessage
 
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

AbstractDeleteGroupOrRoleAction

@Inject
public AbstractDeleteGroupOrRoleAction(D definition,
                                              JcrItemAdapter item,
                                              @Named(value="admincentral")
                                              info.magnolia.event.EventBus eventBus,
                                              UiContext uiContext,
                                              info.magnolia.i18nsystem.SimpleTranslator i18n)
Method Detail

getI18n

protected info.magnolia.i18nsystem.SimpleTranslator getI18n()

getItem

public JcrItemAdapter getItem()

getBaseErrorMessage

protected abstract String getBaseErrorMessage()
Returns:
the base for the error message shown to the user in case the item is already assigned; the list of users/groups the item is assigned to is added;

getVerificationErrorMessage

protected abstract String getVerificationErrorMessage()
Returns:
the message to be shown to the user in case the verification (getUsersAndGroupsThisItemIsAssignedTo() method) fails.

getGroupsOrRoles

protected abstract Collection<String> getGroupsOrRoles(info.magnolia.cms.security.User user)
Gets a collection of group or role names (according to where it is implemented) assigned to the user.


getGroupsOrRoles

protected abstract Collection<String> getGroupsOrRoles(info.magnolia.cms.security.Group group)
Gets a collection of group or role names (according to where it is implemented) assigned to the group.


executeAfterConfirmation

protected void executeAfterConfirmation()
Overrides:
executeAfterConfirmation in class DeleteItemAction


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