|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.spi.commons.nodetype.compact.QNodeTypeDefinitionsBuilder.QPropertyDefinitionBuilder
public abstract class QNodeTypeDefinitionsBuilder.QPropertyDefinitionBuilder
A builder for a QNodeDefinition
Constructor Summary | |
---|---|
QNodeTypeDefinitionsBuilder.QPropertyDefinitionBuilder()
|
Method Summary | |
---|---|
abstract QPropertyDefinition |
build()
Creates a new QPropertyDefinition instance based on the state of this builder. |
abstract QValue |
createValue(String value,
NamePathResolver resolver)
Create a new QValue for value of the type this instance
represents using the given resolver . |
abstract String |
createValueConstraint(String constraint,
NamePathResolver resolver)
Validate the given constraint and resolve any prefixes. |
boolean |
getAutoCreated()
|
Name |
getDeclaringNodeType()
|
QValue[] |
getDefaultValues()
|
boolean |
getMandatory()
|
boolean |
getMultiple()
|
Name |
getName()
|
int |
getOnParentVersion()
|
boolean |
getProtected()
|
int |
getRequiredType()
|
String[] |
getValueConstraints()
|
void |
setAutoCreated(boolean autocreate)
|
void |
setDeclaringNodeType(Name type)
|
void |
setDefaultValues(QValue[] values)
|
void |
setMandatory(boolean isMandatory)
|
void |
setMultiple(boolean isMultiple)
|
void |
setName(Name name)
|
void |
setOnParentVersion(int onParent)
|
void |
setProtected(boolean isProtected)
|
void |
setRequiredType(int type)
|
void |
setValueConstraints(String[] constraints)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QNodeTypeDefinitionsBuilder.QPropertyDefinitionBuilder()
Method Detail |
---|
public void setRequiredType(int type)
type
- the required type of the property definition being built.public int getRequiredType()
public void setValueConstraints(String[] constraints)
constraints
- array of value constraints of the property definition being built.public String[] getValueConstraints()
public void setDefaultValues(QValue[] values)
values
- array of default values of the property definition being built.public QValue[] getDefaultValues()
null
if no default values are defined.public void setMultiple(boolean isMultiple)
isMultiple
- true if building a 'multiple' property definition.public boolean getMultiple()
public abstract String createValueConstraint(String constraint, NamePathResolver resolver) throws InvalidConstraintException
constraint
and resolve any prefixes.
constraint
- resolver
-
InvalidConstraintException
- if constraint
cannot be converted to a
valid value constrained.public abstract QValue createValue(String value, NamePathResolver resolver) throws ValueFormatException, RepositoryException
QValue
for value
of the type this instance
represents using the given resolver
.
value
- resolver
-
QValue
.
ValueFormatException
- If the given value
cannot be converted to the
specified type
.
RepositoryException
- If another error occurs.public abstract QPropertyDefinition build() throws IllegalStateException
QPropertyDefinition
instance based on the state of this builder.
QPropertyDefinition
instance.
IllegalStateException
- if the instance has not the necessary information to build
the QPropertyDefinition instance.public void setName(Name name)
name
- the name of the child item definition being buildpublic Name getName()
public void setDeclaringNodeType(Name type)
type
- the name of the declaring node type.public Name getDeclaringNodeType()
public void setAutoCreated(boolean autocreate)
autocreate
- true if building a 'autocreate' child item definition, false otherwise.public boolean getAutoCreated()
public void setOnParentVersion(int onParent)
onParent
- the 'onParentVersion' attribute of the child item definition being builtpublic int getOnParentVersion()
public void setProtected(boolean isProtected)
isProtected
- true if building a 'protected' child item definition, false otherwise.public boolean getProtected()
public void setMandatory(boolean isMandatory)
isMandatory
- true if building a 'mandatory' child item definition, false otherwise.public boolean getMandatory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |