org.apache.jackrabbit.spi.commons.nodetype
Class QPropertyDefinitionBuilder

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder
      extended by org.apache.jackrabbit.spi.commons.nodetype.QPropertyDefinitionBuilder

public class QPropertyDefinitionBuilder
extends QItemDefinitionBuilder

A builder for QPropertyDefinition.


Constructor Summary
QPropertyDefinitionBuilder()
           
 
Method Summary
 void addDefaultValue(QValue value)
          Adds a default value of the property definition being built.
 void addValueConstraint(QValueConstraint constraint)
          Adds a value constraint of the property definition being built.
 QPropertyDefinition build()
          Creates a new QPropertyDefinition instance based on the state of this builder.
 String[] getAvailableQueryOperators()
           
 QValue[] getDefaultValues()
           
 boolean getFullTextSearchable()
           
 boolean getMultiple()
           
 boolean getQueryOrderable()
           
 int getRequiredType()
           
 QValueConstraint[] getValueConstraints()
           
 void setAvailableQueryOperators(String[] queryOperators)
           
 void setDefaultValues(QValue[] values)
           
 void setFullTextSearchable(boolean fullTextSearchable)
           
 void setMultiple(boolean isMultiple)
           
 void setQueryOrderable(boolean queryOrderable)
           
 void setRequiredType(int type)
           
 void setValueConstraints(QValueConstraint[] constraints)
           
 
Methods inherited from class org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder
getAutoCreated, getDeclaringNodeType, getMandatory, getName, getOnParentVersion, getProtected, setAutoCreated, setDeclaringNodeType, setMandatory, setName, setOnParentVersion, setProtected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QPropertyDefinitionBuilder

public QPropertyDefinitionBuilder()
Method Detail

setRequiredType

public void setRequiredType(int type)
Parameters:
type - the required type of the property definition being built.
See Also:
PropertyDefinition.getRequiredType()

getRequiredType

public int getRequiredType()
Returns:
the required type of the property definition being built.
See Also:
PropertyDefinition.getRequiredType()

addValueConstraint

public void addValueConstraint(QValueConstraint constraint)
Adds a value constraint of the property definition being built.

Parameters:
constraint - the constraint.

setValueConstraints

public void setValueConstraints(QValueConstraint[] constraints)
Parameters:
constraints - array of value constraints of the property definition being built.
See Also:
PropertyDefinition.getValueConstraints()

getValueConstraints

public QValueConstraint[] getValueConstraints()
Returns:
array of value constraints of the property definition being built.
See Also:
PropertyDefinition.getValueConstraints()

addDefaultValue

public void addDefaultValue(QValue value)
Adds a default value of the property definition being built.

Parameters:
value - a default value.

setDefaultValues

public void setDefaultValues(QValue[] values)
Parameters:
values - array of default values of the property definition being built.
See Also:
PropertyDefinition.getDefaultValues()

getDefaultValues

public QValue[] getDefaultValues()
Returns:
array of default values of the property definition being built or null if no default values are defined.
See Also:
PropertyDefinition.getDefaultValues()

setMultiple

public void setMultiple(boolean isMultiple)
Parameters:
isMultiple - true if building a 'multiple' property definition.
See Also:
PropertyDefinition.isMultiple()

getMultiple

public boolean getMultiple()
Returns:
true if building a 'multiple' property definition.
See Also:
PropertyDefinition.isMultiple()

getFullTextSearchable

public boolean getFullTextSearchable()
Returns:
true if the property is fulltext searchable
See Also:
PropertyDefinition.isFullTextSearchable()

setFullTextSearchable

public void setFullTextSearchable(boolean fullTextSearchable)
Parameters:
fullTextSearchable - true if building a 'fulltext searchable' property definition
See Also:
PropertyDefinition.isFullTextSearchable()

getQueryOrderable

public boolean getQueryOrderable()
Returns:
true if the property is orderable in a query
See Also:
PropertyDefinition.isQueryOrderable()

setQueryOrderable

public void setQueryOrderable(boolean queryOrderable)
Parameters:
queryOrderable - true if the property is orderable in a query
See Also:
PropertyDefinition.isQueryOrderable()

getAvailableQueryOperators

public String[] getAvailableQueryOperators()
Returns:
the query operators of the property
See Also:
PropertyDefinition.getAvailableQueryOperators()

setAvailableQueryOperators

public void setAvailableQueryOperators(String[] queryOperators)
Parameters:
queryOperators - the query operators of the property
See Also:
PropertyDefinition.getAvailableQueryOperators()

build

public QPropertyDefinition build()
                          throws IllegalStateException
Creates a new QPropertyDefinition instance based on the state of this builder.

Returns:
a new QPropertyDefinition instance.
Throws:
IllegalStateException - if the instance has not the necessary information to build the QPropertyDefinition instance.


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