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

public class CanonicalTypeService extends Object implements DataHubTypeService
A simple implementation of the type service, which retrieves all data type related information from a DataHub via a REST API.
  • Constructor Details

    • CanonicalTypeService

      public CanonicalTypeService()
  • 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.
    • setDataHubServerContextService

      public void setDataHubServerContextService(DataHubServerContextService dataHubServerContextService)
    • setClient

      public void setClient(com.hybris.datahub.client.CanonicalItemClassClient cl)
      Injects a REST client for this service.
      Parameters:
      cl - a client to use with this service.