jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r160043 - in incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype: ChildItemDef.java virtual/VirtualNodeTypeStateProvider.java
Date Mon, 04 Apr 2005 13:55:23 GMT
Author: tripod
Date: Mon Apr  4 06:55:22 2005
New Revision: 160043

URL: http://svn.apache.org/viewcvs?view=rev&rev=160043
Log:
- fixing residual jcr:name property in virtual nodetypes representation

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildItemDef.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildItemDef.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildItemDef.java?view=diff&r1=160042&r2=160043
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildItemDef.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildItemDef.java
Mon Apr  4 06:55:22 2005
@@ -27,7 +27,7 @@
 public abstract class ChildItemDef implements Cloneable {
 
     // '*' denoting residual child item definition
-    protected static final QName ANY_NAME =
+    public static final QName ANY_NAME =
             new QName(Constants.NS_DEFAULT_URI, "*");
 
     protected QName declaringNodeType = null;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java?view=diff&r1=160042&r2=160043
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
Mon Apr  4 06:55:22 2005
@@ -27,11 +27,13 @@
 import org.apache.jackrabbit.core.nodetype.PropDef;
 import org.apache.jackrabbit.core.nodetype.ChildNodeDef;
 import org.apache.jackrabbit.core.nodetype.ValueConstraint;
+import org.apache.jackrabbit.core.nodetype.ChildItemDef;
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.NoSuchItemStateException;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.PropertyType;
+import javax.jcr.nodetype.ItemDef;
 import javax.jcr.version.OnParentVersionAction;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
@@ -188,7 +190,9 @@
         String uuid = calculateStableUUID(ntDef.getName().toString() + "/" + JCR_PROPERTYDEF.toString()
+ "/" + n);
         VirtualNodeState pState = createNodeState(parent, JCR_PROPERTYDEF, uuid, NT_PROPERTYDEF);
         // add properties
-        pState.setPropertyValue(JCR_NAME, InternalValue.create(propDef.getName()));
+        if (!propDef.getName().equals(ChildItemDef.ANY_NAME)) {
+            pState.setPropertyValue(JCR_NAME, InternalValue.create(propDef.getName()));
+        }
         pState.setPropertyValue(JCR_AUTOCREATE, InternalValue.create(propDef.isAutoCreate()));
         pState.setPropertyValue(JCR_MANDATORY, InternalValue.create(propDef.isMandatory()));
         pState.setPropertyValue(JCR_ONPARENTVERSION, InternalValue.create(OnParentVersionAction.nameFromValue(propDef.getOnParentVersion())));
@@ -219,7 +223,9 @@
         String uuid = calculateStableUUID(ntDef.getName().toString() + "/" + JCR_CHILDNODEDEF.toString()
+ "/" + n);
         VirtualNodeState pState = createNodeState(parent, JCR_CHILDNODEDEF, uuid, NT_CHILDNODEDEF);
         // add properties
-        pState.setPropertyValue(JCR_NAME, InternalValue.create(cnDef.getName()));
+        if (!cnDef.getName().equals(ChildItemDef.ANY_NAME)) {
+            pState.setPropertyValue(JCR_NAME, InternalValue.create(cnDef.getName()));
+        }
         pState.setPropertyValue(JCR_AUTOCREATE, InternalValue.create(cnDef.isAutoCreate()));
         pState.setPropertyValue(JCR_MANDATORY, InternalValue.create(cnDef.isMandatory()));
         pState.setPropertyValue(JCR_ONPARENTVERSION, InternalValue.create(OnParentVersionAction.nameFromValue(cnDef.getOnParentVersion())));



Mime
View raw message