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 java.lang.Object implements com.hybris.cockpitng.dataaccess.facades.type.TypeFacadeStrategy, com.hybris.cockpitng.core.util.Resettable
-
-
Constructor Summary
Constructors Constructor Description DefaultPlatformTypeFacadeStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandle(java.lang.String typeCode)com.hybris.cockpitng.dataaccess.facades.type.DataTypeconvertType(TypeModel platformType, boolean lightWeight)com.hybris.cockpitng.dataaccess.facades.type.DataTypeconvertType(TypeModel platformType, boolean lightWeight, com.hybris.cockpitng.dataaccess.context.Context context)protected com.hybris.cockpitng.dataaccess.facades.type.DataType.BuildercreateCollectionTypeBuilder(java.lang.String typeCode)protected com.hybris.cockpitng.dataaccess.facades.type.MapDataType.MapBuildercreateMapTypeBuilder(java.lang.String typeCode)protected com.hybris.cockpitng.dataaccess.facades.type.DataType.BuildercreateTypeBuilder(java.lang.String typeCode)com.hybris.cockpitng.dataaccess.facades.type.DataAttributegetAttribute(java.lang.Object object, java.lang.String attributeQualifier)java.lang.StringgetAttributeDescription(java.lang.String type, java.lang.String qualifier)java.lang.StringgetAttributeDescription(java.lang.String type, java.lang.String qualifier, java.util.Locale locale)protected java.util.Set<java.lang.String>getBlacklistedAttributes(java.util.Set<java.lang.String> typeCodeHierarchy)com.hybris.cockpitng.i18n.CockpitLocaleServicegetCockpitLocaleService()java.util.List<java.lang.String>getDynamicTypesBlacklist()ModelServicegetModelService()protected AttributeExpressionResolverFactorygetResolverFactory()java.lang.StringgetType(java.lang.Object object)java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>getTypeAttributesBlackList()protected java.util.Set<java.lang.String>getTypeHierarchy(ComposedTypeModel typeModel)protected TypeServicegetTypeService()VariantsServicegetVariantsService()voidinit()protected booleanisOrdered(AttributeDescriptorModel attributeDescriptorModel)com.hybris.cockpitng.dataaccess.facades.type.DataTypeload(java.lang.String code)com.hybris.cockpitng.dataaccess.facades.type.DataTypeload(java.lang.String code, com.hybris.cockpitng.dataaccess.context.Context ctx)protected com.hybris.cockpitng.dataaccess.facades.type.DataTypeloadAndCache(java.lang.String code, com.hybris.cockpitng.dataaccess.context.Context context, boolean lightWeight)voidreset()voidsetCockpitLocaleService(com.hybris.cockpitng.i18n.CockpitLocaleService cockpitLocaleService)voidsetDynamicTypesBlacklist(java.util.List<java.lang.String> dynamicTypesBlacklist)voidsetI18nService(I18NService i18nService)voidsetModelService(ModelService modelService)voidsetPlatformFacadeStrategyHandleCache(PlatformFacadeStrategyHandleCache platformFacadeStrategyHandleCache)voidsetResolverFactory(AttributeExpressionResolverFactory resolverFactory)voidsetTypeAttributesBlackList(java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> typeAttributesBlackList)voidsetTypeService(TypeService typeService)voidsetVariantsService(VariantsService variantsService)
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
load
public com.hybris.cockpitng.dataaccess.facades.type.DataType load(java.lang.String code) throws com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException- Specified by:
loadin interfacecom.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(java.lang.String code, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException- Specified by:
loadin interfacecom.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(java.lang.String code, com.hybris.cockpitng.dataaccess.context.Context context, boolean lightWeight) throws com.hybris.cockpitng.dataaccess.facades.type.exceptions.TypeNotFoundException- Parameters:
code- type codecontext- generic contextlightWeight- 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(java.lang.String typeCode)
-
createCollectionTypeBuilder
protected com.hybris.cockpitng.dataaccess.facades.type.DataType.Builder createCollectionTypeBuilder(java.lang.String typeCode)
-
createMapTypeBuilder
protected com.hybris.cockpitng.dataaccess.facades.type.MapDataType.MapBuilder createMapTypeBuilder(java.lang.String typeCode)
-
getTypeHierarchy
protected java.util.Set<java.lang.String> getTypeHierarchy(ComposedTypeModel typeModel)
-
getBlacklistedAttributes
protected java.util.Set<java.lang.String> getBlacklistedAttributes(java.util.Set<java.lang.String> typeCodeHierarchy)
-
isOrdered
protected boolean isOrdered(AttributeDescriptorModel attributeDescriptorModel)
-
canHandle
public boolean canHandle(java.lang.String typeCode)
- Specified by:
canHandlein interfacecom.hybris.cockpitng.dataaccess.facades.type.TypeFacadeStrategy
-
getType
public java.lang.String getType(java.lang.Object object)
- Specified by:
getTypein interfacecom.hybris.cockpitng.dataaccess.facades.type.TypeFacade
-
getAttribute
public com.hybris.cockpitng.dataaccess.facades.type.DataAttribute getAttribute(java.lang.Object object, java.lang.String attributeQualifier)- Specified by:
getAttributein interfacecom.hybris.cockpitng.dataaccess.facades.type.TypeFacade
-
getAttributeDescription
public java.lang.String getAttributeDescription(java.lang.String type, java.lang.String qualifier)- Specified by:
getAttributeDescriptionin interfacecom.hybris.cockpitng.dataaccess.facades.type.TypeFacade
-
getAttributeDescription
public java.lang.String getAttributeDescription(java.lang.String type, java.lang.String qualifier, java.util.Locale locale)- Specified by:
getAttributeDescriptionin interfacecom.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
public void setI18nService(I18NService i18nService)
-
setPlatformFacadeStrategyHandleCache
public void setPlatformFacadeStrategyHandleCache(PlatformFacadeStrategyHandleCache platformFacadeStrategyHandleCache)
-
reset
public void reset()
- Specified by:
resetin interfacecom.hybris.cockpitng.core.util.Resettable
-
getDynamicTypesBlacklist
public java.util.List<java.lang.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(java.util.List<java.lang.String> dynamicTypesBlacklist)
-
getTypeAttributesBlackList
public java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getTypeAttributesBlackList()
-
setTypeAttributesBlackList
public void setTypeAttributesBlackList(java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> typeAttributesBlackList)
-
getResolverFactory
protected AttributeExpressionResolverFactory getResolverFactory()
-
setResolverFactory
public void setResolverFactory(AttributeExpressionResolverFactory resolverFactory)
-
getVariantsService
public VariantsService getVariantsService()
-
setVariantsService
public void setVariantsService(VariantsService variantsService)
-
getCockpitLocaleService
public com.hybris.cockpitng.i18n.CockpitLocaleService getCockpitLocaleService()
-
setCockpitLocaleService
public void setCockpitLocaleService(com.hybris.cockpitng.i18n.CockpitLocaleService cockpitLocaleService)
-
-