Class DeleteAction

  • All Implemented Interfaces:
    CockpitAction<java.lang.Object,​java.lang.Object>

    public class DeleteAction
    extends java.lang.Object
    implements CockpitAction<java.lang.Object,​java.lang.Object>
    • Constructor Detail

      • DeleteAction

        public DeleteAction()
    • Method Detail

      • perform

        public ActionResult<java.lang.Object> perform​(ActionContext<java.lang.Object> ctx)
        Description copied from interface: CockpitAction
        Performs the action.
        Specified by:
        perform in interface CockpitAction<java.lang.Object,​java.lang.Object>
        Parameters:
        ctx - context containing the data and other information
        Returns:
        the action result
      • showSuccessNotification

        protected void showSuccessNotification​(ActionContext<java.lang.Object> ctx,
                                               java.util.List<java.lang.Object> deletedObjects)
      • showFailureNotification

        protected void showFailureNotification​(ActionContext<java.lang.Object> ctx,
                                               java.util.Map<java.lang.Object,​ObjectAccessException> problems)
      • canPerform

        public boolean canPerform​(ActionContext<java.lang.Object> ctx)
        Description copied from interface: CockpitAction
        Returns true if the action can be performed for the given context, false otherwise.
        Specified by:
        canPerform in interface CockpitAction<java.lang.Object,​java.lang.Object>
        Parameters:
        ctx - context containing the data and other information
        Returns:
        true if the action can be performed for the given context, false otherwise
      • isCollectionDeletable

        protected boolean isCollectionDeletable​(java.util.Collection<?> collection)
      • hasPermissionAndObjectIsPersisted

        protected boolean hasPermissionAndObjectIsPersisted​(java.lang.Object object)
      • needsConfirmation

        public boolean needsConfirmation​(ActionContext<java.lang.Object> ctx)
        Description copied from interface: CockpitAction
        Returns true if the action should be confirmed by user before being performed, false otherwise. This is evaluated by the action renderer.
        Specified by:
        needsConfirmation in interface CockpitAction<java.lang.Object,​java.lang.Object>
        Parameters:
        ctx - context containing the data and other information
        Returns:
        true if the action should be confirmed by user before being performed, false otherwise
      • getObjectFacade

        protected ObjectFacade getObjectFacade()
      • setObjectFacade

        public void setObjectFacade​(ObjectFacade objectFacade)
      • setPermissionFacade

        public void setPermissionFacade​(PermissionFacade permissionFacade)
      • setNotificationService

        public void setNotificationService​(NotificationService notificationService)