Class QNodeDefinitionBuilder

java.lang.Object
org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder
org.apache.jackrabbit.spi.commons.nodetype.QNodeDefinitionBuilder

public class QNodeDefinitionBuilder extends QItemDefinitionBuilder
A builder for a QNodeDefinition.
  • Constructor Details

    • QNodeDefinitionBuilder

      public QNodeDefinitionBuilder()
  • Method Details

    • setDefaultPrimaryType

      public void setDefaultPrimaryType(Name name)
      Parameters:
      name - the name of the default primary type of the node definition being built.
    • getDefaultPrimaryType

      public Name getDefaultPrimaryType()
      Returns:
      the name of the default primary type of the node definition being built.
    • addRequiredPrimaryType

      public void addRequiredPrimaryType(Name name)
      Adds a required primary type of the node definition being built.
      Parameters:
      name - the name of a required primary type.
    • setRequiredPrimaryTypes

      public void setRequiredPrimaryTypes(Name[] names)
      Parameters:
      names - array of names of the required primary types of the node definition being built.
    • getRequiredPrimaryTypes

      public Name[] getRequiredPrimaryTypes()
      Returns:
      array of names of the required primary types of the node definition being built.
    • setAllowsSameNameSiblings

      public void setAllowsSameNameSiblings(boolean allowSns)
      Parameters:
      allowSns - true if building a node definition with same name siblings, false otherwise.
    • getAllowsSameNameSiblings

      public boolean getAllowsSameNameSiblings()
      Returns:
      true if building a node definition with same name siblings, false otherwise.
    • build

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