Class DefaultB2BWorkflowIntegrationService
java.lang.Object
de.hybris.platform.b2b.services.impl.DefaultB2BWorkflowIntegrationService
- All Implemented Interfaces:
B2BWorkflowIntegrationService
public class DefaultB2BWorkflowIntegrationService
extends Object
implements B2BWorkflowIntegrationService
Default implementation of
B2BWorkflowIntegrationService-
Nested Class Summary
Nested classes/interfaces inherited from interface de.hybris.platform.b2b.services.B2BWorkflowIntegrationService
B2BWorkflowIntegrationService.ACTIONCODES, B2BWorkflowIntegrationService.DECISIONCODES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapproveWorkflowAction(WorkflowActionModel workflowActionModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.2.createWorkflow(WorkflowTemplateModel template, List<? extends ItemModel> attachments) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.createWorkflowTemplate(List<? extends UserModel> users, String code, String description, WorkflowTemplateType templateType) This will create a WorkflowTemplateModel if one does not existprotected voiddecideAction(WorkflowActionModel workflowActionModel, WorkflowDecisionModel workflowDecisionModel) voiddecideAction(WorkflowActionModel workflowActionModel, String decisionQualifier) Makes a decision on an action based on the qualifier (The qualifier is used to look up a decision with its code build fromAbstractWorkflowActionModel.CODE_decisionQualifier)generateWorkflowTemplateCode(String prefix, List<? extends UserModel> users) Generates a list of appended prefix_PrincipalModel.UIDgetActionForCode(String code) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.protected B2BWorflowActionDaoprotected B2BWorkflowDaoprotected BaseDaoprotected ModelServicegetOrderFromAction(WorkflowActionModel workflowActionModel) Gets the associated order to the WorkflowActionModel qualifier.protected SessionServicegetStartWorkflowActions(WorkflowModel workflow) Gets all WorkFlowActions that are ofWorkflowActionType.STARTtype.protected UserServiceprotected WorkflowActionServicegetWorkflowActionsForActionStatusAndUser(WorkflowActionStatus status, String qualifier, UserModel user) Gets all WorkflowActions by user, workflowActionStatus (eg IN_PROGRESS) and qualifier (eg APPROVAL)Gets a collection of workflow actions for a userprotected WorkflowAttachmentServicegetWorkflowForOrder(OrderModel order) Get the Workflow for an Order.protected WorkflowProcessingServiceprotected WorkflowServicegetWorkflowTempateStrategy(WorkflowTemplateType workflowTemplateType) Gets a workflow template strategy by template typeGets the WorkflowTemplateModel based on the code.protected WorkflowTemplateServicevoidrejectWorkflowAction(WorkflowActionModel workflowActionModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.2.voidsetB2bWorkflowActionDao(B2BWorflowActionDao b2bWorkflowActionDao) voidsetB2bWorkflowDao(B2BWorkflowDao b2bWorkflowDao) voidsetBaseDao(BaseDao baseDao) voidsetModelService(ModelService modelService) voidsetSessionService(SessionService sessionService) voidsetUserService(UserService userService) voidsetWorkflowActionService(WorkflowActionService workflowActionService) voidsetWorkflowProcessingService(WorkflowProcessingService workflowProcessingService) voidsetWorkflowService(WorkflowService workflowService) voidsetWorkflowTemplateService(WorkflowTemplateService workflowTemplateService) voidsetWorkflowTemplateStrategies(List<WorkflowTemplateStrategy> workflowTemplateStrategies) voidstartWorkflow(WorkflowModel workflowModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.
-
Constructor Details
-
DefaultB2BWorkflowIntegrationService
public DefaultB2BWorkflowIntegrationService()
-
-
Method Details
-
getActionForCode
Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.Description copied from interface:B2BWorkflowIntegrationServiceGet WorkflowAction for its code.- Specified by:
getActionForCodein interfaceB2BWorkflowIntegrationService- Parameters:
code- the WorkflowAction's code- Returns:
- WorkflowActionModel
-
getWorkflowActionsForActionStatusAndUser
public Collection<WorkflowActionModel> getWorkflowActionsForActionStatusAndUser(WorkflowActionStatus status, String qualifier, UserModel user) Gets all WorkflowActions by user, workflowActionStatus (eg IN_PROGRESS) and qualifier (eg APPROVAL)- Specified by:
getWorkflowActionsForActionStatusAndUserin interfaceB2BWorkflowIntegrationService- Parameters:
status- the work flow action statusqualifier- the qualifier (eg APPROVAL)user- the user- Returns:
- WorkflowActionModel the set of work flow actions
-
getWorkflowActionsForUser
Description copied from interface:B2BWorkflowIntegrationServiceGets a collection of workflow actions for a user- Specified by:
getWorkflowActionsForUserin interfaceB2BWorkflowIntegrationService- Parameters:
user- the user- Returns:
- the
CollectionofWorkflowActionModel
-
approveWorkflowAction
@Deprecated(since="6.2", forRemoval=true) public void approveWorkflowAction(WorkflowActionModel workflowActionModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.2. UsedecideAction(de.hybris.platform.workflow.model.WorkflowActionModel, String)decideAction(action, DECISIONCODES.APPROVE.name())- Specified by:
approveWorkflowActionin interfaceB2BWorkflowIntegrationService
-
rejectWorkflowAction
@Deprecated(since="6.2", forRemoval=true) public void rejectWorkflowAction(WorkflowActionModel workflowActionModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.2. UsedecideAction(de.hybris.platform.workflow.model.WorkflowActionModel, String)decideAction(action, DECISIONCODES.REJECT.name())- Specified by:
rejectWorkflowActionin interfaceB2BWorkflowIntegrationService
-
decideAction
Makes a decision on an action based on the qualifier (The qualifier is used to look up a decision with its code build fromAbstractWorkflowActionModel.CODE_decisionQualifier)- Specified by:
decideActionin interfaceB2BWorkflowIntegrationService- Parameters:
workflowActionModel- The action to make a decision upondecisionQualifier- a qualifier based onB2BWorkflowIntegrationServiceDECISIONCODES enumeration
-
decideAction
protected void decideAction(WorkflowActionModel workflowActionModel, WorkflowDecisionModel workflowDecisionModel) -
getOrderFromAction
Description copied from interface:B2BWorkflowIntegrationServiceGets the associated order to the WorkflowActionModel qualifier. The qualifier's attachment of type B2BApprovalProcessModel will have the associated order.- Specified by:
getOrderFromActionin interfaceB2BWorkflowIntegrationService- Parameters:
workflowActionModel- the work flow action- Returns:
- the order associated to the attachment
-
createWorkflow
@Deprecated(since="4.4", forRemoval=true) public WorkflowModel createWorkflow(WorkflowTemplateModel template, List<? extends ItemModel> attachments) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UseWorkflowService.createWorkflow(String, de.hybris.platform.workflow.model.WorkflowTemplateModel, java.util.List, de.hybris.platform.core.model.user.UserModel)usage of the method should be removed pending fix to https://jira.hybris.com/browse/PLA-10938- Specified by:
createWorkflowin interfaceB2BWorkflowIntegrationService- Parameters:
template- the workflow templateattachments- the workflow attachments- Returns:
- the workflow
-
getWorkflowTemplateForCode
Description copied from interface:B2BWorkflowIntegrationServiceGets the WorkflowTemplateModel based on the code.- Specified by:
getWorkflowTemplateForCodein interfaceB2BWorkflowIntegrationService- Parameters:
code- the WorkflowActionType code- Returns:
- WorkflowTemplateModel
-
startWorkflow
Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UseWorkflowProcessingService.startWorkflow(de.hybris.platform.workflow.model.WorkflowModel)usage of the method should be removed pending fix to https://jira.hybris.com/browse/PLA-10938- Specified by:
startWorkflowin interfaceB2BWorkflowIntegrationService
-
generateWorkflowTemplateCode
Description copied from interface:B2BWorkflowIntegrationServiceGenerates a list of appended prefix_PrincipalModel.UID- Specified by:
generateWorkflowTemplateCodein interfaceB2BWorkflowIntegrationService- Parameters:
prefix- theStringto which the user id is appended tousers- the list of users in which the template code will be generated for- Returns:
- the template code of appended values
-
getStartWorkflowActions
Description copied from interface:B2BWorkflowIntegrationServiceGets all WorkFlowActions that are ofWorkflowActionType.STARTtype.- Specified by:
getStartWorkflowActionsin interfaceB2BWorkflowIntegrationService- Parameters:
workflow- the WorkflowModel- Returns:
- a list of WorkflowActionModels
-
createWorkflowTemplate
public WorkflowTemplateModel createWorkflowTemplate(List<? extends UserModel> users, String code, String description, WorkflowTemplateType templateType) Description copied from interface:B2BWorkflowIntegrationServiceThis will create a WorkflowTemplateModel if one does not exist- Specified by:
createWorkflowTemplatein interfaceB2BWorkflowIntegrationService- Parameters:
users- the approvers that a work flow template will be created forcode- the code of the templatedescription- the short description for the templatetemplateType- the strategy type of the template- Returns:
- newly created WorkflowTemplateModel
-
getWorkflowForOrder
Description copied from interface:B2BWorkflowIntegrationServiceGet the Workflow for an Order.- Specified by:
getWorkflowForOrderin interfaceB2BWorkflowIntegrationService- Parameters:
order- the order- Returns:
- WorkflowModel
-
getBaseDao
-
setBaseDao
-
getUserService
-
setUserService
-
setB2bWorkflowActionDao
-
getB2bWorkflowActionDao
-
getB2bWorkflowDao
-
setB2bWorkflowDao
-
getWorkflowService
-
setWorkflowService
-
getWorkflowActionService
-
setWorkflowActionService
-
getWorkflowTemplateService
-
setWorkflowTemplateService
-
getWorkflowProcessingService
-
setWorkflowProcessingService
-
getWorkflowAttachmentService
-
getWorkflowTempateStrategy
public WorkflowTemplateStrategy getWorkflowTempateStrategy(WorkflowTemplateType workflowTemplateType) Gets a workflow template strategy by template type- Parameters:
workflowTemplateType- the template type- Returns:
- the
WorkflowTemplateStrategy
-
setWorkflowTemplateStrategies
@Autowired public void setWorkflowTemplateStrategies(List<WorkflowTemplateStrategy> workflowTemplateStrategies) -
getModelService
-
setModelService
-
getSessionService
-
setSessionService
-