Class DefaultWorkflowsTypeFacade
- java.lang.Object
-
- com.hybris.backoffice.workflow.impl.DefaultWorkflowsTypeFacade
-
- All Implemented Interfaces:
WorkflowsTypeFacade
public class DefaultWorkflowsTypeFacade extends java.lang.Object implements WorkflowsTypeFacade
Default implementation which returns supported attachment types based onattachmentTypeCodes
-
-
Constructor Summary
Constructors Constructor Description DefaultWorkflowsTypeFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<ComposedTypeModel>findCommonAttachmentType(java.util.List<ItemModel> attachments)Finds common attachment type - gets common super type of given items and checks if it can be assigned to one of defined supported typesWorkflowsTypeFacade.getSupportedAttachmentTypeCodes().java.util.List<java.lang.String>getAllAttachmentClassNames()Based on configuration returns all supported attachment class names as opposed toWorkflowsTypeFacade.getSupportedAttachmentClassNames()java.util.Set<java.lang.String>getAttachmentTypeCodes()protected java.util.Set<java.lang.String>getAttachmentTypeCodesForUser()com.hybris.cockpitng.util.type.BackofficeTypeUtilsgetBackofficeTypeUtils()protected java.util.Optional<ComposedTypeModel>getClosestSupportedType(java.lang.String attachmentTypeCode)com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacadegetPermissionFacade()java.util.List<java.lang.String>getSupportedAttachmentClassNames()Based on configuration returns supported attachment classes names for current user.java.util.List<java.lang.String>getSupportedAttachmentTypeCodes()Based on configuration returns supported type codes for current user.java.util.List<ComposedTypeModel>getSupportedAttachmentTypes()Based on configuration returns supported ComposedTypes for current user.com.hybris.cockpitng.dataaccess.facades.type.TypeFacadegetTypeFacade()TypeServicegetTypeService()voidsetAttachmentTypeCodes(java.util.Set<java.lang.String> attachmentTypeCodes)voidsetBackofficeTypeUtils(com.hybris.cockpitng.util.type.BackofficeTypeUtils backofficeTypeUtils)voidsetPermissionFacade(com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade permissionFacade)voidsetTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)voidsetTypeService(TypeService typeService)protected java.util.List<java.lang.String>toClassNames(java.util.Set<java.lang.String> typeCodes)
-
-
-
Method Detail
-
findCommonAttachmentType
public java.util.Optional<ComposedTypeModel> findCommonAttachmentType(java.util.List<ItemModel> attachments)
Description copied from interface:WorkflowsTypeFacadeFinds common attachment type - gets common super type of given items and checks if it can be assigned to one of defined supported typesWorkflowsTypeFacade.getSupportedAttachmentTypeCodes().- Specified by:
findCommonAttachmentTypein interfaceWorkflowsTypeFacade- Parameters:
attachments- list of items to be added as attachments.- Returns:
- supported attachment type - one of
WorkflowsTypeFacade.getSupportedAttachmentTypeCodes().
-
getClosestSupportedType
protected java.util.Optional<ComposedTypeModel> getClosestSupportedType(java.lang.String attachmentTypeCode)
-
getSupportedAttachmentClassNames
public java.util.List<java.lang.String> getSupportedAttachmentClassNames()
Description copied from interface:WorkflowsTypeFacadeBased on configuration returns supported attachment classes names for current user.- Specified by:
getSupportedAttachmentClassNamesin interfaceWorkflowsTypeFacade- Returns:
- list of attachments class names.
-
getAllAttachmentClassNames
public java.util.List<java.lang.String> getAllAttachmentClassNames()
Description copied from interface:WorkflowsTypeFacadeBased on configuration returns all supported attachment class names as opposed toWorkflowsTypeFacade.getSupportedAttachmentClassNames()- Specified by:
getAllAttachmentClassNamesin interfaceWorkflowsTypeFacade- Returns:
- list of attachments class names.
-
toClassNames
protected java.util.List<java.lang.String> toClassNames(java.util.Set<java.lang.String> typeCodes)
-
getSupportedAttachmentTypeCodes
public java.util.List<java.lang.String> getSupportedAttachmentTypeCodes()
Description copied from interface:WorkflowsTypeFacadeBased on configuration returns supported type codes for current user.- Specified by:
getSupportedAttachmentTypeCodesin interfaceWorkflowsTypeFacade- Returns:
- list of type codes.
-
getSupportedAttachmentTypes
public java.util.List<ComposedTypeModel> getSupportedAttachmentTypes()
Description copied from interface:WorkflowsTypeFacadeBased on configuration returns supported ComposedTypes for current user.- Specified by:
getSupportedAttachmentTypesin interfaceWorkflowsTypeFacade- Returns:
- list of ComposedTypes
-
setAttachmentTypeCodes
public void setAttachmentTypeCodes(java.util.Set<java.lang.String> attachmentTypeCodes)
-
getAttachmentTypeCodesForUser
protected java.util.Set<java.lang.String> getAttachmentTypeCodesForUser()
-
getAttachmentTypeCodes
public java.util.Set<java.lang.String> getAttachmentTypeCodes()
-
getTypeFacade
public com.hybris.cockpitng.dataaccess.facades.type.TypeFacade getTypeFacade()
-
setTypeFacade
public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
-
setTypeService
public void setTypeService(TypeService typeService)
-
getTypeService
public TypeService getTypeService()
-
setBackofficeTypeUtils
public void setBackofficeTypeUtils(com.hybris.cockpitng.util.type.BackofficeTypeUtils backofficeTypeUtils)
-
getBackofficeTypeUtils
public com.hybris.cockpitng.util.type.BackofficeTypeUtils getBackofficeTypeUtils()
-
getPermissionFacade
public com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade getPermissionFacade()
-
setPermissionFacade
public void setPermissionFacade(com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade permissionFacade)
-
-