jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r813788 - in /jackrabbit/sandbox/JCR-2170: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ j...
Date Fri, 11 Sep 2009 12:06:36 GMT
Author: mreutegg
Date: Fri Sep 11 12:06:31 2009
New Revision: 813788

URL: http://svn.apache.org/viewvc?rev=813788&view=rev
Log:
JCR-2170: Remove PropDefId and NodeDefId
- replace Node/PropertyDefinitionImpl (jackrabbit-core) with classes from spi-commons

Removed:
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ItemDefinitionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefinitionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropertyDefinitionImpl.java
Modified:
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ProtectedItemModifier.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropDefId.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryObjectModelImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
Fri Sep 11 12:06:31 2009
@@ -52,7 +52,6 @@
 import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.core.nodetype.PropertyDefinitionImpl;
 import org.apache.jackrabbit.core.security.AccessManager;
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.state.ChildNodeEntry;
@@ -480,7 +479,7 @@
                 // the transient item is a property
                 PropertyState propState = (PropertyState) itemState;
                 ItemId propId = propState.getPropertyId();
-                PropertyDefinitionImpl propDef = (PropertyDefinitionImpl) def;
+                org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl propDef
= (org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl) def;
 
                 /**
                  * check value constraints

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemManager.java
Fri Sep 11 12:06:31 2009
@@ -34,8 +34,6 @@
 import org.apache.jackrabbit.core.id.ItemId;
 import org.apache.jackrabbit.core.id.NodeId;
 import org.apache.jackrabbit.core.id.PropertyId;
-import org.apache.jackrabbit.core.nodetype.NodeDefinitionImpl;
-import org.apache.jackrabbit.core.nodetype.PropertyDefinitionImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
 import org.apache.jackrabbit.core.nodetype.EffectiveNodeType;
 import org.apache.jackrabbit.core.nodetype.NodeTypeConflictException;
@@ -86,7 +84,7 @@
 
     private static Logger log = LoggerFactory.getLogger(ItemManager.class);
 
-    private final NodeDefinitionImpl rootNodeDef;
+    private final org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl rootNodeDef;
     private final NodeId rootNodeId;
 
     protected final SessionImpl session;
@@ -117,7 +115,7 @@
     protected ItemManager(SessionItemStateManager sism,
                           HierarchyManager hierMgr,
                           SessionImpl session,
-                          NodeDefinitionImpl rootNodeDef,
+                          org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl rootNodeDef,
                           NodeId rootNodeId) {
         this.sism = sism;
         this.hierMgr = hierMgr;
@@ -147,7 +145,7 @@
             SessionItemStateManager itemStateProvider,
             HierarchyManager hierMgr,
             SessionImpl session,
-            NodeDefinitionImpl rootNodeDef,
+            org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl rootNodeDef,
             NodeId rootNodeId) {
         ItemManager mgr = new ItemManager(itemStateProvider, hierMgr,
                 session, rootNodeDef, rootNodeId);
@@ -165,7 +163,7 @@
         shareableNodesCache.clear();
     }
 
-    NodeDefinitionImpl getDefinition(NodeState state)
+    org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl getDefinition(NodeState
state)
             throws RepositoryException {
         if (state.getId().equals(rootNodeId)) {
             // special handling required for root node
@@ -212,7 +210,7 @@
         }
     }
 
-    PropertyDefinitionImpl getDefinition(PropertyState state)
+    org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl getDefinition(PropertyState
state)
             throws RepositoryException {
         try {
             NodeImpl parent = (NodeImpl) getItem(state.getParentId());

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Fri Sep 11 12:06:31 2009
@@ -71,12 +71,10 @@
 import org.apache.jackrabbit.core.id.NodeId;
 import org.apache.jackrabbit.core.id.PropertyId;
 import org.apache.jackrabbit.core.nodetype.EffectiveNodeType;
-import org.apache.jackrabbit.core.nodetype.NodeDefinitionImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeConflictException;
 import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.core.nodetype.PropertyDefinitionImpl;
 import org.apache.jackrabbit.core.query.QueryManagerImpl;
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.state.ChildNodeEntry;
@@ -107,6 +105,8 @@
 import static org.apache.jackrabbit.spi.commons.name.NameConstants.JCR_CURRENT_LIFECYCLE_STATE;
 import static org.apache.jackrabbit.spi.commons.name.NameConstants.MIX_LIFECYCLE;
 import static org.apache.jackrabbit.spi.commons.name.NameConstants.MIX_REFERENCEABLE;
+import org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl;
+import org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl;
 
 /**
  * <code>NodeImpl</code> implements the <code>Node</code> interface.
@@ -358,7 +358,7 @@
         if (isNew() && !hasProperty(name)) {
             // this is a new node and the property does not exist yet
             // -> no need to check item manager
-            PropertyDefinitionImpl def = getApplicablePropertyDefinition(
+            org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl def = getApplicablePropertyDefinition(
                     name, type, multiValued, exactTypeMatch);
             PropertyImpl prop = createChildProperty(name, type, def);
             status.set(CREATED);
@@ -395,7 +395,7 @@
         } catch (ItemNotFoundException e) {
             // does not exist yet:
             // find definition for the specified property and create property
-            PropertyDefinitionImpl def = getApplicablePropertyDefinition(
+            org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl def = getApplicablePropertyDefinition(
                     name, type, multiValued, exactTypeMatch);
             PropertyImpl prop = createChildProperty(name, type, def);
             status.set(CREATED);
@@ -404,7 +404,7 @@
     }
 
     protected synchronized PropertyImpl createChildProperty(Name name, int type,
-                                                            PropertyDefinitionImpl def)
+                                                            org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl
def)
             throws RepositoryException {
 
         // create a new property state
@@ -491,14 +491,14 @@
         PropertyDefinition[] pda = nodeType.getAutoCreatedPropertyDefinitions();
         for (int i = 0; i < pda.length; i++) {
             PropertyDefinitionImpl pd = (PropertyDefinitionImpl) pda[i];
-            node.createChildProperty(pd.getQName(), pd.getRequiredType(), pd);
+            node.createChildProperty(pd.unwrap().getName(), pd.getRequiredType(), pd);
         }
 
         // recursively add 'auto-create' child nodes defined in node type
         NodeDefinition[] nda = nodeType.getAutoCreatedNodeDefinitions();
         for (int i = 0; i < nda.length; i++) {
             NodeDefinitionImpl nd = (NodeDefinitionImpl) nda[i];
-            node.createChildNode(nd.getQName(), (NodeTypeImpl) nd.getDefaultPrimaryType(),
null);
+            node.createChildNode(nd.unwrap().getName(), (NodeTypeImpl) nd.getDefaultPrimaryType(),
null);
         }
 
         return node;
@@ -566,7 +566,7 @@
     }
 
     protected void onRedefine(QNodeDefinition def) throws RepositoryException {
-        NodeDefinitionImpl newDef =
+        org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl newDef =
                 session.getNodeTypeManager().getNodeDefinition(def);
         // modify the state of 'this', i.e. the target node
         getOrCreateTransientItemState();
@@ -635,7 +635,7 @@
             prop = (PropertyImpl) itemMgr.getItem(new PropertyId(thisState.getNodeId(), NameConstants.JCR_MIXINTYPES));
         } else {
             // find definition for the jcr:mixinTypes property and create property
-            PropertyDefinitionImpl def = getApplicablePropertyDefinition(
+            org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl def = getApplicablePropertyDefinition(
                     NameConstants.JCR_MIXINTYPES, PropertyType.NAME, true, true);
             prop = createChildProperty(NameConstants.JCR_MIXINTYPES, PropertyType.NAME, def);
         }
@@ -698,7 +698,7 @@
      *                                      could be found
      * @throws RepositoryException          if another error occurs
      */
-    protected NodeDefinitionImpl getApplicableChildNodeDefinition(Name nodeName,
+    protected org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl getApplicableChildNodeDefinition(Name
nodeName,
                                                                   Name nodeTypeName)
             throws ConstraintViolationException, RepositoryException {
         NodeTypeManagerImpl ntMgr = session.getNodeTypeManager();
@@ -720,7 +720,7 @@
      *                                      could be found
      * @throws RepositoryException          if another error occurs
      */
-    protected PropertyDefinitionImpl getApplicablePropertyDefinition(Name propertyName,
+    protected org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl getApplicablePropertyDefinition(Name
propertyName,
                                                                      int type,
                                                                      boolean multiValued,
                                                                      boolean exactTypeMatch)
@@ -893,7 +893,7 @@
                 // or existing mixin's
                 NodeTypeImpl declaringNT = (NodeTypeImpl) pd.getDeclaringNodeType();
                 if (!entExisting.includesNodeType(declaringNT.getQName())) {
-                    createChildProperty(pd.getQName(), pd.getRequiredType(), pd);
+                    createChildProperty(pd.unwrap().getName(), pd.getRequiredType(), pd);
                 }
             }
 
@@ -905,7 +905,7 @@
                 // or existing mixin's
                 NodeTypeImpl declaringNT = (NodeTypeImpl) nd.getDeclaringNodeType();
                 if (!entExisting.includesNodeType(declaringNT.getQName())) {
-                    createChildNode(nd.getQName(), (NodeTypeImpl) nd.getDefaultPrimaryType(),
null);
+                    createChildNode(nd.unwrap().getName(), (NodeTypeImpl) nd.getDefaultPrimaryType(),
null);
                 }
             }
         } catch (RepositoryException re) {
@@ -1027,7 +1027,7 @@
                             removeChildProperty(propName);
                             continue;
                         }
-                        PropertyDefinitionImpl pdi = getApplicablePropertyDefinition(
+                        org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl
pdi = getApplicablePropertyDefinition(
                                 propName, propState.getType(),
                                 propState.isMultiValued(), false);
                         if (pdi.getRequiredType() != PropertyType.UNDEFINED
@@ -1090,7 +1090,7 @@
                             removeChildNode(entry.getName(), entry.getIndex());
                             continue;
                         }
-                        NodeDefinitionImpl ndi = getApplicableChildNodeDefinition(
+                        org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl ndi
= getApplicableChildNodeDefinition(
                                 entry.getName(),
                                 nodeState.getNodeTypeName());
                         // redefine node
@@ -1442,7 +1442,7 @@
         }
 
         // Get the applicable child node definition for this node.
-        NodeDefinitionImpl def;
+        org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl def;
         try {
             def = getApplicableChildNodeDefinition(nodeName, nodeTypeName);
         } catch (RepositoryException e) {
@@ -1881,7 +1881,7 @@
         session.getValidator().checkModify(this, options, Permission.NONE);
 
         // (4) check for name collisions
-        NodeDefinitionImpl def;
+        org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl def;
         try {
             def = getApplicableChildNodeDefinition(name, null);
         } catch (RepositoryException re) {
@@ -3733,7 +3733,7 @@
                             removeChildProperty(propName);
                             continue;
                         }
-                        PropertyDefinitionImpl pdi = getApplicablePropertyDefinition(
+                        org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl
pdi = getApplicablePropertyDefinition(
                                 propName, propState.getType(),
                                 propState.isMultiValued(), false);
                         if (pdi.getRequiredType() != PropertyType.UNDEFINED
@@ -3801,7 +3801,7 @@
                             removeChildNode(entry.getName(), entry.getIndex());
                             continue;
                         }
-                        NodeDefinitionImpl ndi = getApplicableChildNodeDefinition(
+                        org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl ndi
= getApplicableChildNodeDefinition(
                                 entry.getName(),
                                 nodeState.getNodeTypeName());
                         // redefine node
@@ -3827,10 +3827,10 @@
             if (def.isAutoCreated()) {
                 if (def.definesNode()) {
                     NodeDefinitionImpl ndi = ntMgr.getNodeDefinition((QNodeDefinition) def);
-                    createChildNode(ndi.getQName(), (NodeTypeImpl) ndi.getDefaultPrimaryType(),
null);
+                    createChildNode(def.getName(), (NodeTypeImpl) ndi.getDefaultPrimaryType(),
null);
                 } else {
                     PropertyDefinitionImpl pdi = ntMgr.getPropertyDefinition((QPropertyDefinition)
def);
-                    createChildProperty(pdi.getQName(), pdi.getRequiredType(), pdi);
+                    createChildProperty(pdi.unwrap().getName(), pdi.getRequiredType(), pdi);
                 }
             }
         }

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
Fri Sep 11 12:06:31 2009
@@ -38,7 +38,6 @@
 import javax.jcr.version.VersionException;
 
 import org.apache.jackrabbit.core.id.PropertyId;
-import org.apache.jackrabbit.core.nodetype.PropertyDefinitionImpl;
 import org.apache.jackrabbit.core.security.authorization.Permission;
 import org.apache.jackrabbit.core.state.ItemState;
 import org.apache.jackrabbit.core.state.ItemStateException;
@@ -167,7 +166,7 @@
     }
 
     protected void onRedefine(QPropertyDefinition def) throws RepositoryException {
-        PropertyDefinitionImpl newDef =
+        org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl newDef =
                 session.getNodeTypeManager().getPropertyDefinition(def);
         data.setDefinition(newDef);
     }

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ProtectedItemModifier.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ProtectedItemModifier.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ProtectedItemModifier.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ProtectedItemModifier.java
Fri Sep 11 12:06:31 2009
@@ -23,7 +23,6 @@
 import javax.jcr.Value;
 
 import org.apache.jackrabbit.core.id.NodeId;
-import org.apache.jackrabbit.core.nodetype.NodeDefinitionImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
 import org.apache.jackrabbit.core.retention.RetentionManagerImpl;
 import org.apache.jackrabbit.core.security.AccessManager;
@@ -70,7 +69,7 @@
         parentImpl.checkSetProperty();
 
         NodeTypeImpl nodeType = parentImpl.session.getNodeTypeManager().getNodeType(ntName);
-        NodeDefinitionImpl def = parentImpl.getApplicableChildNodeDefinition(name, ntName);
+        org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl def = parentImpl.getApplicableChildNodeDefinition(name,
ntName);
 
         // check for name collisions
         // TODO: improve. copied from NodeImpl

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
Fri Sep 11 12:06:31 2009
@@ -29,7 +29,6 @@
 import org.apache.jackrabbit.core.data.GarbageCollector;
 import org.apache.jackrabbit.core.id.NodeId;
 import org.apache.jackrabbit.core.lock.LockManager;
-import org.apache.jackrabbit.core.nodetype.NodeDefinitionImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
 import org.apache.jackrabbit.core.persistence.IterablePersistenceManager;
@@ -1081,7 +1080,7 @@
         // check constraints
         // get applicable definition of target node at new location
         NodeTypeImpl nt = (NodeTypeImpl) targetNode.getPrimaryNodeType();
-        NodeDefinitionImpl newTargetDef;
+        org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl newTargetDef;
         try {
             newTargetDef = destParentNode.getApplicableChildNodeDefinition(destName.getName(),
nt.getQName());
         } catch (RepositoryException re) {

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java
Fri Sep 11 12:06:31 2009
@@ -26,7 +26,7 @@
  * <code>NodeDefId</code> uniquely identifies a <code>NodeDef</code>
in the
  * node type registry.
  */
-public class NodeDefId implements Serializable {
+class NodeDefId implements Serializable {
 
     /**
      * Serialization UID of this class.

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java
Fri Sep 11 12:06:31 2009
@@ -21,6 +21,8 @@
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.QItemDefinition;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
+import org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl;
+import org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
Fri Sep 11 12:06:31 2009
@@ -64,8 +64,9 @@
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.namespace.NamespaceMapping;
-import org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeTypeManager;
-import org.apache.jackrabbit.spi.commons.nodetype.InvalidConstraintException;
+import org.apache.jackrabbit.spi.commons.nodetype.*;
+import org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl;
+import org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl;
 import org.apache.jackrabbit.spi.commons.nodetype.compact.CompactNodeTypeDefReader;
 import org.apache.jackrabbit.spi.commons.nodetype.compact.ParseException;
 import org.apache.jackrabbit.spi.commons.nodetype.constraint.ValueConstraint;
@@ -346,7 +347,7 @@
         synchronized (ndCache) {
             Iterator iter = ndCache.values().iterator();
             while (iter.hasNext()) {
-                NodeDefinitionImpl nd = (NodeDefinitionImpl) iter.next();
+                NodeDefinitionImpl nd = (org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl)
iter.next();
                 if (ntName.equals(nd.unwrap().getDeclaringNodeType())) {
                     iter.remove();
                 }

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropDefId.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropDefId.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropDefId.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/PropDefId.java
Fri Sep 11 12:06:31 2009
@@ -27,7 +27,7 @@
  * uniquely identifies a <code>QPropertyDefinition</code> in the
  * node type registry.
  */
-public class PropDefId implements Serializable {
+class PropDefId implements Serializable {
 
     /**
      * Serialization UID of this class.

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryImpl.java
Fri Sep 11 12:06:31 2009
@@ -28,10 +28,10 @@
 import org.apache.jackrabbit.core.ItemManager;
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
-import org.apache.jackrabbit.core.nodetype.PropertyDefinitionImpl;
 import org.apache.jackrabbit.core.query.PropertyTypeRegistry;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.apache.jackrabbit.spi.commons.query.AndQueryNode;
@@ -43,6 +43,7 @@
 import org.apache.jackrabbit.spi.commons.query.QueryParser;
 import org.apache.jackrabbit.spi.commons.query.QueryRootNode;
 import org.apache.jackrabbit.spi.commons.query.qom.ColumnImpl;
+import org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl;
 import org.apache.lucene.search.Query;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -174,9 +175,9 @@
             NodeTypeImpl nt = session.getNodeTypeManager().getNodeType(ntName[0]);
             PropertyDefinition[] propDefs = nt.getPropertyDefinitions();
             for (PropertyDefinition pd : propDefs) {
-                PropertyDefinitionImpl propDef = (PropertyDefinitionImpl) pd;
+                QPropertyDefinition propDef = ((PropertyDefinitionImpl) pd).unwrap();
                 if (!propDef.definesResidual() && !propDef.isMultiple()) {
-                    columns.put(propDef.getQName(), columnForName(propDef.getQName()));
+                    columns.put(propDef.getName(), columnForName(propDef.getName()));
                 }
             }
         }

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryObjectModelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryObjectModelImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryObjectModelImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryObjectModelImpl.java
Fri Sep 11 12:06:31 2009
@@ -29,7 +29,6 @@
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
-import org.apache.jackrabbit.core.nodetype.PropertyDefinitionImpl;
 import org.apache.jackrabbit.core.query.PropertyTypeRegistry;
 import org.apache.jackrabbit.core.query.lucene.constraint.Constraint;
 import org.apache.jackrabbit.core.query.lucene.constraint.ConstraintBuilder;
@@ -39,6 +38,7 @@
 import org.apache.jackrabbit.spi.commons.query.qom.QueryObjectModelTree;
 import org.apache.jackrabbit.spi.commons.query.qom.SelectorImpl;
 import org.apache.jackrabbit.spi.commons.query.qom.OrderingImpl;
+import org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl;
 
 /**
  * <code>QueryObjectModelImpl</code>...
@@ -123,7 +123,7 @@
                 NodeTypeImpl nt = ntMgr.getNodeType(selector.getNodeTypeQName());
                 for (PropertyDefinition pd : nt.getPropertyDefinitions()) {
                     PropertyDefinitionImpl propDef = (PropertyDefinitionImpl) pd;
-                    if (!propDef.definesResidual() && !propDef.isMultiple()) {
+                    if (!propDef.unwrap().definesResidual() && !propDef.isMultiple())
{
                         String sn = selector.getSelectorName();
                         String pn = propDef.getName();
                         columns.add((ColumnImpl) qomFactory.column(sn, pn, sn + "." + pn));

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionImpl.java
Fri Sep 11 12:06:31 2009
@@ -63,7 +63,17 @@
         super(itemDef, ntMgr, resolver);
     }
 
+    /**
+     * Returns the wrapped node definition.
+     *
+     * @return the wrapped node definition.
+     */
+    public QNodeDefinition unwrap() {
+        return (QNodeDefinition) itemDef;
+    }
+
     //-------------------------------------------------------< NodeDefinition >
+
     /**
      * {@inheritDoc}
      */

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java?rev=813788&r1=813787&r2=813788&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java
Fri Sep 11 12:06:31 2009
@@ -72,7 +72,17 @@
         this.valueFactory = valueFactory;
     }
 
+    /**
+     * Returns the wrapped property definition.
+     *
+     * @return the wrapped property definition.
+     */
+    public QPropertyDefinition unwrap() {
+        return (QPropertyDefinition) itemDef;
+    }
+
     //-------------------------------------------------< PropertyDefinition >---
+
     /**
      * {@inheritDoc}
      */



Mime
View raw message