Class DeleteAction
- java.lang.Object
-
- com.hybris.cockpitng.actions.delete.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>
-
-
Field Summary
Fields Modifier and Type Field Description ObjectFacadeobjectFacade
-
Constructor Summary
Constructors Constructor Description DeleteAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanPerform(ActionContext<java.lang.Object> ctx)Returns true if the action can be performed for the given context, false otherwise.java.lang.StringgetConfirmationMessage(ActionContext<java.lang.Object> ctx)Returns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeCockpitAction.needsConfirmation(ActionContext)).protected NotificationServicegetNotificationService()protected java.lang.StringgetNotificationSource(ActionContext<java.lang.Object> ctx)Deprecated, for removal: This API element is subject to removal in a future version.since 6.7, useNotificationService.getWidgetNotificationSource(ActionContext)instead.protected ObjectFacadegetObjectFacade()protected PermissionFacadegetPermissionFacade()protected booleanhasPermissionAndObjectIsPersisted(java.lang.Object object)protected booleanisCollectionDeletable(java.util.Collection<?> collection)booleanneedsConfirmation(ActionContext<java.lang.Object> ctx)Returns true if the action should be confirmed by user before being performed, false otherwise.ActionResult<java.lang.Object>perform(ActionContext<java.lang.Object> ctx)Performs the action.voidsetNotificationService(NotificationService notificationService)voidsetObjectFacade(ObjectFacade objectFacade)voidsetPermissionFacade(PermissionFacade permissionFacade)protected voidshowFailureNotification(ActionContext<java.lang.Object> ctx, java.util.Map<java.lang.Object,ObjectAccessException> problems)protected voidshowSuccessNotification(ActionContext<java.lang.Object> ctx, java.util.List<java.lang.Object> deletedObjects)
-
-
-
Field Detail
-
objectFacade
public ObjectFacade objectFacade
-
-
Method Detail
-
perform
public ActionResult<java.lang.Object> perform(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionPerforms the action.- Specified by:
performin interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- the action result
-
getNotificationSource
@Deprecated(since="6.7", forRemoval=true) protected java.lang.String getNotificationSource(ActionContext<java.lang.Object> ctx)Deprecated, for removal: This API element is subject to removal in a future version.since 6.7, useNotificationService.getWidgetNotificationSource(ActionContext)instead.
-
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:CockpitActionReturns true if the action can be performed for the given context, false otherwise.- Specified by:
canPerformin interfaceCockpitAction<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:CockpitActionReturns true if the action should be confirmed by user before being performed, false otherwise. This is evaluated by the action renderer.- Specified by:
needsConfirmationin interfaceCockpitAction<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
-
getConfirmationMessage
public java.lang.String getConfirmationMessage(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionReturns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeCockpitAction.needsConfirmation(ActionContext)).- Specified by:
getConfirmationMessagein interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- the confirmation message to be shown to the user in the confirmation dialog
- See Also:
CockpitAction.needsConfirmation(ActionContext)
-
getObjectFacade
protected ObjectFacade getObjectFacade()
-
setObjectFacade
public void setObjectFacade(ObjectFacade objectFacade)
-
getPermissionFacade
protected PermissionFacade getPermissionFacade()
-
setPermissionFacade
public void setPermissionFacade(PermissionFacade permissionFacade)
-
getNotificationService
protected NotificationService getNotificationService()
-
setNotificationService
public void setNotificationService(NotificationService notificationService)
-
-