Package org.apache.sling.commons.testing.jcr

# Class MockNodeType

java.lang.Object
org.apache.sling.commons.testing.jcr.MockNodeType

All Implemented Interfaces:
  `javax.jcr.nodetype.NodeType`, `javax.jcr.nodetype.NodeTypeDefinition`

public class MockNodeType extends Object implements javax.jcr.nodetype.NodeType

## Field Summary

### Fields inherited from interface javax.jcr.nodetype.NodeType

`MIX_CREATED, MIX_LANGUAGE, MIX_LAST_MODIFIED, MIX_LIFECYCLE, MIX_LOCKABLE, MIX_MIMETYPE, MIX_REFERENCEABLE, MIX_SHAREABLE, MIX_SIMPLE_VERSIONABLE, MIX_TITLE, MIX_VERSIONABLE, NT_ACTIVITY, NT_ADDRESS, NT_BASE, NT_CHILD_NODE_DEFINITION, NT_CONFIGURATION, NT_FILE, NT_FOLDER, NT_FROZEN_NODE, NT_HIERARCHY_NODE, NT_LINKED_FILE, NT_NODE_TYPE, NT_PROPERTY_DEFINITION, NT_QUERY, NT_RESOURCE, NT_UNSTRUCTURED, NT_VERSION, NT_VERSION_HISTORY, NT_VERSIONED_CHILD`

## Constructor Summary

Constructors
Constructor
Description
`MockNodeType(String name)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`canAddChildNode(String childNodeName)`
`boolean`
`canAddChildNode(String childNodeName, String nodeTypeName)`
`boolean`
`canRemoveItem(String itemName)`
`boolean`
`canRemoveNode(String nodeName)`
`boolean`
`canRemoveProperty(String propertyName)`
`boolean`
`canSetProperty(String propertyName, javax.jcr.Value value)`
`boolean`
`canSetProperty(String propertyName, javax.jcr.Value[] values)`
`javax.jcr.nodetype.NodeDefinition[]`
`getChildNodeDefinitions()`
`javax.jcr.nodetype.NodeDefinition[]`
`getDeclaredChildNodeDefinitions()`
`javax.jcr.nodetype.PropertyDefinition[]`
`getDeclaredPropertyDefinitions()`
`javax.jcr.nodetype.NodeTypeIterator`
`getDeclaredSubtypes()`
`String[]`
`getDeclaredSupertypeNames()`
`javax.jcr.nodetype.NodeType[]`
`getDeclaredSupertypes()`
`String`
`getName()`
`String`
`getPrimaryItemName()`
`javax.jcr.nodetype.PropertyDefinition[]`
`getPropertyDefinitions()`
`javax.jcr.nodetype.NodeTypeIterator`
`getSubtypes()`
`javax.jcr.nodetype.NodeType[]`
`getSupertypes()`
`boolean`
`hasOrderableChildNodes()`
`boolean`
`isAbstract()`
`boolean`
`isMixin()`
`boolean`
`isNodeType(String nodeTypeName)`
`boolean`
`isQueryable()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MockNodeType

public MockNodeType(String name)

## Method Details

### getName

public String getName()

Specified by:
  `getName` in interface `javax.jcr.nodetype.NodeTypeDefinition`

### canAddChildNode

public boolean canAddChildNode(String childNodeName)

Specified by:
  `canAddChildNode` in interface `javax.jcr.nodetype.NodeType`

### canAddChildNode

public boolean canAddChildNode(String childNodeName, String nodeTypeName)

Specified by:
  `canAddChildNode` in interface `javax.jcr.nodetype.NodeType`

### canRemoveItem

public boolean canRemoveItem(String itemName)

Specified by:
  `canRemoveItem` in interface `javax.jcr.nodetype.NodeType`

### canSetProperty

public boolean canSetProperty(String propertyName, javax.jcr.Value value)

Specified by:
  `canSetProperty` in interface `javax.jcr.nodetype.NodeType`

### canSetProperty

public boolean canSetProperty(String propertyName, javax.jcr.Value[] values)

Specified by:
  `canSetProperty` in interface `javax.jcr.nodetype.NodeType`

### getChildNodeDefinitions

public javax.jcr.nodetype.NodeDefinition[] getChildNodeDefinitions()

Specified by:
  `getChildNodeDefinitions` in interface `javax.jcr.nodetype.NodeType`

### getDeclaredChildNodeDefinitions

public javax.jcr.nodetype.NodeDefinition[] getDeclaredChildNodeDefinitions()

Specified by:
  `getDeclaredChildNodeDefinitions` in interface `javax.jcr.nodetype.NodeTypeDefinition`

### getDeclaredPropertyDefinitions

public javax.jcr.nodetype.PropertyDefinition[] getDeclaredPropertyDefinitions()

Specified by:
  `getDeclaredPropertyDefinitions` in interface `javax.jcr.nodetype.NodeTypeDefinition`

### getDeclaredSupertypes

public javax.jcr.nodetype.NodeType[] getDeclaredSupertypes()

Specified by:
  `getDeclaredSupertypes` in interface `javax.jcr.nodetype.NodeType`

### getPrimaryItemName

public String getPrimaryItemName()

Specified by:
  `getPrimaryItemName` in interface `javax.jcr.nodetype.NodeTypeDefinition`

### getPropertyDefinitions

public javax.jcr.nodetype.PropertyDefinition[] getPropertyDefinitions()

Specified by:
  `getPropertyDefinitions` in interface `javax.jcr.nodetype.NodeType`

### getSupertypes

public javax.jcr.nodetype.NodeType[] getSupertypes()

Specified by:
  `getSupertypes` in interface `javax.jcr.nodetype.NodeType`

### hasOrderableChildNodes

public boolean hasOrderableChildNodes()

Specified by:
  `hasOrderableChildNodes` in interface `javax.jcr.nodetype.NodeTypeDefinition`

### isMixin

public boolean isMixin()

Specified by:
  `isMixin` in interface `javax.jcr.nodetype.NodeTypeDefinition`

### isNodeType

public boolean isNodeType(String nodeTypeName)

Specified by:
  `isNodeType` in interface `javax.jcr.nodetype.NodeType`

### canRemoveNode

public boolean canRemoveNode(String nodeName)

Specified by:
  `canRemoveNode` in interface `javax.jcr.nodetype.NodeType`

### canRemoveProperty

public boolean canRemoveProperty(String propertyName)

Specified by:
  `canRemoveProperty` in interface `javax.jcr.nodetype.NodeType`

### getDeclaredSubtypes

public javax.jcr.nodetype.NodeTypeIterator getDeclaredSubtypes()

Specified by:
  `getDeclaredSubtypes` in interface `javax.jcr.nodetype.NodeType`

### getSubtypes

public javax.jcr.nodetype.NodeTypeIterator getSubtypes()

Specified by:
  `getSubtypes` in interface `javax.jcr.nodetype.NodeType`

### getDeclaredSupertypeNames

public String[] getDeclaredSupertypeNames()

Specified by:
  `getDeclaredSupertypeNames` in interface `javax.jcr.nodetype.NodeTypeDefinition`

### isAbstract

public boolean isAbstract()

Specified by:
  `isAbstract` in interface `javax.jcr.nodetype.NodeTypeDefinition`

### isQueryable

public boolean isQueryable()

Specified by:
  `isQueryable` in interface `javax.jcr.nodetype.NodeTypeDefinition`