incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From okiess...@apache.org
Subject svn commit: r330376 - in /incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement: NodeTypeManager.java impl/jackrabbit/NodeTypeManagerImpl.java
Date Wed, 02 Nov 2005 22:15:21 GMT
Author: okiessler
Date: Wed Nov  2 14:15:16 2005
New Revision: 330376

URL: http://svn.apache.org/viewcvs?rev=330376&view=rev
Log:
Issue: GRFT-67

Modified:
    incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/NodeTypeManager.java
    incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java

Modified: incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/NodeTypeManager.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/NodeTypeManager.java?rev=330376&r1=330375&r2=330376&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/NodeTypeManager.java
(original)
+++ incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/NodeTypeManager.java
Wed Nov  2 14:15:16 2005
@@ -20,6 +20,7 @@
 
 import javax.jcr.Session;
 
+import org.apache.portals.graffito.jcr.mapper.model.ClassDescriptor;
 import org.apache.portals.graffito.jcr.mapper.model.MappingDescriptor;
 import org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException;
 import org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException;
@@ -32,11 +33,18 @@
  * not defined by the JSR-170 spec. The default implementation of graffito
  * jcr-nodemanagement is Jackrabbit.
  *
+ * In order to create JCR custom node types you need to provide an established
+ * session to a JCR repository. The user that is logged into has to have the
+ * necessary permissions to create nodes (user has to have "superuser" rights).
+ * 
+ * The JCR Node Type Management tools are an extension to the graffito jcr-mapping
+ * tools. NodeTypeManager implementations depend on the graffito jcr-mapping
+ * xml file and the object model defined by graffito jcr-mapping.
+ *
  * @author <a href="mailto:okiessler@apache.org">Oliver Kiessler</a>
  */
 public interface NodeTypeManager
 {
-
     /** Creates a new namespace in the repository.
      * 
      * @param namespace Namespace
@@ -46,7 +54,7 @@
 
     /** This method creates JCR node types based on the MappingDescriptor object
      * which is created by a graffito jcr-mapping Mapper implementation. A
-     * Mapper reads the graffito-jcr mapping XML File. 
+     * Mapper reads one to many graffito-jcr mapping XML File. 
      * 
      * @param session Repository session 
      * @param mappingDescriptor Mapping descriptor object created by graffito jcr-mapping
@@ -54,32 +62,41 @@
      */
     void createNodeTypes(Session session, MappingDescriptor mappingDescriptor) throws NodeTypeCreationException;
 
-    /** This method creates JCR node types based on a graffito jcr-mapping xml
-     * file.
+    /** This method creates JCR node types based on ClassDescriptor objects
+     * which are created by a graffito jcr-mapping Mapper implementation. A
+     * Mapper reads one to many graffito-jcr mapping XML File. 
      * 
      * @param session Repository session 
-     * @param mappingXmlFile InputStream to a graffito jcr-mapping xml file
+     * @param classDescriptors Array of ClassDescriptor objects created by graffito jcr-mapping
+     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
NodeTypeCreationException 
+     */
+    void createNodeTypes(Session session, ClassDescriptor[] classDescriptors) throws NodeTypeCreationException;
   
+    
+    /** This method creates JCR node types based on graffito jcr-mapping xml
+     * files.
+     * 
+     * @param session Repository session 
+     * @param mappingXmlFiles InputStreams to graffito jcr-mapping xml files
      * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
NodeTypeCreationException
      */
-    void createNodeTypesFromMappingFile(Session session, InputStream mappingXmlFile) throws
NodeTypeCreationException;
+    void createNodeTypesFromMappingFiles(Session session, InputStream[] mappingXmlFiles)
throws NodeTypeCreationException;
 
-    /** This method creates a single JCR node type identified by its jcrNodeType
-     * name defined in a graffito jcr-mapping xml file. The MappingDescriptor
-     * object which is created by a graffito jcr-mapping Mapper implementation.
+    /** This method creates a single JCR node type identified by its ClassDescriptor
+     * read from the graffito-jcr mapping file.
      * 
      * @param session Repository session
-     * @param mappingDescriptor Mapping descriptor object created by graffito jcr-mapping

+     * @param classDescriptor ClassDescriptor object created by graffito jcr-mapping 
      * @param jcrNodeType Name of the class that needs to be created identified by its jcrNodeType
name
      * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
NodeTypeCreationException
      */
-    void createSingleNodeType(Session session, MappingDescriptor mappingDescriptor, String
jcrNodeType) throws NodeTypeCreationException;
+    void createSingleNodeType(Session session, ClassDescriptor classDescriptor) throws NodeTypeCreationException;
 
     /** This method creates a single JCR node type identified by its jcrNodeType name defined
in a graffito jcr-mapping xml file.
      * 
      * @param session Repository session
      * @param mappingXmlFile InputStream to a graffito jcr-mapping xml file 
      * @param jcrNodeType Name of the class that needs to be created identified by its jcrNodeType
name 
-     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException

+     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
NodeTypeCreationException
      */
     void createSingleNodeTypeFromMappingFile(Session session, InputStream mappingXmlFile,
String jcrNodeType) throws NodeTypeCreationException;
 
@@ -93,25 +110,25 @@
      * @param clazz Java class
      * @param jcrNodeType Name of JCR node type (including namespace)
      * @param reflectSuperClasses If true, all base classes are also reflected
-     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException

+     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
NodeTypeCreationException
      */
     void createNodeTypeFromClass(Session session, Class clazz, String jcrNodeType, boolean
reflectSuperClasses) throws NodeTypeCreationException;
     
-    /** This method removes all JCR node types that are defined in a given 
-     * graffito jcr-mapping XML file.
+    /** This method removes all JCR node types that are defined in one to many 
+     * graffito jcr-mapping XML files.
      * 
      * @param session Repository session 
-     * @param mappingXmlFile InputStream to a graffito jcr-mapping xml file  
-     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException

+     * @param mappingXmlFiles InputStreams to graffito jcr-mapping xml file  
+     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException
NodeTypeRemovalException
      */
-    void removeNodeTypes(Session session, InputStream mappingXmlFile) throws NodeTypeRemovalException;
+    void removeNodeTypes(Session session, InputStream[] mappingXmlFiles) throws NodeTypeRemovalException;
     
     /** This method removes a single JCR node type identified by its jcrNodeType
      * name.
      * 
      * @param session Repository session
      * @param jcrNodeType 
-     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException

+     * @throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException
NodeTypeRemovalException
      */
     void removeSingleNodeType(Session session, String jcrNodeType) throws NodeTypeRemovalException;
 

Modified: incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java?rev=330376&r1=330375&r2=330376&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java
(original)
+++ incubator/graffito/trunk/jcr-nodemanagement/src/java/org/apache/portals/graffito/jcr/nodemanagement/impl/jackrabbit/NodeTypeManagerImpl.java
Wed Nov  2 14:15:16 2005
@@ -21,41 +21,57 @@
  *
  * @author <a href="mailto:okiessler@apache.org">Oliver Kiessler</a>
  */
-public class NodeTypeManagerImpl implements NodeTypeManager {
+public class NodeTypeManagerImpl implements NodeTypeManager
+{
     
     /** Creates a new instance of NodeTypeManagerImpl. */
-    public NodeTypeManagerImpl() {
+    public NodeTypeManagerImpl()
+    {
     }
 
-    public void createNamespace(String namespace, String namespaceUri) {
+    public void createNamespace(String namespace, String namespaceUri)
+    {
     }
 
-    public void createNodeTypeFromClass(javax.jcr.Session session, Class clazz, String jcrNodeType,
boolean reflectSuperClasses) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
{
+    public void createNodeTypeFromClass(javax.jcr.Session session, Class clazz, String jcrNodeType,
boolean reflectSuperClasses) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
+    {
     }
 
-    public void createNodeTypes(javax.jcr.Session session, org.apache.portals.graffito.jcr.mapper.model.MappingDescriptor
mappingDescriptor) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
{
+    public void createNodeTypes(javax.jcr.Session session, org.apache.portals.graffito.jcr.mapper.model.ClassDescriptor[]
classDescriptors) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
+    {
     }
 
-    public void createNodeTypesFromMappingFile(javax.jcr.Session session, java.io.InputStream
mappingXmlFile) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
{
+    public void createNodeTypes(javax.jcr.Session session, org.apache.portals.graffito.jcr.mapper.model.MappingDescriptor
mappingDescriptor) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
+    {
     }
 
-    public void createSingleNodeType(javax.jcr.Session session, org.apache.portals.graffito.jcr.mapper.model.MappingDescriptor
mappingDescriptor, String jcrNodeType) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
{
+    public void createNodeTypesFromMappingFiles(javax.jcr.Session session, java.io.InputStream[]
mappingXmlFiles) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
+    {
     }
 
-    public void createSingleNodeTypeFromMappingFile(javax.jcr.Session session, java.io.InputStream
mappingXmlFile, String jcrNodeType) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
{
+    public void createSingleNodeType(javax.jcr.Session session, org.apache.portals.graffito.jcr.mapper.model.ClassDescriptor
classDescriptor) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
+    {
     }
 
-    public java.util.List getAllPrimaryNodeTypeNames() {
+    public void createSingleNodeTypeFromMappingFile(javax.jcr.Session session, java.io.InputStream
mappingXmlFile, String jcrNodeType) throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeCreationException
+    {
+    }
+
+    public java.util.List getAllPrimaryNodeTypeNames()
+    {
         return null;
     }
 
-    public java.util.List getPrimaryNodeTypeNames(String namespace) {
+    public java.util.List getPrimaryNodeTypeNames(String namespace)
+    {
         return null;
     }
 
-    public void removeNodeTypes(javax.jcr.Session session, java.io.InputStream mappingXmlFile)
throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException {
+    public void removeNodeTypes(javax.jcr.Session session, java.io.InputStream[] mappingXmlFiles)
throws org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException
+    {
     }
 
-    public void removeSingleNodeType(javax.jcr.Session session, String jcrNodeType) throws
org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException {
+    public void removeSingleNodeType(javax.jcr.Session session, String jcrNodeType) throws
org.apache.portals.graffito.jcr.nodemanagement.exception.NodeTypeRemovalException
+    {
     }
 }



Mime
View raw message