Class ExtensibleTypeService
java.lang.Object
de.hybris.platform.cockpit.services.meta.impl.ExtensibleTypeService
- All Implemented Interfaces:
TypeService
Implementation of
TypeService that allows one to set an ExtendedTypeLoader to load extended types,
which is usually a spring-configured instance of DefaultExtendedTypeChain.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected classprotected class -
Field Summary
Fields -
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 typeprotected CockpitItemTemplateModelfetchItemTemplate(ComposedTypeModel composedType, String templateCode) Deprecated.since 6.3getAllInstancesOf(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.protected Collection<TypedObject>getAllInstancesOf(String typecode) 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 StringgetDefaultEditorType(AttributeDescriptorModel attributeDescriptor) getExtendedType(String code) Gets the extended type.protected ExtendedTypeLoaderprotected 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 PropertyServicegetReverseSelectionOf(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 ObjectTemplateloadItemTemplate(String code) protected ItemTypeloadItemType(String code) voidsetBaseTypeCache(TypeCache typeCache) voidsetBaseTypePropertyCache(PropertyCache propCache) voidsetExtendedTypeChain(ExtendedTypeLoader extendedTypeChain) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetModelService(ModelService modelService) voidsetObjectTemplateCache(TypeCache typeCache) voidsetPropertyService(PropertyService propertyService) voidsetTypeService(TypeService typeService) unwrapItems(Collection<TypedObject> typedObjects) Unwrap items to modelsWrap item.wrapItems(Collection<? extends Object> itemObjects) Wrap items.
-
Field Details
-
usedInSelectionOf
-
-
Constructor Details
-
ExtensibleTypeService
public ExtensibleTypeService()
-
-
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
-
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
-
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
-
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
-
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
-
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
-
getModelService
-
getObjectTemplateCache
-
getObjectTemplateCached
-
getTypeService
-
getValueType
-
fetchItemTemplate
@Deprecated protected CockpitItemTemplateModel fetchItemTemplate(ComposedTypeModel composedType, String templateCode) Deprecated.since 6.3Don't use this method, it's only there for "stubbing" it in the test and will be removed when there is a slayer replacement forCockpitManager.getCockpitItemTemplate(ComposedType, String). -
loadItemTemplate
-
loadItemType
-
getDefaultEditorType
-
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"
-
setPropertyService
-
getPropertyService
-
setFlexibleSearchService
-
getFlexibleSearchService
-
setExtendedTypeChain
-
getExtendedTypeChain
-