Interface DocumentType

  • All Superinterfaces:
    ComplexType, CompositeType, Serializable, Type
    All Known Implementing Classes:
    DocumentTypeImpl

    public interface DocumentType
    extends CompositeType
    Document types are composite types made of several schemas.

    Sample document types are Workspace, Section, Domain,... The list of builtin document type is visible at NXCore/OSGI-INF/CoreExtensions.xml.

    • Method Detail

      • getPrefetchInfo

        PrefetchInfo getPrefetchInfo()
        Gets the prefetch info, or null if no prefetch is defined.

        If the prefetch info is not null, the caller should use it when instantiating a document to preload the fields defined by the prefetch info.

        If no prefetch is specified by the document type, the caller is free to use a default prefetch info or no prefetch at all.

        Returns:
        the prefetch info or null
      • isFile

        boolean isFile()
        Tests whether this type describes a document (not a folder!) or not.
        Returns:
        true if the type describes a document folder, otherwise returns false
      • isFolder

        boolean isFolder()
        Tests whether this type describes a folder or not.
        Returns:
        true if the type describes a folder, otherwise returns false
      • isOrdered

        boolean isOrdered()
        Tests whether this type describe an ordered folder or not.
        Returns:
        true if the type describes an ordered folder, otherwise returns false
      • getFacets

        Set<String> getFacets()
        Gets all the facets of this document type.

        Facets inherited from parents are taken into account.

        Returns:
        the facets
      • hasFacet

        boolean hasFacet​(String facetName)
        Returns true if this document type has the given facetName facet, false otherwise.
        Since:
        5.7
      • getSubtypes

        Set<String> getSubtypes()
        Returns the types of the children that can be created inside this type.
        Since:
        8.4
      • setSubtypes

        void setSubtypes​(Collection<String> subtypes)
        Sets the types of the children that can be created inside the this type.
        Since:
        8.4
      • hasSubtype

        boolean hasSubtype​(String subtype)
        Returns true if the given subtype type was explicitly allowed to be created inside this type.
        Since:
        8.4
      • getForbiddenSubtypes

        Set<String> getForbiddenSubtypes()
        Returns the types of the children that cannot be created inside this type.
        Since:
        8.4
      • setForbiddenSubtypes

        void setForbiddenSubtypes​(Collection<String> subtypes)
        Sets the types of the children that cannot be created inside the this type.
        Since:
        8.4
      • hasForbiddenSubtype

        boolean hasForbiddenSubtype​(String subtype)
        Returns true if the given subtype type was forbidden from being created inside this type.
        Since:
        8.4
      • getAllowedSubtypes

        Set<String> getAllowedSubtypes()
        Returns the list of types that can effectively be created inside this type. Allowed types results from the exclusion of the forbidden subtypes from the subtypes.
        Since:
        8.4
      • hasAllowedSubtype

        boolean hasAllowedSubtype​(String subtype)
        Returns true if the given subtype type can effectively be created inside this type.
        Since:
        8.4