Class DefaultB2BWorkflowIntegrationService
- java.lang.Object
-
- de.hybris.platform.b2b.services.impl.DefaultB2BWorkflowIntegrationService
-
- All Implemented Interfaces:
B2BWorkflowIntegrationService
public class DefaultB2BWorkflowIntegrationService extends java.lang.Object implements B2BWorkflowIntegrationService
Default implementation ofB2BWorkflowIntegrationService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.b2b.services.B2BWorkflowIntegrationService
B2BWorkflowIntegrationService.ACTIONCODES, B2BWorkflowIntegrationService.DECISIONCODES
-
-
Constructor Summary
Constructors Constructor Description DefaultB2BWorkflowIntegrationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidapproveWorkflowAction(WorkflowActionModel workflowActionModel)Deprecated.Since 6.2.WorkflowModelcreateWorkflow(WorkflowTemplateModel template, java.util.List<? extends ItemModel> attachments)Deprecated.Since 4.4.WorkflowTemplateModelcreateWorkflowTemplate(java.util.List<? extends UserModel> users, java.lang.String code, java.lang.String description, WorkflowTemplateType templateType)This will create a WorkflowTemplateModel if one does not existprotected voiddecideAction(WorkflowActionModel workflowActionModel, WorkflowDecisionModel workflowDecisionModel)voiddecideAction(WorkflowActionModel workflowActionModel, java.lang.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)java.util.Collection<WorkflowActionModel>findByActionStatusAndUser(WorkflowActionStatus status, java.lang.String qualifier, UserModel user)Deprecated.As of hybris 4.4, replaced bygetWorkflowActionsForActionStatusAndUser(WorkflowActionStatus, String, UserModel)WorkflowModelfindWorkflowForOrder(OrderModel order)Deprecated.As of hybris 4.4, replaced bygetWorkflowForOrder(OrderModel)java.lang.StringgenerateWorkflowTemplateCode(java.lang.String prefix, java.util.List<? extends UserModel> users)Generates a list of appended prefix_PrincipalModel.UIDWorkflowActionModelgetActionByCode(java.lang.String code)Deprecated.As of hybris 4.4, replaced bygetActionForCode(String)WorkflowActionModelgetActionForCode(java.lang.String code)Deprecated.Since 4.4.protected B2BWorflowActionDaogetB2bWorkflowActionDao()protected B2BWorkflowDaogetB2bWorkflowDao()protected BaseDaogetBaseDao()protected ModelServicegetModelService()OrderModelgetOrderFromAction(WorkflowActionModel workflowActionModel)Gets the associated order to the WorkflowActionModel qualifier.protected SessionServicegetSessionService()java.util.Collection<WorkflowActionModel>getStartWorkflowActions(WorkflowModel workflow)Gets all WorkFlowActions that are ofWorkflowActionType.STARTtype.protected UserServicegetUserService()protected WorkflowActionModelgetWorkAction(WorkflowActionTemplateModel templateAction, java.util.Collection<WorkflowActionModel> workflowActions)Deprecated.Since 4.4.protected WorkflowActionServicegetWorkflowActionService()java.util.Collection<WorkflowActionModel>getWorkflowActionsForActionStatusAndUser(WorkflowActionStatus status, java.lang.String qualifier, UserModel user)Gets all WorkflowActions by user, workflowActionStatus (eg IN_PROGRESS) and qualifier (eg APPROVAL)java.util.Collection<WorkflowActionModel>getWorkflowActionsForUser(UserModel user)Gets a collection of workflow actions for a userprotected WorkflowAttachmentServicegetWorkflowAttachmentService()WorkflowModelgetWorkflowForOrder(OrderModel order)Get the Workflow for an Order.protected WorkflowProcessingServicegetWorkflowProcessingService()protected WorkflowServicegetWorkflowService()WorkflowTemplateStrategygetWorkflowTempateStrategy(WorkflowTemplateType workflowTemplateType)Gets a workflow template strategy by template typeWorkflowTemplateModelgetWorkflowTemplateForCode(java.lang.String code)Gets the WorkflowTemplateModel based on the code.protected WorkflowTemplateServicegetWorkflowTemplateService()voidrejectWorkflowAction(WorkflowActionModel workflowActionModel)Deprecated.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(java.util.List<WorkflowTemplateStrategy> workflowTemplateStrategies)voidstartWorkflow(WorkflowModel workflowModel)Deprecated.Since 4.4.
-
-
-
Method Detail
-
getActionByCode
@Deprecated(since="4.4") public WorkflowActionModel getActionByCode(java.lang.String code)
Deprecated.As of hybris 4.4, replaced bygetActionForCode(String)- Specified by:
getActionByCodein interfaceB2BWorkflowIntegrationService- Parameters:
code- the action code- Returns:
- the workflow action
-
getActionForCode
@Deprecated(since="4.4") public WorkflowActionModel getActionForCode(java.lang.String code)
Deprecated.Since 4.4.Description copied from interface:B2BWorkflowIntegrationServiceGet WorkflowAction for its code.- Specified by:
getActionForCodein interfaceB2BWorkflowIntegrationService- Parameters:
code- the WorkflowAction's code- Returns:
- WorkflowActionModel
-
findByActionStatusAndUser
@Deprecated(since="4.4") public java.util.Collection<WorkflowActionModel> findByActionStatusAndUser(WorkflowActionStatus status, java.lang.String qualifier, UserModel user)
Deprecated.As of hybris 4.4, replaced bygetWorkflowActionsForActionStatusAndUser(WorkflowActionStatus, String, UserModel)- Specified by:
findByActionStatusAndUserin interfaceB2BWorkflowIntegrationService- Parameters:
status- the action statusqualifier- the qualifieruser- the assigned user- Returns:
- the
Collectionof {WorkflowActionModel}
-
getWorkflowActionsForActionStatusAndUser
public java.util.Collection<WorkflowActionModel> getWorkflowActionsForActionStatusAndUser(WorkflowActionStatus status, java.lang.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
public java.util.Collection<WorkflowActionModel> getWorkflowActionsForUser(UserModel user)
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") public void approveWorkflowAction(WorkflowActionModel workflowActionModel)
Deprecated.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") public void rejectWorkflowAction(WorkflowActionModel workflowActionModel)
Deprecated.Since 6.2. UsedecideAction(de.hybris.platform.workflow.model.WorkflowActionModel, String)decideAction(action, DECISIONCODES.REJECT.name())- Specified by:
rejectWorkflowActionin interfaceB2BWorkflowIntegrationService
-
decideAction
public void decideAction(WorkflowActionModel workflowActionModel, java.lang.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)- 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
public OrderModel getOrderFromAction(WorkflowActionModel workflowActionModel)
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") public WorkflowModel createWorkflow(WorkflowTemplateModel template, java.util.List<? extends ItemModel> attachments)
Deprecated.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
-
getWorkAction
@Deprecated(since="4.4") protected WorkflowActionModel getWorkAction(WorkflowActionTemplateModel templateAction, java.util.Collection<WorkflowActionModel> workflowActions)
Deprecated.Since 4.4. Unused, will be removed in the next release
-
getWorkflowTemplateForCode
public WorkflowTemplateModel getWorkflowTemplateForCode(java.lang.String code)
Description copied from interface:B2BWorkflowIntegrationServiceGets the WorkflowTemplateModel based on the code.- Specified by:
getWorkflowTemplateForCodein interfaceB2BWorkflowIntegrationService- Parameters:
code- the WorkflowActionType code- Returns:
- WorkflowTemplateModel
-
startWorkflow
@Deprecated(since="4.4") public void startWorkflow(WorkflowModel workflowModel)
Deprecated.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
public java.lang.String generateWorkflowTemplateCode(java.lang.String prefix, java.util.List<? extends UserModel> users)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
public java.util.Collection<WorkflowActionModel> getStartWorkflowActions(WorkflowModel workflow)
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(java.util.List<? extends UserModel> users, java.lang.String code, java.lang.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
-
findWorkflowForOrder
@Deprecated(since="4.4") public WorkflowModel findWorkflowForOrder(OrderModel order)
Deprecated.As of hybris 4.4, replaced bygetWorkflowForOrder(OrderModel)- Specified by:
findWorkflowForOrderin interfaceB2BWorkflowIntegrationService- Parameters:
order- the order for which to find the workflow- Returns:
- the order
WorkflowModel
-
getWorkflowForOrder
public WorkflowModel getWorkflowForOrder(OrderModel order)
Description copied from interface:B2BWorkflowIntegrationServiceGet the Workflow for an Order.- Specified by:
getWorkflowForOrderin interfaceB2BWorkflowIntegrationService- Parameters:
order- the order- Returns:
- WorkflowModel
-
getBaseDao
protected BaseDao getBaseDao()
-
setBaseDao
public void setBaseDao(BaseDao baseDao)
-
getUserService
protected UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
setB2bWorkflowActionDao
public void setB2bWorkflowActionDao(B2BWorflowActionDao b2bWorkflowActionDao)
-
getB2bWorkflowActionDao
protected B2BWorflowActionDao getB2bWorkflowActionDao()
-
getB2bWorkflowDao
protected B2BWorkflowDao getB2bWorkflowDao()
-
setB2bWorkflowDao
public void setB2bWorkflowDao(B2BWorkflowDao b2bWorkflowDao)
-
getWorkflowService
protected WorkflowService getWorkflowService()
-
setWorkflowService
public void setWorkflowService(WorkflowService workflowService)
-
getWorkflowActionService
protected WorkflowActionService getWorkflowActionService()
-
setWorkflowActionService
public void setWorkflowActionService(WorkflowActionService workflowActionService)
-
getWorkflowTemplateService
protected WorkflowTemplateService getWorkflowTemplateService()
-
setWorkflowTemplateService
public void setWorkflowTemplateService(WorkflowTemplateService workflowTemplateService)
-
getWorkflowProcessingService
protected WorkflowProcessingService getWorkflowProcessingService()
-
setWorkflowProcessingService
public void setWorkflowProcessingService(WorkflowProcessingService workflowProcessingService)
-
getWorkflowAttachmentService
protected WorkflowAttachmentService 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(java.util.List<WorkflowTemplateStrategy> workflowTemplateStrategies)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
-