Interface ExtendedTypeLoader
- All Known Implementing Classes:
AbstractTypeLoader,ClassificationTypeLoader,DefaultExtendedTypeChain,WidgetTypeLoader
public interface ExtendedTypeLoader
Implement this interface and register it at the extended type loader chain for handling own custom types within a
cockpit.
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeCodeFromPropertyQualifier(String propertyQualifier) Splits up a property qualifier and returns the attribute part of it.getAvailableValues(TypeModel valueType, PropertyDescriptor propertyDescriptor, TypeService typeService) Returns all possible values for the given property, e.g.Returns the type codes of all extended types for the given item.getExtendedTypesForTemplate(ItemType type, String templateCode, TypeService typeService) Returns the extended types for a given template.getTypeCodeFromPropertyQualifier(String propertyQualifier) Splits up a property qualifier and returns the type part of it.getValueType(ObjectType enclosingType, PropertyDescriptor propertyDescriptor, TypeService typeService) Returns the value type for the given property descriptor.loadType(String code, TypeService typeService) Returns an extended type for the given code.
-
Method Details
-
loadType
Returns an extended type for the given code.- 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
TypeModel getValueType(ObjectType enclosingType, PropertyDescriptor propertyDescriptor, TypeService typeService) Returns the value type for the given property descriptor.- Parameters:
enclosingType- The type that owns the property- Returns:
- The value type or null if not handled by this type loader.
-
getAvailableValues
List<Object> getAvailableValues(TypeModel valueType, PropertyDescriptor propertyDescriptor, TypeService typeService) Returns all possible values for the given property, e.g. all enumeration values if it's an enum.- Parameters:
valueType- The value type of the propertypropertyDescriptor- The property.- Returns:
- The list of available values or null if not handled by this type loader.
-
getExtendedTypeCodes
Returns the type codes of all extended types for the given item.- Returns:
- The type codes or null if not handled by this type loader.
-
getAttributeCodeFromPropertyQualifier
Splits up a property qualifier and returns the attribute part of it.- Returns:
- the attribute code or null if not handled by this type loader.
-
getTypeCodeFromPropertyQualifier
Splits up a property qualifier and returns the type part of it.- Returns:
- the type code or null if not handled by this type loader.
-
getExtendedTypesForTemplate
Collection<ExtendedType> getExtendedTypesForTemplate(ItemType type, String templateCode, TypeService typeService) Returns the extended types for a given template.- 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.
-