org.apache.jackrabbit.commons.cnd
Class DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder<T>

java.lang.Object
  extended by org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder<T>
Type Parameters:
T -
Direct Known Subclasses:
TemplateBuilderFactory.NodeTypeTemplateBuilder
Enclosing class:
DefinitionBuilderFactory<T,N>

public abstract static class DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder<T>
extends Object

Builder for a node type definition of type T.


Field Summary
protected  boolean isAbstract
          See setAbstract(boolean)
protected  boolean isMixin
          See setMixin(boolean)
protected  boolean isOrderable
          See setOrderableChildNodes(boolean)
protected  String name
          See setName(String)
protected  boolean queryable
          See setQueryable(boolean)
 
Constructor Summary
DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder()
           
 
Method Summary
abstract  void addSupertype(String name)
          Add the given name to the set of supertypes of the node type definition being built
abstract  T build()
          Build this node type definition
 String getName()
          Returns the name of the node type definition being built
abstract  DefinitionBuilderFactory.AbstractNodeDefinitionBuilder<T> newNodeDefinitionBuilder()
          Create a new instance fo a DefinitionBuilderFactory.AbstractNodeDefinitionBuilder which can be used to add child node definitions to the node type definition being built.
abstract  DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder<T> newPropertyDefinitionBuilder()
          Create a new instance of a DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder which can be used to add property definitions to the node type definition being built.
 void setAbstract(boolean isAbstract)
           
 void setMixin(boolean isMixin)
           
 void setName(String name)
          Set the name of the node type definition being built
 void setOrderableChildNodes(boolean isOrderable)
           
abstract  void setPrimaryItemName(String name)
           
 void setQueryable(boolean queryable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
See setName(String)


isMixin

protected boolean isMixin
See setMixin(boolean)


isOrderable

protected boolean isOrderable
See setOrderableChildNodes(boolean)


isAbstract

protected boolean isAbstract
See setAbstract(boolean)


queryable

protected boolean queryable
See setQueryable(boolean)

Constructor Detail

DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder

public DefinitionBuilderFactory.AbstractNodeTypeDefinitionBuilder()
Method Detail

setName

public void setName(String name)
             throws RepositoryException
Set the name of the node type definition being built

Parameters:
name -
Throws:
RepositoryException - if the name is not valid
See Also:
NodeTypeDefinition.getName()

getName

public String getName()
Returns the name of the node type definition being built

Returns:

addSupertype

public abstract void addSupertype(String name)
                           throws RepositoryException
Add the given name to the set of supertypes of the node type definition being built

Parameters:
name - name of the the supertype
Throws:
RepositoryException - if the name is not valid
See Also:
NodeTypeDefinition.getDeclaredSupertypeNames()

setMixin

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

setOrderableChildNodes

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

setPrimaryItemName

public abstract void setPrimaryItemName(String name)
                                 throws RepositoryException
Parameters:
name - the name of the primary item.
Throws:
RepositoryException
See Also:
NodeTypeDefinition.getPrimaryItemName()

setAbstract

public void setAbstract(boolean isAbstract)
                 throws RepositoryException
Parameters:
isAbstract - true if building a node type that is abstract.
Throws:
RepositoryException
See Also:
NodeTypeDefinition.isAbstract()

setQueryable

public void setQueryable(boolean queryable)
                  throws RepositoryException
Parameters:
queryable - true if building a node type that is queryable
Throws:
RepositoryException
See Also:
NodeTypeDefinition.isQueryable()

newPropertyDefinitionBuilder

public abstract DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder<T> newPropertyDefinitionBuilder()
                                                                                                    throws RepositoryException
Create a new instance of a DefinitionBuilderFactory.AbstractPropertyDefinitionBuilder which can be used to add property definitions to the node type definition being built.

Returns:
Throws:
RepositoryException

newNodeDefinitionBuilder

public abstract DefinitionBuilderFactory.AbstractNodeDefinitionBuilder<T> newNodeDefinitionBuilder()
                                                                                            throws RepositoryException
Create a new instance fo a DefinitionBuilderFactory.AbstractNodeDefinitionBuilder which can be used to add child node definitions to the node type definition being built.

Returns:
Throws:
RepositoryException

build

public abstract T build()
                 throws RepositoryException
Build this node type definition

Returns:
Throws:
RepositoryException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.