Class ClassificationTypeLoader
- java.lang.Object
-
- de.hybris.platform.cockpit.services.meta.impl.AbstractTypeLoader
-
- de.hybris.platform.cockpit.services.meta.impl.ClassificationTypeLoader
-
- All Implemented Interfaces:
CachingTypeLoader
,ExtendedTypeLoader
public class ClassificationTypeLoader extends AbstractTypeLoader implements CachingTypeLoader
Type loader for classification types. Valid for typecode scheme '[Classification System ID]/[Version]/[Classification Class Code]' and property qualifier scheme '[Classification System ID]/[Version]/[Classification Class Code].[Classification Attribute Qualifier]'.
Example: SampleClassification/1.0/cpu.fsbSpeed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ClassificationTypeLoader.MyClassificationType
-
Constructor Summary
Constructors Constructor Description ClassificationTypeLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAttributeCodeFromPropertyQualifier(java.lang.String propertyQualifier)
Splits up a property qualifier and returns the attribute part of it.java.util.List<java.lang.Object>
getAvailableValues(TypeModel type, PropertyDescriptor propertyDescriptor, TypeService typeService)
Returns all possible values for the given property, e.g.protected ClassificationService
getClassificationService()
protected java.lang.String
getDefaultEditorType(ClassAttributeAssignment caa)
protected java.lang.String
getDefaultEditorType(AttributeDescriptorModel attributeDescriptor)
protected TypeCache
getExtendedTypeCache()
protected ExtendedType
getExtendedTypeCached(java.lang.String code)
java.util.Set<java.lang.String>
getExtendedTypeCodes(TypedObject item)
Returns the type codes of all extended types for the given item.java.util.Collection<ExtendedType>
getExtendedTypesForTemplate(ItemType type, java.lang.String templateCode, TypeService typeService)
Returns the extended types for a given template.protected PropertyDescriptorCodeResolver
getPropertyDescriptorCodeResolver()
protected SearchRestrictionService
getSearchRestrictionService()
protected SessionService
getSessionService()
java.lang.String
getTypeCodeFromPropertyQualifier(java.lang.String propertyQualifier)
Splits up a property qualifier and returns the type part of it.TypeModel
getValueType(ObjectType enclosingType, PropertyDescriptor propertyDescriptor, TypeService typeService)
Returns the value type for the given property descriptor.protected ExtendedType
loadClassificationType(java.lang.String code)
ExtendedType
loadType(java.lang.String code, TypeService typeService)
Returns an extended type for the given code.void
removeAllCachedTypes()
void
removeCachedType(java.lang.String code)
void
removeDefaultCachedTypes()
void
setClassificationService(ClassificationService classificationService)
void
setExtendedTypeCache(TypeCache typeCache)
void
setPropertyDescriptorCodeResolver(PropertyDescriptorCodeResolver propertyDescriptorCodeResolver)
void
setSearchRestrictionService(SearchRestrictionService searchRestrictionService)
void
setSessionService(SessionService sessionService)
-
Methods inherited from class de.hybris.platform.cockpit.services.meta.impl.AbstractTypeLoader
getModelService, getPropertyService, getTypeService, setCockpitPropertyService, setModelService, setTypeService
-
-
-
-
Method Detail
-
loadType
public ExtendedType loadType(java.lang.String code, TypeService typeService)
Description copied from interface:ExtendedTypeLoader
Returns an extended type for the given code.- Specified by:
loadType
in interfaceExtendedTypeLoader
- Parameters:
code
- The code of the desired typetypeService
- The cockpit type service- Returns:
- The extended type or null if none exists for the given code.
-
getValueType
public TypeModel getValueType(ObjectType enclosingType, PropertyDescriptor propertyDescriptor, TypeService typeService)
Description copied from interface:ExtendedTypeLoader
Returns the value type for the given property descriptor.- Specified by:
getValueType
in interfaceExtendedTypeLoader
- Overrides:
getValueType
in classAbstractTypeLoader
- Parameters:
enclosingType
- The type that owns the property- Returns:
- The value type or null if not handled by this type loader.
-
getAvailableValues
public java.util.List<java.lang.Object> getAvailableValues(TypeModel type, PropertyDescriptor propertyDescriptor, TypeService typeService)
Description copied from interface:ExtendedTypeLoader
Returns all possible values for the given property, e.g. all enumeration values if it's an enum.- Specified by:
getAvailableValues
in interfaceExtendedTypeLoader
- Overrides:
getAvailableValues
in classAbstractTypeLoader
- Parameters:
type
- The value type of the propertypropertyDescriptor
- The property.- Returns:
- The list of available values or null if not handled by this type loader.
-
getExtendedTypeCodes
public java.util.Set<java.lang.String> getExtendedTypeCodes(TypedObject item)
Description copied from interface:ExtendedTypeLoader
Returns the type codes of all extended types for the given item.- Specified by:
getExtendedTypeCodes
in interfaceExtendedTypeLoader
- Returns:
- The type codes or null if not handled by this type loader.
-
getAttributeCodeFromPropertyQualifier
public java.lang.String getAttributeCodeFromPropertyQualifier(java.lang.String propertyQualifier)
Description copied from interface:ExtendedTypeLoader
Splits up a property qualifier and returns the attribute part of it.- Specified by:
getAttributeCodeFromPropertyQualifier
in interfaceExtendedTypeLoader
- Overrides:
getAttributeCodeFromPropertyQualifier
in classAbstractTypeLoader
- Returns:
- the attribute code or null if not handled by this type loader.
-
getTypeCodeFromPropertyQualifier
public java.lang.String getTypeCodeFromPropertyQualifier(java.lang.String propertyQualifier)
Description copied from interface:ExtendedTypeLoader
Splits up a property qualifier and returns the type part of it.- Specified by:
getTypeCodeFromPropertyQualifier
in interfaceExtendedTypeLoader
- Overrides:
getTypeCodeFromPropertyQualifier
in classAbstractTypeLoader
- Returns:
- the type code or null if not handled by this type loader.
-
getDefaultEditorType
protected java.lang.String getDefaultEditorType(AttributeDescriptorModel attributeDescriptor)
-
getDefaultEditorType
protected java.lang.String getDefaultEditorType(ClassAttributeAssignment caa)
-
loadClassificationType
protected ExtendedType loadClassificationType(java.lang.String code)
-
getExtendedTypesForTemplate
public java.util.Collection<ExtendedType> getExtendedTypesForTemplate(ItemType type, java.lang.String templateCode, TypeService typeService)
Description copied from interface:ExtendedTypeLoader
Returns the extended types for a given template.- Specified by:
getExtendedTypesForTemplate
in interfaceExtendedTypeLoader
- Overrides:
getExtendedTypesForTemplate
in classAbstractTypeLoader
- Parameters:
type
- The item type of the template.templateCode
- The template code (without the type part, e.g. CPU for Product.CPU).- Returns:
- The extended types or null if not handled by this type loader.
-
setClassificationService
public void setClassificationService(ClassificationService classificationService)
-
getClassificationService
protected ClassificationService getClassificationService()
-
setExtendedTypeCache
public void setExtendedTypeCache(TypeCache typeCache)
-
getExtendedTypeCache
protected TypeCache getExtendedTypeCache()
-
getExtendedTypeCached
protected ExtendedType getExtendedTypeCached(java.lang.String code)
-
removeCachedType
public void removeCachedType(java.lang.String code)
- Specified by:
removeCachedType
in interfaceCachingTypeLoader
-
removeDefaultCachedTypes
public void removeDefaultCachedTypes()
- Specified by:
removeDefaultCachedTypes
in interfaceCachingTypeLoader
-
removeAllCachedTypes
public void removeAllCachedTypes()
- Specified by:
removeAllCachedTypes
in interfaceCachingTypeLoader
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getSessionService
protected SessionService getSessionService()
-
setSearchRestrictionService
public void setSearchRestrictionService(SearchRestrictionService searchRestrictionService)
-
getSearchRestrictionService
protected SearchRestrictionService getSearchRestrictionService()
-
getPropertyDescriptorCodeResolver
protected PropertyDescriptorCodeResolver getPropertyDescriptorCodeResolver()
- Returns:
- the propertyDescriptorCodeResolver
-
setPropertyDescriptorCodeResolver
public void setPropertyDescriptorCodeResolver(PropertyDescriptorCodeResolver propertyDescriptorCodeResolver)
-
-