Class DefaultPlatformTypeFacadeStrategy

java.lang.Object
com.hybris.backoffice.cockpitng.dataaccess.facades.type.DefaultPlatformTypeFacadeStrategy
All Implemented Interfaces:
com.hybris.cockpitng.core.util.Resettable, com.hybris.cockpitng.dataaccess.facades.type.TypeFacade, com.hybris.cockpitng.dataaccess.facades.type.TypeFacadeStrategy
Direct Known Subclasses:
CustomerTypeFacadeStrategy, TicketTypeFacadeStrategy

public class DefaultPlatformTypeFacadeStrategy extends Object implements com.hybris.cockpitng.dataaccess.facades.type.TypeFacadeStrategy, com.hybris.cockpitng.core.util.Resettable
  • Constructor Details

    • DefaultPlatformTypeFacadeStrategy

      public DefaultPlatformTypeFacadeStrategy()
  • Method Details

    • init

      @PostConstruct public void init()
    • load

      public com.hybris.cockpitng.dataaccess.facades.type.DataType load(String code) throws com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException
      Specified by:
      load in interface com.hybris.cockpitng.dataaccess.facades.type.TypeFacade
      Throws:
      com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException
    • load

      public com.hybris.cockpitng.dataaccess.facades.type.DataType load(String code, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException
      Specified by:
      load in interface com.hybris.cockpitng.dataaccess.facades.type.TypeFacade
      Throws:
      com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException
    • loadAndCache

      protected com.hybris.cockpitng.dataaccess.facades.type.DataType loadAndCache(String code, com.hybris.cockpitng.dataaccess.context.Context context, boolean lightWeight) throws com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException
      Parameters:
      code - type code
      context - generic context
      lightWeight - if true only the type's definition is loaded, no reference types etc must be loaded at this point
      Returns:
      The (possibly) cached type.
      Throws:
      com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException - throw when the given type cannot be found
    • convertType

      public com.hybris.cockpitng.dataaccess.facades.type.DataType convertType(TypeModel platformType, boolean lightWeight)
    • convertType

      public com.hybris.cockpitng.dataaccess.facades.type.DataType convertType(TypeModel platformType, boolean lightWeight, com.hybris.cockpitng.dataaccess.context.Context context)
    • createTypeBuilder

      protected com.hybris.cockpitng.dataaccess.facades.type.DataType.Builder createTypeBuilder(String typeCode)
    • createCollectionTypeBuilder

      @Deprecated(since="2005", forRemoval=true) protected com.hybris.cockpitng.dataaccess.facades.type.DataType.Builder createCollectionTypeBuilder(String typeCode)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createCollectionTypeBuilder

      protected com.hybris.cockpitng.dataaccess.facades.type.DataType.Builder createCollectionTypeBuilder(String typeCode, TypeOfCollectionEnum typeOfCollection)
    • convertPlatformCollectionTypeToDatatypeType

      protected com.hybris.cockpitng.dataaccess.facades.type.DataType.Type convertPlatformCollectionTypeToDatatypeType(TypeOfCollectionEnum typeOfCollection)
    • createMapTypeBuilder

      protected com.hybris.cockpitng.dataaccess.facades.type.MapDataType.MapBuilder createMapTypeBuilder(String typeCode)
    • getTypeHierarchy

      protected Set<String> getTypeHierarchy(ComposedTypeModel typeModel)
    • getBlacklistedAttributes

      protected Set<String> getBlacklistedAttributes(Set<String> typeCodeHierarchy)
    • convertAttribute

      protected com.hybris.cockpitng.dataaccess.facades.type.DataAttribute convertAttribute(AttributeDescriptorModel attributeDescriptorModel) throws com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException
      Throws:
      com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException
    • isWritable

      protected boolean isWritable(AttributeDescriptorModel attributeDescriptorModel)
    • isWritableOnCreation

      protected boolean isWritableOnCreation(AttributeDescriptorModel attributeDescriptorModel)
    • isOrdered

      protected boolean isOrdered(AttributeDescriptorModel attributeDescriptorModel)
    • canHandle

      public boolean canHandle(String typeCode)
      Specified by:
      canHandle in interface com.hybris.cockpitng.dataaccess.facades.type.TypeFacadeStrategy
    • getType

      public String getType(Object object)
      Specified by:
      getType in interface com.hybris.cockpitng.dataaccess.facades.type.TypeFacade
    • getAttribute

      public com.hybris.cockpitng.dataaccess.facades.type.DataAttribute getAttribute(Object object, String attributeQualifier)
      Specified by:
      getAttribute in interface com.hybris.cockpitng.dataaccess.facades.type.TypeFacade
    • getAttributeDescription

      public String getAttributeDescription(String type, String qualifier)
      Specified by:
      getAttributeDescription in interface com.hybris.cockpitng.dataaccess.facades.type.TypeFacade
    • getAttributeDescription

      public String getAttributeDescription(String type, String qualifier, Locale locale)
      Specified by:
      getAttributeDescription in interface com.hybris.cockpitng.dataaccess.facades.type.TypeFacade
    • getModelService

      public ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)
    • getTypeService

      protected TypeService getTypeService()
    • setTypeService

      public void setTypeService(TypeService typeService)
    • setI18nService

      @Deprecated(since="2005", forRemoval=true) public void setI18nService(I18NService i18nService)
      Deprecated, for removal: This API element is subject to removal in a future version.
      not used anymore
      Parameters:
      i18nService - i18n service
    • setPlatformFacadeStrategyHandleCache

      public void setPlatformFacadeStrategyHandleCache(PlatformFacadeStrategyHandleCache platformFacadeStrategyHandleCache)
    • reset

      public void reset()
      Specified by:
      reset in interface com.hybris.cockpitng.core.util.Resettable
    • getDynamicTypesBlacklist

      public List<String> getDynamicTypesBlacklist()
      Returns:
      a collection ('black list') of type names that are NOT going to be cached since are considered to be dynamic (may change in the runtime)
    • setDynamicTypesBlacklist

      public void setDynamicTypesBlacklist(List<String> dynamicTypesBlacklist)
    • getTypeAttributesBlackList

      public Map<String,Collection<String>> getTypeAttributesBlackList()
    • setTypeAttributesBlackList

      public void setTypeAttributesBlackList(Map<String,Collection<String>> typeAttributesBlackList)
    • getResolverFactory

      protected AttributeExpressionResolverFactory getResolverFactory()
    • setResolverFactory

      public void setResolverFactory(AttributeExpressionResolverFactory resolverFactory)
    • getVariantsService

      public VariantsService getVariantsService()
    • setVariantsService

      public void setVariantsService(VariantsService variantsService)
    • getTypeSystemLocalizationHelper

      protected TypeSystemLocalizationHelper getTypeSystemLocalizationHelper()
    • setTypeSystemLocalizationHelper

      public void setTypeSystemLocalizationHelper(TypeSystemLocalizationHelper typeSystemLocalizationHelper)
    • getCockpitLocaleService

      @Deprecated(since="2005", forRemoval=true) public com.hybris.cockpitng.i18n.CockpitLocaleService getCockpitLocaleService()
      Deprecated, for removal: This API element is subject to removal in a future version.
      not used anymore
      Returns:
      locale service
    • setCockpitLocaleService

      @Deprecated(since="2005", forRemoval=true) public void setCockpitLocaleService(com.hybris.cockpitng.i18n.CockpitLocaleService cockpitLocaleService)
      Deprecated, for removal: This API element is subject to removal in a future version.
      not used anymore
      Parameters:
      cockpitLocaleService - locale service