incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r465378 - in /incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model: BeanDescriptor.java ChildNodeDefDescriptor.java CollectionDescriptor.java FieldDescriptor.java PropertyDefDescriptor.java
Date Wed, 18 Oct 2006 21:40:12 GMT
Author: clombart
Date: Wed Oct 18 14:40:11 2006
New Revision: 465378

URL: http://svn.apache.org/viewvc?view=rev&rev=465378
Log:
Patch for GRFT-111 provided by Felix Meschberger

Added:
    incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ChildNodeDefDescriptor.java
  (with props)
    incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/PropertyDefDescriptor.java
  (with props)
Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/BeanDescriptor.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/BeanDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/BeanDescriptor.java?view=diff&rev=465378&r1=465377&r2=465378
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/BeanDescriptor.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/BeanDescriptor.java
Wed Oct 18 14:40:11 2006
@@ -26,7 +26,7 @@
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe
</a>
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  */
-public class BeanDescriptor {
+public class BeanDescriptor implements ChildNodeDefDescriptor, PropertyDefDescriptor {
     private ClassDescriptor classDescriptor;
     
     private String fieldName;
@@ -39,11 +39,13 @@
     private String converter;
     private BeanConverter beanConverter;
     private String jcrNodeType;
+    private String jcrType;
     private boolean jcrAutoCreated;
     private boolean jcrMandatory;
     private String jcrOnParentVersion;
     private boolean jcrProtected;
     private boolean jcrSameNameSiblings;
+    private boolean jcrMultiple;
 
     /**
      * @return Returns the fieldName.
@@ -167,6 +169,24 @@
         this.jcrNodeType = value;
     }
 
+    /**
+     * Getter for property jcrType.
+     * 
+     * @return jcrType
+     */
+    public String getJcrType() {
+        return jcrType;
+    }
+
+    /**
+     * Setter for property jcrType.
+     * 
+     * @param value jcrType
+     */
+    public void setJcrType(String value) {
+        this.jcrType = value;
+    }
+
     /** Getter for property jcrAutoCreated.
      *
      * @return jcrAutoCreated
@@ -245,6 +265,24 @@
      */
     public void setJcrSameNameSiblings(boolean value) {
         this.jcrSameNameSiblings = value;
+    }
+
+    /**
+     * Getter for property jcrMultiple.
+     * 
+     * @return jcrMultiple
+     */
+    public boolean isJcrMultiple() {
+        return jcrMultiple;
+    }
+
+    /**
+     * Setter for property jcrMultiple.
+     * 
+     * @param value jcrMultiple
+     */
+    public void setJcrMultiple(boolean value) {
+        this.jcrMultiple = value;
     }
 
     /**

Added: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ChildNodeDefDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ChildNodeDefDescriptor.java?view=auto&rev=465378
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ChildNodeDefDescriptor.java
(added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ChildNodeDefDescriptor.java
Wed Oct 18 14:40:11 2006
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.mapper.model;
+
+/**
+ * ChildNodeDefDescriptor is used by the node type management tools based on
+ * class descriptors to manage child node definitions
+ *
+ * @author <a href="mailto:fmeschbe[at]apache[dot]com">Felix Meschberger</a>
+ */
+public interface ChildNodeDefDescriptor {
+
+    /**
+     * @return Returns the name of the property.
+     */
+    String getJcrName();
+
+    /**
+     * @return Returns the child node type name.
+     */
+    String getJcrNodeType();
+
+    /**
+     * @return Whether the child node is auto created.
+     */
+    boolean isJcrAutoCreated();
+
+    /**
+     * @return Whether the child node is mandatory.
+     */
+    boolean isJcrMandatory();
+
+    /**
+     * @return What to do on parent version creation.
+     */
+    String getJcrOnParentVersion();
+
+    /**
+     * @return Whether the child node is protected.
+     */
+    boolean isJcrProtected();
+
+    /**
+     * @return Whether the child node definition allows for same name sibblings.
+     */
+    boolean isJcrSameNameSiblings();
+}
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/ChildNodeDefDescriptor.java
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java?view=diff&rev=465378&r1=465377&r2=465378
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/CollectionDescriptor.java
Wed Oct 18 14:40:11 2006
@@ -22,7 +22,7 @@
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe
</a>
  * 
  */
-public class CollectionDescriptor
+public class CollectionDescriptor implements ChildNodeDefDescriptor, PropertyDefDescriptor
 {
 
      private String fieldName;
@@ -35,11 +35,13 @@
      private boolean autoUpdate = true;
      private boolean autoInsert = true;     
      private String jcrNodeType;
+     private String jcrType;
      private boolean jcrAutoCreated;
      private boolean jcrMandatory;
      private String jcrOnParentVersion;
      private boolean jcrProtected;
      private boolean jcrSameNameSiblings;     
+     private boolean jcrMultiple;
      
      private ClassDescriptor classDescriptor;
     
@@ -197,6 +199,24 @@
         this.jcrNodeType = value;
     }
 
+    /**
+     * Getter for property jcrType.
+     * 
+     * @return jcrType
+     */
+    public String getJcrType() {
+        return jcrType;
+    }
+
+    /**
+     * Setter for property jcrType.
+     * 
+     * @param value jcrType
+     */
+    public void setJcrType(String value) {
+        this.jcrType = value;
+    }
+
     /** Getter for property jcrAutoCreated.
      * 
      * @return jcrAutoCreated
@@ -287,6 +307,24 @@
         this.jcrSameNameSiblings = value;
     }
     
+    /**
+     * Getter for property jcrMultiple.
+     * 
+     * @return jcrMultiple
+     */
+    public boolean isJcrMultiple() {
+        return jcrMultiple;
+    }
+
+    /**
+     * Setter for property jcrMultiple.
+     * 
+     * @param value jcrMultiple
+     */
+    public void setJcrMultiple(boolean value) {
+        this.jcrMultiple = value;
+    }
+
 	public String toString() {
 		
 		return "Collection Descriptor : " +  this.getFieldName();

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java?view=diff&rev=465378&r1=465377&r2=465378
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/FieldDescriptor.java
Wed Oct 18 14:40:11 2006
@@ -27,7 +27,7 @@
  * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe
</a>
  *
  */
-public class FieldDescriptor {
+public class FieldDescriptor implements PropertyDefDescriptor {
     private String fieldName;
     private String fieldType;
     private Class fieldTypeClass;

Added: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/PropertyDefDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/PropertyDefDescriptor.java?view=auto&rev=465378
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/PropertyDefDescriptor.java
(added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/PropertyDefDescriptor.java
Wed Oct 18 14:40:11 2006
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2000-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.mapper.model;
+
+/**
+ * PropertyDefDescriptor is used by the node type management tools based on
+ * class descriptors to manage property definitions
+ *
+ * @author <a href="mailto:fmeschbe[at]apache[dot]com">Felix Meschberger</a>
+ */
+public interface PropertyDefDescriptor {
+
+    /**
+     * @return Returns the name of the property.
+     */
+    String getJcrName();
+
+    /**
+     * @return Returns the property type name.
+     */
+    String getJcrType();
+
+    /**
+     * @return Whether the property is auto created.
+     */
+    boolean isJcrAutoCreated();
+
+    /**
+     * @return Whether the property is mandatory.
+     */
+    boolean isJcrMandatory();
+
+    /**
+     * @return What to do on parent version creation.
+     */
+    String getJcrOnParentVersion();
+
+    /**
+     * @return Whether the property is protected.
+     */
+    boolean isJcrProtected();
+
+    /**
+     * @return Whether the property is multi-valued.
+     */
+    boolean isJcrMultiple();
+}
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/mapper/model/PropertyDefDescriptor.java
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message