Class AddWorkflowAttachmentAction
- java.lang.Object
-
- com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
-
- com.hybris.backoffice.widgets.actions.workflow.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 Summary
Fields Modifier and Type Field Description protected static java.lang.String
APPEND_NOTIFICATION_KEY
protected static java.lang.String
NOTIFICATION_KEY_MULTIPLE_SUFFIX
protected static java.lang.String
NOTIFICATION_KEY_SINGLE_SUFFIX
protected static java.lang.String
NOTIFICATION_KEY_SUCCESS_SUFFIX
protected static java.lang.String
NOTIFICATION_KEY_WARNING_SUFFIX
static java.lang.String
PARAM_ATTACHMENT_TYPE
protected static java.lang.String
SOCKET_IN_CHOSEN_ATTACHMENTS
protected static java.lang.String
SOCKET_OUT_REFERENCE_SEARCH_CTX
protected static java.lang.String
SOCKET_OUT_UPDATED_WORKFLOW
-
Constructor Summary
Constructors Constructor Description AddWorkflowAttachmentAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canPerform(com.hybris.cockpitng.actions.ActionContext<WorkflowModel> ctx)
protected com.hybris.cockpitng.data.TypeAwareSelectionContext<ItemModel>
createSearchContext(WorkflowModel workflow, java.lang.String attachmentType)
protected com.hybris.cockpitng.core.events.CockpitEventQueue
getCockpitEventQueue()
protected java.util.List<ItemModel>
getItemsFromAttachments(WorkflowModel workflow)
protected java.lang.String
getLevelSourceSuffix(com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent.Level level)
protected java.util.List<ItemModel>
getNotAttachedItems(WorkflowModel workflow, java.util.List<ItemModel> toBeAttached)
protected com.hybris.backoffice.widgets.notificationarea.NotificationService
getNotificationService()
WorkflowFacade
getWorkflowFacade()
protected void
notifyAttachmentsOperation(java.util.Collection<ItemModel> duplicates, com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent.Level level)
protected void
notifyMultiple(java.util.Collection<ItemModel> existed, com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent.Level level)
protected void
notifySingle(ItemModel existed, com.hybris.backoffice.widgets.notificationarea.event.NotificationEvent.Level level)
void
onChosenAttachments(WorkflowModel workflow, java.util.List<ItemModel> attachments)
com.hybris.cockpitng.actions.ActionResult<java.lang.Object>
perform(com.hybris.cockpitng.actions.ActionContext<WorkflowModel> actionContext)
void
setCockpitEventQueue(com.hybris.cockpitng.core.events.CockpitEventQueue cockpitEventQueue)
void
setNotificationService(com.hybris.backoffice.widgets.notificationarea.NotificationService notificationService)
void
setWorkflowFacade(WorkflowFacade workflowFacade)
-
Methods inherited from class com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
addSocketInputEventListener, getComponentID, handleSocketInputEvent, initialize, initializeDefaultEventListeners, registerStubInstance, sendOutput, setComponentID, unregisterStubInstance
-
-
-
-
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
-
-
Method Detail
-
perform
public com.hybris.cockpitng.actions.ActionResult<java.lang.Object> perform(com.hybris.cockpitng.actions.ActionContext<WorkflowModel> actionContext)
- Specified by:
perform
in interfacecom.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)
-
getNotAttachedItems
protected java.util.List<ItemModel> getNotAttachedItems(WorkflowModel workflow, java.util.List<ItemModel> toBeAttached)
-
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 interfacecom.hybris.cockpitng.actions.CockpitAction<WorkflowModel,java.lang.Object>
-
getWorkflowFacade
public WorkflowFacade getWorkflowFacade()
-
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)
-
-