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 void
approveWorkflowAction(WorkflowActionModel workflowActionModel)
Deprecated.Since 6.2.WorkflowModel
createWorkflow(WorkflowTemplateModel template, java.util.List<? extends ItemModel> attachments)
Deprecated.Since 4.4.WorkflowTemplateModel
createWorkflowTemplate(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 void
decideAction(WorkflowActionModel workflowActionModel, WorkflowDecisionModel workflowDecisionModel)
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)java.util.Collection<WorkflowActionModel>
findByActionStatusAndUser(WorkflowActionStatus status, java.lang.String qualifier, UserModel user)
Deprecated.As of hybris 4.4, replaced bygetWorkflowActionsForActionStatusAndUser(WorkflowActionStatus, String, UserModel)
WorkflowModel
findWorkflowForOrder(OrderModel order)
Deprecated.As of hybris 4.4, replaced bygetWorkflowForOrder(OrderModel)
java.lang.String
generateWorkflowTemplateCode(java.lang.String prefix, java.util.List<? extends UserModel> users)
Generates a list of appended prefix_PrincipalModel.UID
WorkflowActionModel
getActionByCode(java.lang.String code)
Deprecated.As of hybris 4.4, replaced bygetActionForCode(String)
WorkflowActionModel
getActionForCode(java.lang.String code)
Deprecated.Since 4.4.protected B2BWorflowActionDao
getB2bWorkflowActionDao()
protected B2BWorkflowDao
getB2bWorkflowDao()
protected BaseDao
getBaseDao()
protected ModelService
getModelService()
OrderModel
getOrderFromAction(WorkflowActionModel workflowActionModel)
Gets the associated order to the WorkflowActionModel qualifier.protected SessionService
getSessionService()
java.util.Collection<WorkflowActionModel>
getStartWorkflowActions(WorkflowModel workflow)
Gets all WorkFlowActions that are ofWorkflowActionType.START
type.protected UserService
getUserService()
protected WorkflowActionModel
getWorkAction(WorkflowActionTemplateModel templateAction, java.util.Collection<WorkflowActionModel> workflowActions)
Deprecated.Since 4.4.protected WorkflowActionService
getWorkflowActionService()
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 WorkflowAttachmentService
getWorkflowAttachmentService()
WorkflowModel
getWorkflowForOrder(OrderModel order)
Get the Workflow for an Order.protected WorkflowProcessingService
getWorkflowProcessingService()
protected WorkflowService
getWorkflowService()
WorkflowTemplateStrategy
getWorkflowTempateStrategy(WorkflowTemplateType workflowTemplateType)
Gets a workflow template strategy by template typeWorkflowTemplateModel
getWorkflowTemplateForCode(java.lang.String code)
Gets the WorkflowTemplateModel based on the code.protected WorkflowTemplateService
getWorkflowTemplateService()
void
rejectWorkflowAction(WorkflowActionModel workflowActionModel)
Deprecated.Since 6.2.void
setB2bWorkflowActionDao(B2BWorflowActionDao b2bWorkflowActionDao)
void
setB2bWorkflowDao(B2BWorkflowDao b2bWorkflowDao)
void
setBaseDao(BaseDao baseDao)
void
setModelService(ModelService modelService)
void
setSessionService(SessionService sessionService)
void
setUserService(UserService userService)
void
setWorkflowActionService(WorkflowActionService workflowActionService)
void
setWorkflowProcessingService(WorkflowProcessingService workflowProcessingService)
void
setWorkflowService(WorkflowService workflowService)
void
setWorkflowTemplateService(WorkflowTemplateService workflowTemplateService)
void
setWorkflowTemplateStrategies(java.util.List<WorkflowTemplateStrategy> workflowTemplateStrategies)
void
startWorkflow(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:
getActionByCode
in 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:B2BWorkflowIntegrationService
Get WorkflowAction for its code.- Specified by:
getActionForCode
in 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:
findByActionStatusAndUser
in interfaceB2BWorkflowIntegrationService
- Parameters:
status
- the action statusqualifier
- the qualifieruser
- the assigned user- Returns:
- the
Collection
of {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:
getWorkflowActionsForActionStatusAndUser
in 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:B2BWorkflowIntegrationService
Gets a collection of workflow actions for a user- Specified by:
getWorkflowActionsForUser
in interfaceB2BWorkflowIntegrationService
- Parameters:
user
- the user- Returns:
- the
Collection
ofWorkflowActionModel
-
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:
approveWorkflowAction
in 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:
rejectWorkflowAction
in 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:
decideAction
in interfaceB2BWorkflowIntegrationService
- Parameters:
workflowActionModel
- The action to make a decision upondecisionQualifier
- a qualifier based onB2BWorkflowIntegrationService
DECISIONCODES enumeration
-
decideAction
protected void decideAction(WorkflowActionModel workflowActionModel, WorkflowDecisionModel workflowDecisionModel)
-
getOrderFromAction
public OrderModel getOrderFromAction(WorkflowActionModel workflowActionModel)
Description copied from interface:B2BWorkflowIntegrationService
Gets the associated order to the WorkflowActionModel qualifier. The qualifier's attachment of type B2BApprovalProcessModel will have the associated order.- Specified by:
getOrderFromAction
in 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:
createWorkflow
in 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:B2BWorkflowIntegrationService
Gets the WorkflowTemplateModel based on the code.- Specified by:
getWorkflowTemplateForCode
in 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:
startWorkflow
in interfaceB2BWorkflowIntegrationService
-
generateWorkflowTemplateCode
public java.lang.String generateWorkflowTemplateCode(java.lang.String prefix, java.util.List<? extends UserModel> users)
Description copied from interface:B2BWorkflowIntegrationService
Generates a list of appended prefix_PrincipalModel.UID
- Specified by:
generateWorkflowTemplateCode
in interfaceB2BWorkflowIntegrationService
- Parameters:
prefix
- theString
to 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:B2BWorkflowIntegrationService
Gets all WorkFlowActions that are ofWorkflowActionType.START
type.- Specified by:
getStartWorkflowActions
in 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:B2BWorkflowIntegrationService
This will create a WorkflowTemplateModel if one does not exist- Specified by:
createWorkflowTemplate
in 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:
findWorkflowForOrder
in 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:B2BWorkflowIntegrationService
Get the Workflow for an Order.- Specified by:
getWorkflowForOrder
in 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)
-
-