You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2007/04/11 19:49:44 UTC
svn commit: r527637 - in /incubator/graffito/trunk/jcr/jcr-mapping/src:
test-config/jcrmapping-jcrnodetypes.xml
test-config/nodetypes/custom_nodetypes.xml
test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrPropertyTest.java
Author: clombart
Date: Wed Apr 11 12:49:43 2007
New Revision: 527637
URL: http://svn.apache.org/viewvc?view=rev&rev=527637
Log:
end of GRFT-84. all kind of jcr properties are supported
Modified:
incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml
incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml
incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrPropertyTest.java
Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml?view=diff&rev=527637&r1=527636&r2=527637
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/jcrmapping-jcrnodetypes.xml Wed Apr 11 12:49:43 2007
@@ -39,19 +39,7 @@
<field-descriptor fieldName="autoCreatedWithConstraintsProp" jcrName="graffito:autoCreatedWithConstraintsProp" jcrDefaultValue="ccc" jcrValueConstraints="bbb,ccc,ddd"/>
<field-descriptor fieldName="mandatoryProp" jcrName="graffito:mandatoryProp" jcrMandatory="true" />
<field-descriptor fieldName="mandatoryWithConstaintsProp" jcrName="graffito:mandatoryWithConstaintsProp" jcrMandatory="true" jcrValueConstraints="xx,yy"/>
-
- </class-descriptor>
-
- <!-- class-descriptor className="org.apache.portals.graffito.jcr.testmodel.PropertyTest" jcrNodeType="graffito:propertytest" >
- <field-descriptor fieldName="path" path="true" />
- <field-descriptor fieldName="requiredProp" jcrName="graffito:requiredProp" />
- <field-descriptor fieldName="requiredWithConstraintsProp" jcrName="graffito:requiredWithConstraintsProp" />
- <field-descriptor fieldName="autoCreadedProp" jcrName="graffito:autoCreadedProp" />
- <field-descriptor fieldName="autoCreatedWithConstraintsProp" jcrName="graffito:autoCreatedWithConstraintsProp" />
- <field-descriptor fieldName="mandatoryProp" jcrName="graffito:mandatoryProp" />
- <field-descriptor fieldName="mandatoryWithConstaintsProp" jcrName="graffito:mandatoryWithConstaintsProp" />
- <field-descriptor fieldName="protectedWithDefaultValueProp" jcrName="graffito:protectedWithDefaultValueProp" />
- </class-descriptor -->
-
+ <field-descriptor fieldName="protectedWithDefaultValueProp" jcrName="graffito:protectedWithDefaultValueProp" jcrProtected="true"/>
+ </class-descriptor>
</graffito-jcr>
Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml?view=diff&rev=527637&r1=527636&r2=527637
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test-config/nodetypes/custom_nodetypes.xml Wed Apr 11 12:49:43 2007
@@ -205,8 +205,12 @@
<valueConstraint>xx</valueConstraint>
<valueConstraint>yy</valueConstraint>
</valueConstraints>
+ </propertyDefinition>
+ <propertyDefinition name="graffito:protectedWithDefaultValueProp" requiredType="String" autoCreated="true" mandatory="false" onParentVersion="COPY" protected="true" multiple="false" >
+ <defaultValues>
+ <defaultValue>protectedValue</defaultValue>
+ </defaultValues>
</propertyDefinition>
-
</nodeType>
</nodeTypes>
Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrPropertyTest.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrPropertyTest.java?view=diff&rev=527637&r1=527636&r2=527637
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrPropertyTest.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrPropertyTest.java Wed Apr 11 12:49:43 2007
@@ -98,6 +98,7 @@
assertTrue("Invalid required property with constraints", propertyTest.getRequiredWithConstraintsProp().equals("abc"));
assertTrue("Invalid autocreated property", propertyTest.getAutoCreatedProp().equals("aaa"));
assertTrue("Invalid autocreated property", propertyTest.getAutoCreatedWithConstraintsProp().equals("ccc"));
+ assertTrue("Invalid protected property", propertyTest.getProtectedWithDefaultValueProp().equals("protectedValue"));
//---------------------------------------------------------------------------------------------------------
// update the property requiredWithConstraintsProp with bad value