Class DefaultTypeService
java.lang.Object
de.hybris.platform.cockpit.services.meta.impl.DefaultTypeService
- All Implemented Interfaces:
TypeService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected classprotected classprotected class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddBaseTypePropertyToCache(String qualifier, PropertyDescriptor propDesc) protected voidaddToCache(ObjectType type) booleancheckItemAlive(TypedObject typedItem) Check item alive.voidclear()intCount all instances of the given typegetAllInstancesOf(ObjectType type) Gets all instances of the given type.getAllInstancesOf(ObjectType type, String sortBy, String sortOrder) Gets all instances of the given type according to given sort criteria.getAllSubtypes(ObjectType type) Gets the all subtypes.getAllSupertypes(ObjectType type) Gets the all supertypes.getAttributeCodeFromPropertyQualifier(String propertyQualifier) Gets the attribute code from property qualifier.getAvailableValues(PropertyDescriptor propertyDescriptor) Gets the available values.getAvailableValues(PropertyDescriptor propertyDescriptor, TypedObject object) Gets the available values.getBaseType(String code) Gets the base type.protected TypeCacheprotected BaseTypegetBaseTypeCached(String code) protected PropertyCacheprotected PropertyDescriptorgetBaseTypePropertyCached(String qualifier) getBestTemplate(TypedObject object) Gets the best template.protected Stringprotected StringgetDefaultEditorType(AttributeDescriptorModel attributeDescriptorModel) protected StringgetDefaultEditorType(TypeModel type, boolean localized) getExtendedType(String code) Gets the extended type.protected TypeCacheprotected ExtendedTypegetExtendedTypeCached(String code) protected InvalidationListenerprotected ModelServicegetObjectTemplate(String code) Gets the object template.protected TypeCacheprotected ObjectTemplategetObjectTemplates(BaseType type) Gets the object templates.getObjectType(String code) Gets the object type.getObjectTypeFromPropertyQualifier(String propertyQualifier) Gets the object type from property qualifier.getPropertyDescriptor(ObjectType type, String qualifier) Gets the property descriptor.getPropertyDescriptor(String propertyQualifier) Gets the property descriptor.protected PropertyDescriptorCodeResolvergetReverseSelectionOf(PropertyDescriptor descriptor) returns the list of all property descriptors that the give property descriptor is "selectionOf"getSelectionOf(PropertyDescriptor descriptor) returns the "selectionOf" property of the given property descriptorgetTypeCodeFromPropertyQualifier(String propertyQualifier) The type (base or extended) part of the property qualifier.protected TypeServiceprotected TypeModelgetValueType(PropertyDescriptor propertyDescriptor) getValueTypeCode(PropertyDescriptor propertyDescriptor) Gets the value type code.voidinit()protected ClassificationTypeloadClassificationType(String code) protected ObjectTemplateloadItemTemplate(String code) protected ItemTypeloadItemType(String code) protected WidgetTypeloadWidgetType(String code) protected StringresolveClassificationPropertyPath(String code, String classificationAttributeCode) voidsetBaseTypeCache(TypeCache typeCache) voidsetBaseTypePropertyCache(PropertyCache propCache) voidsetExtendedTypeCache(TypeCache typeCache) voidsetModelService(ModelService modelService) voidsetObjectTemplateCache(TypeCache typeCache) voidsetTypeService(TypeService typeService) unwrapItems(Collection<TypedObject> typedObjects) Unwrap items to modelsWrap item.wrapItems(Collection<? extends Object> itemObjects) Wrap items.
-
Constructor Details
-
DefaultTypeService
public DefaultTypeService()
-
-
Method Details
-
checkItemAlive
Description copied from interface:TypeServiceCheck item alive.- Specified by:
checkItemAlivein interfaceTypeService- Parameters:
typedItem- the typed item- Returns:
- true, if successful
-
countAllInstancesOf
Description copied from interface:TypeServiceCount all instances of the given type- Specified by:
countAllInstancesOfin interfaceTypeService- Parameters:
type- the type- Returns:
- the number of instances or -1 if there was an error
-
getAllInstancesOf
Description copied from interface:TypeServiceGets all instances of the given type. Keep in mind that this can be very expensive, so useTypeService.countAllInstancesOf(ObjectType)before calling this method- Specified by:
getAllInstancesOfin interfaceTypeService- Parameters:
type- the type- Returns:
- the instances of the given type
-
getAllInstancesOf
Description copied from interface:TypeServiceGets all instances of the given type according to given sort criteria. Keep in mind that this can be very expensive, so useTypeService.countAllInstancesOf(ObjectType)before calling this method- Specified by:
getAllInstancesOfin interfaceTypeService- Parameters:
type- the typesortBy- given sort propertysortOrder- given sort order- Returns:
- the instances of the given type
-
clear
public void clear() -
getAllSubtypes
Description copied from interface:TypeServiceGets the all subtypes.- Specified by:
getAllSubtypesin interfaceTypeService- Parameters:
type- the type- Returns:
- the all subtypes
-
getAllSupertypes
Description copied from interface:TypeServiceGets the all supertypes.- Specified by:
getAllSupertypesin interfaceTypeService- Parameters:
type- the type- Returns:
- the all supertypes
-
getAttributeCodeFromPropertyQualifier
Description copied from interface:TypeServiceGets the attribute code from property qualifier.- Specified by:
getAttributeCodeFromPropertyQualifierin interfaceTypeService- Parameters:
propertyQualifier- the property qualifier- Returns:
- the attribute code from property qualifier
-
getAvailableValues
Description copied from interface:TypeServiceGets the available values.- Specified by:
getAvailableValuesin interfaceTypeService- Parameters:
propertyDescriptor- the property descriptor- Returns:
- the available values
-
getAvailableValues
Description copied from interface:TypeServiceGets the available values.- Specified by:
getAvailableValuesin interfaceTypeService- Parameters:
propertyDescriptor- the property descriptor- Returns:
- the available values
-
getBaseType
Description copied from interface:TypeServiceGets the base type.- Specified by:
getBaseTypein interfaceTypeService- Parameters:
code- the code- Returns:
- the base type
-
getBestTemplate
Description copied from interface:TypeServiceGets the best template.- Specified by:
getBestTemplatein interfaceTypeService- Parameters:
object- the object- Returns:
- the best template
-
getExtendedType
Description copied from interface:TypeServiceGets the extended type.- Specified by:
getExtendedTypein interfaceTypeService- Parameters:
code- the code- Returns:
- the extended type
-
getObjectTemplate
Description copied from interface:TypeServiceGets the object template.- Specified by:
getObjectTemplatein interfaceTypeService- Parameters:
code- the code- Returns:
- the object template
-
getObjectTemplates
Description copied from interface:TypeServiceGets the object templates.- Specified by:
getObjectTemplatesin interfaceTypeService- Parameters:
type- the type- Returns:
- the object templates
-
getObjectType
Description copied from interface:TypeServiceGets the object type.- Specified by:
getObjectTypein interfaceTypeService- Parameters:
code- the code- Returns:
- the object type
-
getObjectTypeFromPropertyQualifier
Description copied from interface:TypeServiceGets the object type from property qualifier.- Specified by:
getObjectTypeFromPropertyQualifierin interfaceTypeService- Parameters:
propertyQualifier- the property qualifier- Returns:
- the object type from property qualifier
-
getPropertyDescriptor
Description copied from interface:TypeServiceGets the property descriptor.- Specified by:
getPropertyDescriptorin interfaceTypeService- Parameters:
type- the typequalifier- the qualifier- Returns:
- the property descriptor
-
getPropertyDescriptor
Description copied from interface:TypeServiceGets the property descriptor.- Specified by:
getPropertyDescriptorin interfaceTypeService- Parameters:
propertyQualifier- the property qualifier- Returns:
- the property descriptor
-
getTypeCodeFromPropertyQualifier
Description copied from interface:TypeServiceThe type (base or extended) part of the property qualifier. (E.g. having qualifier "Product.code" this returns "Product".)- Specified by:
getTypeCodeFromPropertyQualifierin interfaceTypeService- Parameters:
propertyQualifier- the property qualifier- Returns:
- the type code from property qualifier
-
getValueTypeCode
Description copied from interface:TypeServiceGets the value type code.- Specified by:
getValueTypeCodein interfaceTypeService- Parameters:
propertyDescriptor- the property descriptor- Returns:
- the value type code
-
init
public void init() -
setBaseTypeCache
-
setBaseTypePropertyCache
-
setExtendedTypeCache
-
setModelService
-
setObjectTemplateCache
-
setTypeService
-
wrapItem
Description copied from interface:TypeServiceWrap item.- Specified by:
wrapItemin interfaceTypeService- Parameters:
itemObject- the item- Returns:
- the typed object
-
wrapItems
Description copied from interface:TypeServiceWrap items.- Specified by:
wrapItemsin interfaceTypeService- Parameters:
itemObjects- the items- Returns:
- the list< typed object>
-
unwrapItems
Description copied from interface:TypeServiceUnwrap items to models- Specified by:
unwrapItemsin interfaceTypeService- Returns:
- the list of ItemModel items
-
addToCache
-
getBaseTypeCache
-
getBaseTypeCached
-
addBaseTypePropertyToCache
-
getBaseTypePropertyCache
-
getBaseTypePropertyCached
-
getDefaultEditorType
-
getDefaultEditorType
-
getDefaultEditorType
-
getExtendedTypeCache
-
getExtendedTypeCached
-
getItemInvalidationListener
-
getModelService
-
getObjectTemplateCache
-
getObjectTemplateCached
-
getTypeService
-
getValueType
-
loadClassificationType
-
resolveClassificationPropertyPath
-
loadWidgetType
-
loadItemTemplate
-
loadItemType
-
getSelectionOf
Description copied from interface:TypeServicereturns the "selectionOf" property of the given property descriptor- Specified by:
getSelectionOfin interfaceTypeService- Parameters:
descriptor- the source property descriptor- Returns:
- the "selectionOf" property of the given property descriptor
-
getReverseSelectionOf
Description copied from interface:TypeServicereturns the list of all property descriptors that the give property descriptor is "selectionOf"- Specified by:
getReverseSelectionOfin interfaceTypeService- Parameters:
descriptor- the source property descriptor- Returns:
- the list of all property descriptors that the give property descriptor is "selectionOf"
-
getPropertyDescriptorCodeResolver
-