|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.ocm.nodemanagement.impl.jeceira.NodeTypeManagerImpl
public class NodeTypeManagerImpl
This is the NodeTypeManager implementation for Jeceira.
Constructor Summary | |
---|---|
NodeTypeManagerImpl()
Creates a new instance of NodeTypeManagerImpl. |
Method Summary | |
---|---|
void |
createNamespace(Session session,
String namespace,
String namespaceUri)
Creates a new namespace in the repository. |
void |
createNodeTypeFromClass(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(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(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(Session session,
InputStream jcrRepositoryConfigurationFile)
This method creates JCR node types from a JCR vendor specific configuration file. |
void |
createNodeTypesFromMappingFiles(Session session,
InputStream[] mappingXmlFiles)
This method creates JCR node types based on jcr-mapping xml files. |
void |
createSingleNodeType(Session session,
ClassDescriptor classDescriptor)
This method creates a single JCR node type identified by its ClassDescriptor read from the jcr mapping file. |
void |
createSingleNodeTypeFromMappingFile(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(Session session)
Returns a list of all JCR node types. |
List |
getPrimaryNodeTypeNames(Session session,
String namespace)
Returns the names of all node types in the repository identified by a given namespace. |
void |
removeNodeTypes(Session session,
InputStream[] mappingXmlFiles)
|
void |
removeNodeTypesFromConfiguration(Session session,
InputStream jcrRepositoryConfigurationFile)
This method removes JCR node types from a JCR vendor specific configuration file |
void |
removeNodeTypesFromMappingFile(Session session,
InputStream[] mappingXmlFiles)
This method removes all JCR node types that are defined in one to many jcr-mapping XML files. |
void |
removeSingleNodeType(Session session,
String jcrNodeType)
This method removes a single JCR node type identified by its jcrNodeType name. |
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(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(Session session, MappingDescriptor mappingDescriptor) throws NodeTypeCreationException
NodeTypeManager
createNodeTypes
in interface NodeTypeManager
session
- Repository sessionmappingDescriptor
- Mapping descriptor object created by
jcr-mapping
NodeTypeCreationException
- NodeTypeCreationExceptionpublic void createNodeTypes(Session session, ClassDescriptor[] classDescriptors) throws NodeTypeCreationException
NodeTypeManager
createNodeTypes
in interface NodeTypeManager
session
- Repository sessionclassDescriptors
- Array of ClassDescriptor objects created by
jcr-mapping
NodeTypeCreationException
- NodeTypeCreationExceptionpublic void createNodeTypesFromMappingFiles(Session session, InputStream[] mappingXmlFiles) throws NodeTypeCreationException
NodeTypeManager
createNodeTypesFromMappingFiles
in interface NodeTypeManager
session
- Repository sessionmappingXmlFiles
- InputStreams to jcr-mapping xml files
NodeTypeCreationException
- NodeTypeCreationExceptionpublic void createSingleNodeType(Session session, ClassDescriptor classDescriptor) throws NodeTypeCreationException
NodeTypeManager
createSingleNodeType
in interface NodeTypeManager
session
- Repository sessionclassDescriptor
- ClassDescriptor object created by jcr-mapping
NodeTypeCreationException
- NodeTypeCreationExceptionpublic void createSingleNodeTypeFromMappingFile(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
- NodeTypeCreationExceptionpublic void createNodeTypeFromClass(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
- NodeTypeCreationExceptionpublic void createNodeTypesFromConfiguration(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 removeNodeTypes(Session session, InputStream[] mappingXmlFiles) throws NodeTypeRemovalException
NodeTypeRemovalException
public void removeSingleNodeType(Session session, String jcrNodeType) throws NodeTypeRemovalException
NodeTypeManager
removeSingleNodeType
in interface NodeTypeManager
session
- Repository session
NodeTypeRemovalException
- NodeTypeRemovalExceptionpublic List getPrimaryNodeTypeNames(Session session, String namespace)
NodeTypeManager
getPrimaryNodeTypeNames
in interface NodeTypeManager
namespace
- Name of nodetypes to return
public List getAllPrimaryNodeTypeNames(Session session)
NodeTypeManager
getAllPrimaryNodeTypeNames
in interface NodeTypeManager
public void removeNodeTypesFromConfiguration(Session session, InputStream jcrRepositoryConfigurationFile) throws NodeTypeRemovalException
NodeTypeManager
removeNodeTypesFromConfiguration
in interface NodeTypeManager
session
- Repository sessionjcrRepositoryConfigurationFile
- the file that contains the node type definition
NodeTypeRemovalException
public void removeNodeTypesFromMappingFile(Session session, InputStream[] mappingXmlFiles) throws NodeTypeRemovalException
NodeTypeManager
removeNodeTypesFromMappingFile
in interface NodeTypeManager
session
- Repository sessionmappingXmlFiles
- InputStreams to jcr-mapping xml file
NodeTypeRemovalException
- NodeTypeRemovalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |