Interface TypeService
- All Known Implementing Classes:
DefaultTypeService,ExtensibleTypeService
public interface TypeService
The Interface TypeService.
- Spring Bean ID:
- cockpitTypeService
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckItemAlive(TypedObject typedItem) Check item alive.intCount all instances of the given typegetAllInstancesOf(ObjectType type) Gets all instances of the given type.getAllInstancesOf(ObjectType type, String sortBy, String ascending) 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.getBestTemplate(TypedObject object) Gets the best template.getExtendedType(String code) Gets the extended type.getObjectTemplate(String code) Gets the object template.getObjectTemplates(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.getReverseSelectionOf(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.getValueTypeCode(PropertyDescriptor propertyDescriptor) Gets the value type code.unwrapItems(Collection<TypedObject> typedObjects) Unwrap items to modelsWrap item.wrapItems(Collection<? extends Object> items) Wrap items.
-
Method Details
-
getBaseType
Gets the base type.- Parameters:
code- the code- Returns:
- the base type
-
getExtendedType
Gets the extended type.- Parameters:
code- the code- Returns:
- the extended type
-
getObjectTemplate
Gets the object template.- Parameters:
code- the code- Returns:
- the object template
-
getAllSubtypes
Gets the all subtypes.- Parameters:
type- the type- Returns:
- the all subtypes
-
getAllSupertypes
Gets the all supertypes.- Parameters:
type- the type- Returns:
- the all supertypes
-
getObjectTemplates
Gets the object templates.- Parameters:
type- the type- Returns:
- the object templates
-
getPropertyDescriptor
Gets the property descriptor.- Parameters:
type- the typequalifier- the qualifier- Returns:
- the property descriptor
-
getObjectType
Gets the object type.- Parameters:
code- the code- Returns:
- the object type
-
getTypeCodeFromPropertyQualifier
The type (base or extended) part of the property qualifier. (E.g. having qualifier "Product.code" this returns "Product".)- Parameters:
propertyQualifier- the property qualifier- Returns:
- the type code from property qualifier
-
getAttributeCodeFromPropertyQualifier
Gets the attribute code from property qualifier.- Parameters:
propertyQualifier- the property qualifier- Returns:
- the attribute code from property qualifier
-
getObjectTypeFromPropertyQualifier
Gets the object type from property qualifier.- Parameters:
propertyQualifier- the property qualifier- Returns:
- the object type from property qualifier
-
getPropertyDescriptor
Gets the property descriptor.- Parameters:
propertyQualifier- the property qualifier- Returns:
- the property descriptor
-
getValueTypeCode
Gets the value type code.- Parameters:
propertyDescriptor- the property descriptor- Returns:
- the value type code
-
getAvailableValues
Gets the available values.- Parameters:
propertyDescriptor- the property descriptor- Returns:
- the available values
-
getAvailableValues
Gets the available values.- Parameters:
propertyDescriptor- the property descriptor- Returns:
- the available values
-
wrapItem
Wrap item.- Parameters:
item- the item- Returns:
- the typed object
-
wrapItems
Wrap items.- Parameters:
items- the items- Returns:
- the list< typed object>
-
unwrapItems
Unwrap items to models- Parameters:
typedObjects-- Returns:
- the list of ItemModel items
-
getBestTemplate
Gets the best template.- Parameters:
object- the object- Returns:
- the best template
-
checkItemAlive
Check item alive.- Parameters:
typedItem- the typed item- Returns:
- true, if successful
-
getAllInstancesOf
Gets all instances of the given type. Keep in mind that this can be very expensive, so usecountAllInstancesOf(ObjectType)before calling this method- Parameters:
type- the type- Returns:
- the instances of the given type
-
getAllInstancesOf
Gets all instances of the given type according to given sort criteria. Keep in mind that this can be very expensive, so usecountAllInstancesOf(ObjectType)before calling this method- Parameters:
type- the typesortBy- given sort propertyascending- given sort order- Returns:
- the instances of the given type
-
countAllInstancesOf
Count all instances of the given type- Parameters:
type- the type- Returns:
- the number of instances or -1 if there was an error
-
getSelectionOf
returns the "selectionOf" property of the given property descriptor- Parameters:
descriptor- the source property descriptor- Returns:
- the "selectionOf" property of the given property descriptor
-
getReverseSelectionOf
returns the list of all property descriptors that the give property descriptor is "selectionOf"- Parameters:
descriptor- the source property descriptor- Returns:
- the list of all property descriptors that the give property descriptor is "selectionOf"
-