|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.nodetype.ItemDefImpl org.apache.jackrabbit.core.nodetype.NodeDefImpl
This class implements the NodeDef
interface and additionally
provides setter methods for the various node definition attributes.
Field Summary |
Fields inherited from class org.apache.jackrabbit.core.nodetype.ItemDefImpl |
declaringNodeType |
Fields inherited from interface org.apache.jackrabbit.core.nodetype.NodeDef |
EMPTY_ARRAY |
Fields inherited from interface org.apache.jackrabbit.core.nodetype.ItemDef |
ANY_NAME |
Constructor Summary | |
NodeDefImpl()
Default constructor. |
Method Summary | |
boolean |
allowsSameNameSiblings()
Reports whether this node can have same-name siblings. |
boolean |
definesNode()
Determines whether this item definition defines a node. |
boolean |
equals(Object obj)
Compares two node definitions for equality. |
QName |
getDefaultPrimaryType()
Returns the name of the default primary type. |
NodeDefId |
getId()
Returns an identifier for this node definition. The identifier is computed based on the characteristics of this property definition, i.e. |
QName[] |
getRequiredPrimaryTypes()
Returns the array of names of the required primary types. |
int |
hashCode()
Returns zero to satisfy the Object equals/hashCode contract. |
void |
setAllowsSameNameSiblings(boolean allowsSameNameSiblings)
Sets the 'allowsSameNameSiblings' flag. |
void |
setAutoCreated(boolean autoCreated)
Sets the 'autoCreated' flag. |
void |
setDeclaringNodeType(QName declaringNodeType)
Sets the name of declaring node type. |
void |
setDefaultPrimaryType(QName defaultNodeType)
Sets the name of default primary type. |
void |
setMandatory(boolean mandatory)
Sets the 'mandatory' flag. |
void |
setName(QName name)
Sets the name of the child item. |
void |
setOnParentVersion(int onParentVersion)
Sets the 'onParentVersion' attribute. |
void |
setProtected(boolean writeProtected)
Sets the 'protected' flag. |
void |
setRequiredPrimaryTypes(QName[] requiredPrimaryTypes)
Sets the names of the required primary types. |
Methods inherited from class org.apache.jackrabbit.core.nodetype.ItemDefImpl |
definesResidual, getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jackrabbit.core.nodetype.ItemDef |
definesResidual, getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected |
Constructor Detail |
public NodeDefImpl()
Method Detail |
public void setDefaultPrimaryType(QName defaultNodeType)
defaultNodeType
- public void setRequiredPrimaryTypes(QName[] requiredPrimaryTypes)
requiredPrimaryTypes
- public void setAllowsSameNameSiblings(boolean allowsSameNameSiblings)
allowsSameNameSiblings
- public void setDeclaringNodeType(QName declaringNodeType)
setDeclaringNodeType
in class ItemDefImpl
declaringNodeType
- name of the declaring node type (must not be
null
)public void setName(QName name)
setName
in class ItemDefImpl
name
- name of child item (must not be null
)public void setAutoCreated(boolean autoCreated)
setAutoCreated
in class ItemDefImpl
autoCreated
- a boolean
public void setOnParentVersion(int onParentVersion)
setOnParentVersion
in class ItemDefImpl
onParentVersion
- any of the following constants:
OnParentVersionAction.COPY
OnParentVersionAction.VERSION
OnParentVersionAction.INITIALIZE
OnParentVersionAction.COMPUTE
OnParentVersionAction.IGNORE
OnParentVersionAction.ABORT
public void setProtected(boolean writeProtected)
setProtected
in class ItemDefImpl
writeProtected
- a boolean
public void setMandatory(boolean mandatory)
setMandatory
in class ItemDefImpl
mandatory
- a boolean
public NodeDefId getId()
getId
in interface NodeDef
public QName getDefaultPrimaryType()
getDefaultPrimaryType
in interface NodeDef
public QName[] getRequiredPrimaryTypes()
getRequiredPrimaryTypes
in interface NodeDef
public boolean allowsSameNameSiblings()
allowsSameNameSiblings
in interface NodeDef
public boolean definesNode()
definesNode
in interface ItemDef
true
public boolean equals(Object obj)
true
if the given object is a node defintion and has the same attributes
as this node definition.
equals
in class ItemDefImpl
obj
- the object to compare this node definition with
true
if the object is equal to this node definition,
false
otherwiseObject.equals(Object)
public int hashCode()
hashCode
in class ItemDefImpl
Object.hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |