ModeShape Distribution 3.0.0.Beta4

org.modeshape.web.jcr.rest.client.domain
Class ItemDefinition

java.lang.Object
  extended by org.modeshape.web.jcr.rest.client.domain.ItemDefinition
All Implemented Interfaces:
ItemDefinition
Direct Known Subclasses:
ChildNodeDefinition, PropertyDefinition

@Immutable
public abstract class ItemDefinition
extends Object
implements ItemDefinition

An immutable representation of an abstract JCR ItemDefinition.


Constructor Summary
protected ItemDefinition(String declaringNodeTypeName, boolean isAutoCreated, boolean isMandatory, boolean isProtected, int onParentVersion, Map<String,NodeType> nodeTypes)
           
 
Method Summary
 NodeType getDeclaringNodeType()
          
 String getDeclaringNodeTypeName()
          Get the name of the node type that declares this definition.
 int getOnParentVersion()
          
 boolean isAutoCreated()
          
 boolean isMandatory()
          
 boolean isProtected()
          
protected  NodeType nodeType(String name)
          Find the node type with the supplied name.
protected  Map<String,NodeType> nodeTypes()
           
protected static NodeType[] nodeTypes(Collection<String> nodeTypeNames, Map<String,NodeType> nodeTypes)
           
protected static String[] toArray(Collection<String> values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.nodetype.ItemDefinition
getName
 

Constructor Detail

ItemDefinition

protected ItemDefinition(String declaringNodeTypeName,
                         boolean isAutoCreated,
                         boolean isMandatory,
                         boolean isProtected,
                         int onParentVersion,
                         Map<String,NodeType> nodeTypes)
Method Detail

toArray

protected static String[] toArray(Collection<String> values)

nodeTypes

protected static NodeType[] nodeTypes(Collection<String> nodeTypeNames,
                                      Map<String,NodeType> nodeTypes)

nodeType

protected NodeType nodeType(String name)
Find the node type with the supplied name.

Parameters:
name - the name of the node type to find.
Returns:
the named node type, or null if the node type is not known (or there are no node types known)

nodeTypes

protected Map<String,NodeType> nodeTypes()
Returns:
nodeTypes

getDeclaringNodeTypeName

public String getDeclaringNodeTypeName()
Get the name of the node type that declares this definition.

Returns:
the node type name; never null

getDeclaringNodeType

public NodeType getDeclaringNodeType()

Specified by:
getDeclaringNodeType in interface ItemDefinition
See Also:
ItemDefinition.getDeclaringNodeType()

getOnParentVersion

public int getOnParentVersion()

Specified by:
getOnParentVersion in interface ItemDefinition
See Also:
ItemDefinition.getOnParentVersion()

isAutoCreated

public boolean isAutoCreated()

Specified by:
isAutoCreated in interface ItemDefinition
See Also:
ItemDefinition.isAutoCreated()

isMandatory

public boolean isMandatory()

Specified by:
isMandatory in interface ItemDefinition
See Also:
ItemDefinition.isMandatory()

isProtected

public boolean isProtected()

Specified by:
isProtected in interface ItemDefinition
See Also:
ItemDefinition.isProtected()

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.