|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.ocm.nodemanagement.impl.jackrabbit.NodeTypeManagerImpl
public class NodeTypeManagerImpl
This is the NodeTypeManager implementation for Apache Jackrabbit.
Constructor Summary | |
---|---|
NodeTypeManagerImpl()
Creates a new instance of NodeTypeManagerImpl. |
Method Summary | |
---|---|
void |
createNamespace(javax.jcr.Session session,
String namespace,
String namespaceUri)
Creates a new namespace in the repository. |
void |
createNodeTypeFromClass(javax.jcr.Session session,
Class clazz,
String jcrNodeType,
boolean reflectSuperClasses)
This method creates a JCR node type from a given Java Bean class by using reflection. |
void |
createNodeTypes(javax.jcr.Session session,
ClassDescriptor[] classDescriptors)
This method creates JCR node types based on ClassDescriptor objects which are created by a jcr-mapping Mapper implementation. |
void |
createNodeTypes(javax.jcr.Session session,
MappingDescriptor mappingDescriptor)
This method creates JCR node types based on the MappingDescriptor object which is created by a jcr-mapping Mapper implementation. |
void |
createNodeTypesFromConfiguration(javax.jcr.Session session,
InputStream jcrRepositoryConfigurationFile)
This method creates JCR node types from a JCR vendor specific configuration file. |
void |
createNodeTypesFromMappingFiles(javax.jcr.Session session,
InputStream[] mappingXmlFiles)
This method creates JCR node types based on jcr-mapping xml files. |
void |
createSingleNodeType(javax.jcr.Session session,
ClassDescriptor classDescriptor)
This method creates a single JCR node type identified by its ClassDescriptor read from the jcr mapping file. |
void |
createSingleNodeTypeFromMappingFile(javax.jcr.Session session,
InputStream mappingXmlFile,
String jcrNodeType)
This method creates a single JCR node type identified by its jcrNodeType name defined in a jcr-mapping xml file. |
List |
getAllPrimaryNodeTypeNames(javax.jcr.Session session)
Returns a list of all JCR node types. |
Name[] |
getJcrSuperTypes(String superTypes)
Creates a QName array from a comma separated list of JCR super types in a given String. |
NamespaceHelper |
getNamespaceHelper()
Getter for property namespaceHelper. |
NodeTypeDef |
getNodeTypeDef(String jcrNodeType,
String jcrSuperTypes,
String className)
Creates a NodeTypeDef object. |
List |
getPrimaryNodeTypeNames(javax.jcr.Session session,
String namespace)
Returns the names of all node types in the repository identified by a given namespace. |
PropDefImpl |
getPropertyDefinition(String fieldName,
PropertyDefDescriptor field,
Name declaringNodeType)
Creates a PropDefImpl object. |
void |
removeNodeTypesFromConfiguration(javax.jcr.Session session,
InputStream jcrRepositoryConfigurationFile)
This method removes JCR node types from a JCR vendor specific configuration file |
void |
removeNodeTypesFromMappingFile(javax.jcr.Session session,
InputStream[] mappingXmlFile)
This method removes all JCR node types that are defined in one to many jcr-mapping XML files. |
void |
removeSingleNodeType(javax.jcr.Session session,
Name name)
|
void |
removeSingleNodeType(javax.jcr.Session session,
String jcrNodeType)
This method removes a single JCR node type identified by its jcrNodeType name. |
void |
setNamespaceHelper(NamespaceHelper object)
Setter for property namespaceHelper. |
protected String |
showPropertyDefinition(javax.jcr.nodetype.PropertyDefinition propDef)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeTypeManagerImpl()
Method Detail |
---|
public void createNamespace(javax.jcr.Session session, String namespace, String namespaceUri) throws NamespaceCreationException
NodeTypeManager
createNamespace
in interface NodeTypeManager
namespace
- NamespacenamespaceUri
- Full namespace URI
NamespaceCreationException
NodeTypeManager.createNamespace(javax.jcr.Session, java.lang.String, java.lang.String)
public void createNodeTypes(javax.jcr.Session session, MappingDescriptor mappingDescriptor) throws NodeTypeCreationException
NodeTypeManager
createNodeTypes
in interface NodeTypeManager
session
- Repository sessionmappingDescriptor
- Mapping descriptor object created by
jcr-mapping
NodeTypeCreationException
- NodeTypeCreationExceptionNodeTypeManager.createNodeTypes(javax.jcr.Session, org.apache.jackrabbit.ocm.mapper.model.MappingDescriptor)
public void createNodeTypes(javax.jcr.Session session, ClassDescriptor[] classDescriptors) throws NodeTypeCreationException
NodeTypeManager
createNodeTypes
in interface NodeTypeManager
session
- Repository sessionclassDescriptors
- Array of ClassDescriptor objects created by
jcr-mapping
NodeTypeCreationException
- NodeTypeCreationExceptionNodeTypeManager.createNodeTypes(javax.jcr.Session, org.apache.jackrabbit.ocm.mapper.model.MappingDescriptor)
public void createNodeTypesFromMappingFiles(javax.jcr.Session session, InputStream[] mappingXmlFiles) throws NodeTypeCreationException
NodeTypeManager
createNodeTypesFromMappingFiles
in interface NodeTypeManager
session
- Repository sessionmappingXmlFiles
- InputStreams to jcr-mapping xml files
NodeTypeCreationException
- NodeTypeCreationExceptionNodeTypeManager.createNodeTypesFromMappingFiles(javax.jcr.Session, java.io.InputStream[])
public void createSingleNodeType(javax.jcr.Session session, ClassDescriptor classDescriptor) throws NodeTypeCreationException
NodeTypeManager
createSingleNodeType
in interface NodeTypeManager
session
- Repository sessionclassDescriptor
- ClassDescriptor object created by jcr-mapping
NodeTypeCreationException
- NodeTypeCreationExceptionNodeTypeManager.createSingleNodeType(javax.jcr.Session, org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor)
public NodeTypeDef getNodeTypeDef(String jcrNodeType, String jcrSuperTypes, String className)
jcrNodeType
- Name of JCR node typejcrSuperTypes
- JCR node super types
public PropDefImpl getPropertyDefinition(String fieldName, PropertyDefDescriptor field, Name declaringNodeType)
fieldName
- The name of the fieldfield
- property definition descriptordeclaringNodeType
- Node Type QName where the property belongs to
protected String showPropertyDefinition(javax.jcr.nodetype.PropertyDefinition propDef)
propDef
-
public Name[] getJcrSuperTypes(String superTypes)
superTypes
- JCR super types
public void createSingleNodeTypeFromMappingFile(javax.jcr.Session session, InputStream mappingXmlFile, String jcrNodeType) throws NodeTypeCreationException
NodeTypeManager
createSingleNodeTypeFromMappingFile
in interface NodeTypeManager
session
- Repository sessionmappingXmlFile
- InputStream to a jcr-mapping xml filejcrNodeType
- Name of the class that needs to be created identified
by its jcrNodeType name
NodeTypeCreationException
- NodeTypeCreationExceptionNodeTypeManager.createSingleNodeTypeFromMappingFile(javax.jcr.Session, java.io.InputStream, java.lang.String)
public void createNodeTypeFromClass(javax.jcr.Session session, Class clazz, String jcrNodeType, boolean reflectSuperClasses) throws NodeTypeCreationException
NodeTypeManager
createNodeTypeFromClass
in interface NodeTypeManager
session
- Repository sessionclazz
- Java classjcrNodeType
- Name of JCR node type (including namespace)reflectSuperClasses
- If true, all base classes are also reflected
NodeTypeCreationException
- NodeTypeCreationExceptionNodeTypeManager.createNodeTypeFromClass(javax.jcr.Session, java.lang.Class, java.lang.String, boolean)
public void createNodeTypesFromConfiguration(javax.jcr.Session session, InputStream jcrRepositoryConfigurationFile) throws OperationNotSupportedException, NodeTypeCreationException
NodeTypeManager
createNodeTypesFromConfiguration
in interface NodeTypeManager
session
- Repository session
OperationNotSupportedException
- OperationNotSupportedException
NodeTypeCreationException
- NodeTypeCreationExceptionNodeTypeManager.createNodeTypesFromConfiguration(javax.jcr.Session, java.io.InputStream)
public void removeNodeTypesFromConfiguration(javax.jcr.Session session, InputStream jcrRepositoryConfigurationFile) throws NodeTypeRemovalException
NodeTypeManager
removeNodeTypesFromConfiguration
in interface NodeTypeManager
session
- Repository sessionjcrRepositoryConfigurationFile
- the file that contains the node type definition
NodeTypeRemovalException
org.apache.jackrabbit.ocm.nodemanagement.NodeTypeManager#removeNodeTypes
public void removeNodeTypesFromMappingFile(javax.jcr.Session session, InputStream[] mappingXmlFile) throws NodeTypeRemovalException
NodeTypeManager
removeNodeTypesFromMappingFile
in interface NodeTypeManager
session
- Repository sessionmappingXmlFile
- InputStreams to jcr-mapping xml file
NodeTypeRemovalException
- NodeTypeRemovalExceptionNodeTypeManager.createSingleNodeTypeFromMappingFile(javax.jcr.Session, java.io.InputStream, java.lang.String)
public void removeSingleNodeType(javax.jcr.Session session, Name name) throws NodeTypeRemovalException
NodeTypeRemovalException
public void removeSingleNodeType(javax.jcr.Session session, String jcrNodeType) throws NodeTypeRemovalException
NodeTypeManager
removeSingleNodeType
in interface NodeTypeManager
session
- Repository session
NodeTypeRemovalException
- NodeTypeRemovalExceptionNodeTypeManager.removeSingleNodeType(javax.jcr.Session, java.lang.String)
public List getPrimaryNodeTypeNames(javax.jcr.Session session, String namespace)
NodeTypeManager
getPrimaryNodeTypeNames
in interface NodeTypeManager
namespace
- Name of nodetypes to return
NodeTypeManager.getPrimaryNodeTypeNames(javax.jcr.Session, java.lang.String)
public List getAllPrimaryNodeTypeNames(javax.jcr.Session session)
NodeTypeManager
getAllPrimaryNodeTypeNames
in interface NodeTypeManager
NodeTypeManager.getAllPrimaryNodeTypeNames(javax.jcr.Session)
public NamespaceHelper getNamespaceHelper()
public void setNamespaceHelper(NamespaceHelper object)
object
- namespaceHelper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |