From graffito-commits-return-794-apmail-incubator-graffito-commits-archive=www.apache.org@incubator.apache.org Wed Oct 18 21:40:34 2006 Return-Path: Delivered-To: apmail-incubator-graffito-commits-archive@www.apache.org Received: (qmail 34465 invoked from network); 18 Oct 2006 21:40:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2006 21:40:34 -0000 Received: (qmail 12021 invoked by uid 500); 18 Oct 2006 21:40:34 -0000 Mailing-List: contact graffito-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: graffito-dev@incubator.apache.org Delivered-To: mailing list graffito-commits@incubator.apache.org Received: (qmail 12010 invoked by uid 99); 18 Oct 2006 21:40:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 14:40:34 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 14:40:33 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C43611A981A; Wed, 18 Oct 2006 14:40:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: graffito-commits@incubator.apache.org From: clombart@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061018214012.C43611A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 Lombart Christophe * @author Alexandru Popescu */ -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 Felix Meschberger + */ +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 Lombart Christophe * */ -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 Lombart Christophe * */ -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 Felix Meschberger + */ +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 = *