Interface TypeService

All Known Implementing Classes:
DefaultTypeService, ExtensibleTypeService

public interface TypeService
The Interface TypeService.
Spring Bean ID:
cockpitTypeService
  • Method Details

    • getBaseType

      BaseType getBaseType(String code)
      Gets the base type.
      Parameters:
      code - the code
      Returns:
      the base type
    • getExtendedType

      ExtendedType getExtendedType(String code)
      Gets the extended type.
      Parameters:
      code - the code
      Returns:
      the extended type
    • getObjectTemplate

      ObjectTemplate getObjectTemplate(String code)
      Gets the object template.
      Parameters:
      code - the code
      Returns:
      the object template
    • getAllSubtypes

      Set<ObjectType> getAllSubtypes(ObjectType type)
      Gets the all subtypes.
      Parameters:
      type - the type
      Returns:
      the all subtypes
    • getAllSupertypes

      List<ObjectType> getAllSupertypes(ObjectType type)
      Gets the all supertypes.
      Parameters:
      type - the type
      Returns:
      the all supertypes
    • getObjectTemplates

      List<ObjectTemplate> getObjectTemplates(BaseType type)
      Gets the object templates.
      Parameters:
      type - the type
      Returns:
      the object templates
    • getPropertyDescriptor

      PropertyDescriptor getPropertyDescriptor(ObjectType type, String qualifier)
      Gets the property descriptor.
      Parameters:
      type - the type
      qualifier - the qualifier
      Returns:
      the property descriptor
    • getObjectType

      ObjectType getObjectType(String code)
      Gets the object type.
      Parameters:
      code - the code
      Returns:
      the object type
    • getTypeCodeFromPropertyQualifier

      String getTypeCodeFromPropertyQualifier(String propertyQualifier)
      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

      String getAttributeCodeFromPropertyQualifier(String propertyQualifier)
      Gets the attribute code from property qualifier.
      Parameters:
      propertyQualifier - the property qualifier
      Returns:
      the attribute code from property qualifier
    • getObjectTypeFromPropertyQualifier

      ObjectType getObjectTypeFromPropertyQualifier(String propertyQualifier)
      Gets the object type from property qualifier.
      Parameters:
      propertyQualifier - the property qualifier
      Returns:
      the object type from property qualifier
    • getPropertyDescriptor

      PropertyDescriptor getPropertyDescriptor(String propertyQualifier)
      Gets the property descriptor.
      Parameters:
      propertyQualifier - the property qualifier
      Returns:
      the property descriptor
    • getValueTypeCode

      String getValueTypeCode(PropertyDescriptor propertyDescriptor)
      Gets the value type code.
      Parameters:
      propertyDescriptor - the property descriptor
      Returns:
      the value type code
    • getAvailableValues

      List<Object> getAvailableValues(PropertyDescriptor propertyDescriptor)
      Gets the available values.
      Parameters:
      propertyDescriptor - the property descriptor
      Returns:
      the available values
    • getAvailableValues

      List<Object> getAvailableValues(PropertyDescriptor propertyDescriptor, TypedObject object)
      Gets the available values.
      Parameters:
      propertyDescriptor - the property descriptor
      Returns:
      the available values
    • wrapItem

      TypedObject wrapItem(Object item)
      Wrap item.
      Parameters:
      item - the item
      Returns:
      the typed object
    • wrapItems

      List<TypedObject> wrapItems(Collection<? extends Object> items)
      Wrap items.
      Parameters:
      items - the items
      Returns:
      the list< typed object>
    • unwrapItems

      List<ItemModel> unwrapItems(Collection<TypedObject> typedObjects)
      Unwrap items to models
      Parameters:
      typedObjects -
      Returns:
      the list of ItemModel items
    • getBestTemplate

      ObjectTemplate getBestTemplate(TypedObject object)
      Gets the best template.
      Parameters:
      object - the object
      Returns:
      the best template
    • checkItemAlive

      boolean checkItemAlive(TypedObject typedItem)
      Check item alive.
      Parameters:
      typedItem - the typed item
      Returns:
      true, if successful
    • getAllInstancesOf

      Collection<TypedObject> getAllInstancesOf(ObjectType type)
      Gets all instances of the given type. Keep in mind that this can be very expensive, so use countAllInstancesOf(ObjectType) before calling this method
      Parameters:
      type - the type
      Returns:
      the instances of the given type
    • getAllInstancesOf

      Collection<TypedObject> getAllInstancesOf(ObjectType type, String sortBy, String ascending)
      Gets all instances of the given type according to given sort criteria. Keep in mind that this can be very expensive, so use countAllInstancesOf(ObjectType) before calling this method
      Parameters:
      type - the type
      sortBy - given sort property
      ascending - given sort order
      Returns:
      the instances of the given type
    • countAllInstancesOf

      int countAllInstancesOf(ObjectType type)
      Count all instances of the given type
      Parameters:
      type - the type
      Returns:
      the number of instances or -1 if there was an error
    • getSelectionOf

      PropertyDescriptor getSelectionOf(PropertyDescriptor descriptor)
      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

      Collection<PropertyDescriptor> getReverseSelectionOf(PropertyDescriptor descriptor)
      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"