Interface TypeManager

    • Method Detail

      • 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
      • 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.
      • 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