java.lang.Object
de.hybris.platform.datahubbackoffice.dataaccess.metadata.impl.UniqueTypeService
All Implemented Interfaces:
DataHubTypeService

public class UniqueTypeService extends Object implements DataHubTypeService
This service ensures uniqueness of the DataHub types within a backoffice application.
  • Constructor Details

    • UniqueTypeService

      public UniqueTypeService(DataHubTypeService service)
      Default constructor.
      Parameters:
      service - The DataHubTypeService
  • Method Details

    • exists

      public boolean exists(String code)
      Description copied from interface: DataHubTypeService
      Determines whether a canonical type matching the specified type code exists in a DataHub.
      Specified by:
      exists in interface DataHubTypeService
      Parameters:
      code - a type code to check.
      Returns:
      true, if the type exists; false, otherwise.
    • getAllTypeCodes

      public Collection<String> getAllTypeCodes()
      Description copied from interface: DataHubTypeService
      Retrieves codes of all types defined in a DataHub.
      Specified by:
      getAllTypeCodes in interface DataHubTypeService
      Returns:
      a collection of all type codes existing in a DataHub.
    • getType

      public com.hybris.cockpitng.dataaccess.facades.type.DataType getType(String code)
      Description copied from interface: DataHubTypeService
      Retrieves definition of a data type.
      Specified by:
      getType in interface DataHubTypeService
      Parameters:
      code - type code for the data type to retrieve.
      Returns:
      details about how the type is defined or null, if the type does not exist.
    • deriveTypeCode

      public String deriveTypeCode(com.hybris.datahub.dto.item.ItemData item)
      Description copied from interface: DataHubTypeService
      Determines type of the specified item.
      Specified by:
      deriveTypeCode in interface DataHubTypeService
      Parameters:
      item - an item to determine type of.
      Returns:
      code of the item's type.