Interface TypeManager

All Superinterfaces:
TimestampedService
All Known Implementing Classes:
TypeService

public interface TypeManager extends TimestampedService
Service handling registered UI Types.
Author:
Thomas Roger
  • Method Details

    • getSuperTypes

      String[] getSuperTypes(String typeName)
      Gets the super type names for the given type.
      Returns:
      an array of supertypes or an empty array if no supertype exists. null is returned if no such type exists
    • getTypes

      Collection<Type> getTypes()
      Returns all the registered Types.
    • getType

      Type getType(String typeName)
      Returns the Type instance for the given typeName.
    • hasType

      boolean hasType(String typeName)
      Returns true if typeName is a registered Type, false otherwise.
    • getAllowedSubTypes

      Collection<Type> getAllowedSubTypes(String typeName)
    • getAllowedSubTypes

      Collection<Type> getAllowedSubTypes(String typeName, DocumentModel currentDoc)
      Returns the allowed sub types of the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any.
      Since:
      5.4.2
    • findAllAllowedSubTypesFrom

      Collection<Type> findAllAllowedSubTypesFrom(String typeName)
      Returns recursively all the allowed sub types from the given typeName.
      Since:
      5.4.2
    • findAllAllowedSubTypesFrom

      Collection<Type> findAllAllowedSubTypesFrom(String typeName, DocumentModel currentDoc)
      Returns recursively all the allowed sub types from the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any.
      Since:
      5.4.2
    • getTypeMapForDocumentType

      Map<String,List<Type>> getTypeMapForDocumentType(String typeName, DocumentModel currentDoc)
      Returns the sub type of the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any, and organized by type categories.
      Since:
      5.4.2
    • canCreate

      boolean canCreate(String typeName, String containerTypeName)
      Returns true if typeName is a sub type, allowed in creation mode, of containerTypeName, false otherwise.
      Since:
      5.4.2
    • canCreate

      boolean canCreate(String typeName, String containerTypeName, DocumentModel currentDoc)
      Returns true if typeName is a sub type, allowed in creation, of containerTypeName, false otherwise.

      It takes care of a local UI types configuration retrieved from the currentDoc to filter the sub types of typeName before checking the creation mode.

      Since:
      5.4.2
    • isAllowedSubType

      boolean isAllowedSubType(String typeName, String containerTypeName)
      Returns true if typeName is an allowed sub type of containerTypeName, false otherwise.
      Since:
      5.4.2
    • isAllowedSubType

      boolean isAllowedSubType(String typeName, String containerTypeName, DocumentModel currentDoc)
      Returns true if typeName is an allowed sub type of containerTypeName, filtered by a local UI types configuration retrieved from the currentDoc, if any, false otherwise.
      Since:
      5.4.2