Class AddWorkflowAttachmentAction

  • All Implemented Interfaces:
    com.hybris.cockpitng.actions.CockpitAction<WorkflowModel,​java.lang.Object>, com.hybris.cockpitng.engine.ComponentWidgetAdapterAware

    public class AddWorkflowAttachmentAction
    extends com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
    implements com.hybris.cockpitng.actions.CockpitAction<WorkflowModel,​java.lang.Object>
    Action which allows to add attachments to the workflow.
    • Field Detail

      • PARAM_ATTACHMENT_TYPE

        public static final java.lang.String PARAM_ATTACHMENT_TYPE
        See Also:
        Constant Field Values
      • APPEND_NOTIFICATION_KEY

        protected static final java.lang.String APPEND_NOTIFICATION_KEY
        See Also:
        Constant Field Values
      • NOTIFICATION_KEY_WARNING_SUFFIX

        protected static final java.lang.String NOTIFICATION_KEY_WARNING_SUFFIX
        See Also:
        Constant Field Values
      • NOTIFICATION_KEY_SINGLE_SUFFIX

        protected static final java.lang.String NOTIFICATION_KEY_SINGLE_SUFFIX
        See Also:
        Constant Field Values
      • NOTIFICATION_KEY_SUCCESS_SUFFIX

        protected static final java.lang.String NOTIFICATION_KEY_SUCCESS_SUFFIX
        See Also:
        Constant Field Values
      • NOTIFICATION_KEY_MULTIPLE_SUFFIX

        protected static final java.lang.String NOTIFICATION_KEY_MULTIPLE_SUFFIX
        See Also:
        Constant Field Values
      • SOCKET_OUT_REFERENCE_SEARCH_CTX

        protected static final java.lang.String SOCKET_OUT_REFERENCE_SEARCH_CTX
        See Also:
        Constant Field Values
      • SOCKET_OUT_UPDATED_WORKFLOW

        protected static final java.lang.String SOCKET_OUT_UPDATED_WORKFLOW
        See Also:
        Constant Field Values
      • SOCKET_IN_CHOSEN_ATTACHMENTS

        protected static final java.lang.String SOCKET_IN_CHOSEN_ATTACHMENTS
        See Also:
        Constant Field Values
    • Constructor Detail

      • AddWorkflowAttachmentAction

        public AddWorkflowAttachmentAction()
    • Method Detail

      • perform

        public com.hybris.cockpitng.actions.ActionResult<java.lang.Object> perform​(com.hybris.cockpitng.actions.ActionContext<WorkflowModel> actionContext)
        Specified by:
        perform in interface com.hybris.cockpitng.actions.CockpitAction<WorkflowModel,​java.lang.Object>
      • createSearchContext

        protected com.hybris.cockpitng.data.TypeAwareSelectionContext<ItemModel> createSearchContext​(WorkflowModel workflow,
                                                                                                     java.lang.String attachmentType)
      • onChosenAttachments

        public void onChosenAttachments​(WorkflowModel workflow,
                                        java.util.List<ItemModel> attachments)
      • notifyAttachmentsOperation

        protected void notifyAttachmentsOperation​(java.util.Collection<ItemModel> duplicates,
                                                  com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent.Level level)
      • getItemsFromAttachments

        protected java.util.List<ItemModel> getItemsFromAttachments​(WorkflowModel workflow)
      • notifySingle

        protected void notifySingle​(ItemModel existed,
                                    com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent.Level level)
      • notifyMultiple

        protected void notifyMultiple​(java.util.Collection<ItemModel> existed,
                                      com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent.Level level)
      • getLevelSourceSuffix

        protected java.lang.String getLevelSourceSuffix​(com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent.Level level)
      • canPerform

        public boolean canPerform​(com.hybris.cockpitng.actions.ActionContext<WorkflowModel> ctx)
        Specified by:
        canPerform in interface com.hybris.cockpitng.actions.CockpitAction<WorkflowModel,​java.lang.Object>
      • setWorkflowFacade

        public void setWorkflowFacade​(WorkflowFacade workflowFacade)
      • getCockpitEventQueue

        protected com.hybris.cockpitng.core.events.CockpitEventQueue getCockpitEventQueue()
      • setCockpitEventQueue

        public void setCockpitEventQueue​(com.hybris.cockpitng.core.events.CockpitEventQueue cockpitEventQueue)
      • getNotificationService

        protected com.hybris.backoffice.widgets.notificationarea.NotificationService getNotificationService()
      • setNotificationService

        public void setNotificationService​(com.hybris.backoffice.widgets.notificationarea.NotificationService notificationService)