Class DefaultWorkflowsTypeFacade

java.lang.Object
com.hybris.backoffice.workflow.impl.DefaultWorkflowsTypeFacade
All Implemented Interfaces:
WorkflowsTypeFacade

public class DefaultWorkflowsTypeFacade extends Object implements WorkflowsTypeFacade
Default implementation which returns supported attachment types based on attachmentTypeCodes
  • Constructor Details

    • DefaultWorkflowsTypeFacade

      public DefaultWorkflowsTypeFacade()
  • Method Details

    • findCommonAttachmentType

      public Optional<ComposedTypeModel> findCommonAttachmentType(List<ItemModel> attachments)
      Description copied from interface: WorkflowsTypeFacade
      Finds common attachment type - gets common super type of given items and checks if it can be assigned to one of defined supported types WorkflowsTypeFacade.getSupportedAttachmentTypeCodes().
      Specified by:
      findCommonAttachmentType in interface WorkflowsTypeFacade
      Parameters:
      attachments - list of items to be added as attachments.
      Returns:
      supported attachment type - one of WorkflowsTypeFacade.getSupportedAttachmentTypeCodes().
    • getClosestSupportedType

      protected Optional<ComposedTypeModel> getClosestSupportedType(String attachmentTypeCode)
    • getSupportedAttachmentClassNames

      public List<String> getSupportedAttachmentClassNames()
      Description copied from interface: WorkflowsTypeFacade
      Based on configuration returns supported attachment classes names for current user.
      Specified by:
      getSupportedAttachmentClassNames in interface WorkflowsTypeFacade
      Returns:
      list of attachments class names.
    • getAllAttachmentClassNames

      public List<String> getAllAttachmentClassNames()
      Description copied from interface: WorkflowsTypeFacade
      Based on configuration returns all supported attachment class names as opposed to WorkflowsTypeFacade.getSupportedAttachmentClassNames()
      Specified by:
      getAllAttachmentClassNames in interface WorkflowsTypeFacade
      Returns:
      list of attachments class names.
    • toClassNames

      protected List<String> toClassNames(Set<String> typeCodes)
    • getSupportedAttachmentTypeCodes

      public List<String> getSupportedAttachmentTypeCodes()
      Description copied from interface: WorkflowsTypeFacade
      Based on configuration returns supported type codes for current user.
      Specified by:
      getSupportedAttachmentTypeCodes in interface WorkflowsTypeFacade
      Returns:
      list of type codes.
    • getSupportedAttachmentTypes

      public List<ComposedTypeModel> getSupportedAttachmentTypes()
      Description copied from interface: WorkflowsTypeFacade
      Based on configuration returns supported ComposedTypes for current user, but excluding blacklisted ComposedTypes for UI. (e.g. Audit Report Data can be added as a attachment in automated process, but it shouldn't be able to add from UI.
      Specified by:
      getSupportedAttachmentTypes in interface WorkflowsTypeFacade
      Returns:
      list of ComposedTypes
    • getAttachmentTypeCodesForUser

      protected Set<String> getAttachmentTypeCodesForUser()
    • getAttachmentTypeCodes

      public Set<String> getAttachmentTypeCodes()
    • setAttachmentTypeCodes

      public void setAttachmentTypeCodes(Set<String> attachmentTypeCodes)
    • getTypeFacade

      public com.hybris.cockpitng.dataaccess.facades.type.TypeFacade getTypeFacade()
    • setTypeFacade

      public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
    • getTypeService

      public TypeService getTypeService()
    • setTypeService

      public void setTypeService(TypeService typeService)
    • getBackofficeTypeUtils

      public com.hybris.cockpitng.util.type.BackofficeTypeUtils getBackofficeTypeUtils()
    • setBackofficeTypeUtils

      public void setBackofficeTypeUtils(com.hybris.cockpitng.util.type.BackofficeTypeUtils backofficeTypeUtils)
    • getPermissionFacade

      public com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade getPermissionFacade()
    • setPermissionFacade

      public void setPermissionFacade(com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade permissionFacade)
    • getUiBlacklistedAttachmentTypeCodes

      public Set<String> getUiBlacklistedAttachmentTypeCodes()
    • setUiBlacklistedAttachmentTypeCodes

      public void setUiBlacklistedAttachmentTypeCodes(Set<String> uiBlacklistedAttachmentTypeCodes)