Class QNodeTypeDefinitionBuilder


  • public class QNodeTypeDefinitionBuilder
    extends Object
    A builder for QNodeTypeDefinition.
    • Constructor Detail

      • QNodeTypeDefinitionBuilder

        public QNodeTypeDefinitionBuilder()
    • Method Detail

      • setName

        public void setName​(org.apache.jackrabbit.spi.Name name)
        Set the name of the node type definition being built
        Parameters:
        name - the name
        See Also:
        NodeTypeDefinition.getName()
      • getName

        public org.apache.jackrabbit.spi.Name getName()
        Returns:
        the name of the node type definition being built or null if not set.
        See Also:
        NodeTypeDefinition.getName()
      • setSupertypes

        public void setSupertypes​(org.apache.jackrabbit.spi.Name[] supertypes)
        Specifies the supertypes of the node type definition being built
        Parameters:
        supertypes - the supertypes
        See Also:
        NodeTypeDefinition.getDeclaredSupertypeNames()
      • getSuperTypes

        public org.apache.jackrabbit.spi.Name[] getSuperTypes()
        Returns an array containing the names of the supertypes of the node type definition being built.
        Returns:
        an array of supertype names
        See Also:
        NodeTypeDefinition.getDeclaredSupertypeNames()
      • setMixin

        public void setMixin​(boolean isMixin)
        Parameters:
        isMixin - true if building a mixin node type definition; false otherwise.
        See Also:
        NodeTypeDefinition.isMixin()
      • isMixin

        public boolean isMixin()
        Returns:
        true if building a mixin node type definition; false otherwise.
        See Also:
        NodeTypeDefinition.isMixin()
      • setSupportedMixinTypes

        public void setSupportedMixinTypes​(org.apache.jackrabbit.spi.Name[] names)
        Sets the names of additional mixin types supported on this node type.
        Parameters:
        names - an array of mixin type names, or null when there are no known constraints
      • getSupportedMixinTypes

        public org.apache.jackrabbit.spi.Name[] getSupportedMixinTypes()
        Returns an array containing the names of additional mixin types supported on this node type.
        Returns:
        an array of mixin type names, or null when there are no known constraints.
      • setOrderableChildNodes

        public void setOrderableChildNodes​(boolean isOrderable)
        Parameters:
        isOrderable - true if building a node type having orderable child nodes; false otherwise.
        See Also:
        NodeTypeDefinition.hasOrderableChildNodes()
      • setPrimaryItemName

        public void setPrimaryItemName​(org.apache.jackrabbit.spi.Name primaryItemName)
        Parameters:
        primaryItemName - the name of the primary item or null if not set.
        See Also:
        NodeTypeDefinition.getPrimaryItemName()
      • setAbstract

        public void setAbstract​(boolean isAbstract)
        Parameters:
        isAbstract - true if building a node type that is abstract.
        See Also:
        NodeTypeDefinition.isAbstract()
      • setQueryable

        public void setQueryable​(boolean queryable)
        Parameters:
        queryable - true if building a node type that is queryable
        See Also:
        NodeTypeDefinition.isQueryable()
      • setPropertyDefs

        public void setPropertyDefs​(org.apache.jackrabbit.spi.QPropertyDefinition[] propDefs)
        Parameters:
        propDefs - an array containing the property definitions of the node type definition being built.
        See Also:
        NodeTypeDefinition.getDeclaredPropertyDefinitions()
      • setChildNodeDefs

        public void setChildNodeDefs​(org.apache.jackrabbit.spi.QNodeDefinition[] childDefs)
        Parameters:
        childDefs - an array containing the child node definitions of the node type definition being.
        See Also:
        NodeTypeDefinition.getDeclaredChildNodeDefinitions()
      • build

        public org.apache.jackrabbit.spi.QNodeTypeDefinition build()
                                                            throws IllegalStateException
        Creates a new QNodeTypeDefinition instance based on the state of this builder.
        Returns:
        a new QNodeTypeDefinition instance.
        Throws:
        IllegalStateException - if the instance has not the necessary information to build the QNodeTypeDefinition instance.