jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r597357 - in /jackrabbit/sandbox/spi: client/src/test/java/org/apache/jackrabbit/jcr2spi/ spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/
Date Thu, 22 Nov 2007 09:46:46 GMT
Author: angela
Date: Thu Nov 22 01:46:45 2007
New Revision: 597357

URL: http://svn.apache.org/viewvc?rev=597357&view=rev
Log:
JCR-1152 SPI implementations currently need to provide implementations of both ValueFactory
and QValueFactory (adjust sandbox)

Modified:
    jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
    jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/JCR2SPIRepositoryStub.java
    jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
    jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java?rev=597357&r1=597356&r2=597357&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
(original)
+++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
Thu Nov 22 01:46:45 2007
@@ -16,25 +16,13 @@
  */
 package org.apache.jackrabbit.jcr2spi;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig;
 import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
-import org.apache.jackrabbit.value.ValueFactoryImplEx;
-
-import javax.jcr.ValueFactory;
-import javax.jcr.RepositoryException;
+import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig;
 
 /**
  * <code>AbstractRepositoryConfig</code>...
  */
 public abstract class AbstractRepositoryConfig implements RepositoryConfig {
-
-    private static Logger log = LoggerFactory.getLogger(AbstractRepositoryConfig.class);
-
-    public ValueFactory getValueFactory() throws RepositoryException {
-        return ValueFactoryImplEx.getInstance();
-    }
 
     public String getDefaultWorkspaceName() {
         return null;

Modified: jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/JCR2SPIRepositoryStub.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/JCR2SPIRepositoryStub.java?rev=597357&r1=597356&r2=597357&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/JCR2SPIRepositoryStub.java
(original)
+++ jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/JCR2SPIRepositoryStub.java
Thu Nov 22 01:46:45 2007
@@ -15,22 +15,22 @@
  */
 package org.apache.jackrabbit.jcr2spi;
 
-import org.apache.jackrabbit.test.RepositoryStub;
-import org.apache.jackrabbit.test.RepositoryStubException;
-import org.apache.jackrabbit.spi2dav.RepositoryServiceImpl;
 import org.apache.jackrabbit.identifier.IdFactoryImpl;
 import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig;
-import org.apache.jackrabbit.spi.RepositoryService;
+import org.apache.jackrabbit.name.NameFactoryImpl;
+import org.apache.jackrabbit.name.PathFactoryImpl;
 import org.apache.jackrabbit.spi.IdFactory;
 import org.apache.jackrabbit.spi.NameFactory;
 import org.apache.jackrabbit.spi.PathFactory;
-import org.apache.jackrabbit.value.ValueFactoryImplEx;
-import org.apache.jackrabbit.name.NameFactoryImpl;
-import org.apache.jackrabbit.name.PathFactoryImpl;
+import org.apache.jackrabbit.spi.QValueFactory;
+import org.apache.jackrabbit.spi.RepositoryService;
+import org.apache.jackrabbit.spi2dav.RepositoryServiceImpl;
+import org.apache.jackrabbit.test.RepositoryStub;
+import org.apache.jackrabbit.test.RepositoryStubException;
+import org.apache.jackrabbit.value.QValueFactoryImpl;
 import org.apache.log4j.PropertyConfigurator;
 
 import javax.jcr.Repository;
-import javax.jcr.ValueFactory;
 import java.util.Properties;
 
 /**
@@ -71,18 +71,14 @@
                 String url = environment.getProperty(PROP_REPOSITORY_URL);
 
                 final IdFactory idFactory = IdFactoryImpl.getInstance();
-                final ValueFactory vFactory = ValueFactoryImplEx.getInstance();
                 final NameFactory nFactory = NameFactoryImpl.getInstance();
                 final PathFactory pFactory = PathFactoryImpl.getInstance();
+                final QValueFactory vFactory = QValueFactoryImpl.getInstance();
                 final RepositoryServiceImpl webdavRepoService = new RepositoryServiceImpl(url,
idFactory, nFactory, pFactory, vFactory);
 
                 RepositoryConfig config = new AbstractRepositoryConfig() {
                     public RepositoryService getRepositoryService() {
                         return webdavRepoService;
-                    }
-
-                    public ValueFactory getValueFactory() {
-                        return vFactory;
                     }
 
                     public String getDefaultWorkspaceName() {

Modified: jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java?rev=597357&r1=597356&r2=597357&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
(original)
+++ jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/PropertyInfoImpl.java
Thu Nov 22 01:46:45 2007
@@ -16,21 +16,21 @@
  */
 package org.apache.jackrabbit.spi2dav;
 
-import org.apache.jackrabbit.webdav.DavException;
-import org.apache.jackrabbit.webdav.jcr.property.ValuesProperty;
-import org.apache.jackrabbit.webdav.jcr.ItemResourceConstants;
-import org.apache.jackrabbit.webdav.property.DavPropertySet;
-import org.apache.jackrabbit.conversion.NamePathResolver;
 import org.apache.jackrabbit.conversion.NameException;
-import org.apache.jackrabbit.value.ValueFormat;
+import org.apache.jackrabbit.conversion.NamePathResolver;
+import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.spi.PropertyInfo;
-import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.QValueFactory;
-import org.apache.jackrabbit.spi.Name;
-import org.slf4j.LoggerFactory;
+import org.apache.jackrabbit.value.ValueFormat;
+import org.apache.jackrabbit.webdav.DavException;
+import org.apache.jackrabbit.webdav.jcr.ItemResourceConstants;
+import org.apache.jackrabbit.webdav.jcr.property.ValuesProperty;
+import org.apache.jackrabbit.webdav.property.DavPropertySet;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;

Modified: jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=597357&r1=597356&r2=597357&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Thu Nov 22 01:46:45 2007
@@ -16,172 +16,172 @@
  */
 package org.apache.jackrabbit.spi2dav;
 
-import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.Header;
 import org.apache.commons.httpclient.HostConfiguration;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpConnectionManager;
+import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
 import org.apache.commons.httpclient.URI;
 import org.apache.commons.httpclient.URIException;
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-import org.apache.commons.httpclient.HttpConnectionManager;
-import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
 import org.apache.commons.httpclient.auth.AuthScope;
 import org.apache.commons.httpclient.methods.HeadMethod;
 import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
-import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
-import org.apache.jackrabbit.webdav.property.DavPropertySet;
-import org.apache.jackrabbit.webdav.property.DavPropertyName;
-import org.apache.jackrabbit.webdav.property.DavProperty;
-import org.apache.jackrabbit.webdav.property.HrefProperty;
-import org.apache.jackrabbit.webdav.version.DeltaVConstants;
-import org.apache.jackrabbit.webdav.version.LabelInfo;
-import org.apache.jackrabbit.webdav.version.UpdateInfo;
-import org.apache.jackrabbit.webdav.version.MergeInfo;
-import org.apache.jackrabbit.webdav.version.VersionControlledResource;
-import org.apache.jackrabbit.webdav.version.report.ReportInfo;
-import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
-import org.apache.jackrabbit.webdav.client.methods.ReportMethod;
-import org.apache.jackrabbit.webdav.client.methods.DavMethodBase;
-import org.apache.jackrabbit.webdav.client.methods.OptionsMethod;
-import org.apache.jackrabbit.webdav.client.methods.MkColMethod;
-import org.apache.jackrabbit.webdav.client.methods.PropPatchMethod;
-import org.apache.jackrabbit.webdav.client.methods.OrderPatchMethod;
+import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
+import org.apache.jackrabbit.conversion.IllegalNameException;
+import org.apache.jackrabbit.conversion.MalformedPathException;
+import org.apache.jackrabbit.conversion.NameException;
+import org.apache.jackrabbit.conversion.NamePathResolver;
+import org.apache.jackrabbit.conversion.NameResolver;
+import org.apache.jackrabbit.conversion.ParsingNameResolver;
+import org.apache.jackrabbit.conversion.ParsingPathResolver;
+import org.apache.jackrabbit.conversion.PathResolver;
+import org.apache.jackrabbit.name.NameConstants;
+import org.apache.jackrabbit.namespace.AbstractNamespaceResolver;
+import org.apache.jackrabbit.namespace.NamespaceResolver;
+import org.apache.jackrabbit.spi.Batch;
+import org.apache.jackrabbit.spi.ChildInfo;
+import org.apache.jackrabbit.spi.Event;
+import org.apache.jackrabbit.spi.EventBundle;
+import org.apache.jackrabbit.spi.EventFilter;
+import org.apache.jackrabbit.spi.IdFactory;
+import org.apache.jackrabbit.spi.ItemId;
+import org.apache.jackrabbit.spi.LockInfo;
+import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.NameFactory;
+import org.apache.jackrabbit.spi.NodeId;
+import org.apache.jackrabbit.spi.NodeInfo;
+import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.spi.PathFactory;
+import org.apache.jackrabbit.spi.PropertyId;
+import org.apache.jackrabbit.spi.PropertyInfo;
+import org.apache.jackrabbit.spi.QItemDefinition;
+import org.apache.jackrabbit.spi.QNodeDefinition;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
+import org.apache.jackrabbit.spi.QPropertyDefinition;
+import org.apache.jackrabbit.spi.QValue;
+import org.apache.jackrabbit.spi.QValueFactory;
+import org.apache.jackrabbit.spi.QueryInfo;
+import org.apache.jackrabbit.spi.RepositoryService;
+import org.apache.jackrabbit.spi.SessionInfo;
+import org.apache.jackrabbit.spi.Subscription;
+import org.apache.jackrabbit.spi.commons.ChildInfoImpl;
+import org.apache.jackrabbit.spi.commons.EventBundleImpl;
+import org.apache.jackrabbit.spi.commons.EventFilterImpl;
+import org.apache.jackrabbit.util.Text;
+import org.apache.jackrabbit.uuid.UUID;
+import org.apache.jackrabbit.value.ValueFactoryQImpl;
+import org.apache.jackrabbit.value.ValueFormat;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.DavException;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavServletResponse;
+import org.apache.jackrabbit.webdav.MultiStatus;
+import org.apache.jackrabbit.webdav.MultiStatusResponse;
 import org.apache.jackrabbit.webdav.client.methods.CheckinMethod;
 import org.apache.jackrabbit.webdav.client.methods.CheckoutMethod;
-import org.apache.jackrabbit.webdav.client.methods.LockMethod;
-import org.apache.jackrabbit.webdav.client.methods.UnLockMethod;
-import org.apache.jackrabbit.webdav.client.methods.LabelMethod;
-import org.apache.jackrabbit.webdav.client.methods.MoveMethod;
 import org.apache.jackrabbit.webdav.client.methods.CopyMethod;
-import org.apache.jackrabbit.webdav.client.methods.UpdateMethod;
-import org.apache.jackrabbit.webdav.client.methods.PutMethod;
-import org.apache.jackrabbit.webdav.client.methods.SearchMethod;
 import org.apache.jackrabbit.webdav.client.methods.DavMethod;
+import org.apache.jackrabbit.webdav.client.methods.DavMethodBase;
 import org.apache.jackrabbit.webdav.client.methods.DeleteMethod;
+import org.apache.jackrabbit.webdav.client.methods.LabelMethod;
+import org.apache.jackrabbit.webdav.client.methods.LockMethod;
 import org.apache.jackrabbit.webdav.client.methods.MergeMethod;
+import org.apache.jackrabbit.webdav.client.methods.MkColMethod;
+import org.apache.jackrabbit.webdav.client.methods.MoveMethod;
+import org.apache.jackrabbit.webdav.client.methods.OptionsMethod;
+import org.apache.jackrabbit.webdav.client.methods.OrderPatchMethod;
+import org.apache.jackrabbit.webdav.client.methods.PollMethod;
+import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
+import org.apache.jackrabbit.webdav.client.methods.PropPatchMethod;
+import org.apache.jackrabbit.webdav.client.methods.PutMethod;
+import org.apache.jackrabbit.webdav.client.methods.ReportMethod;
+import org.apache.jackrabbit.webdav.client.methods.SearchMethod;
 import org.apache.jackrabbit.webdav.client.methods.SubscribeMethod;
+import org.apache.jackrabbit.webdav.client.methods.UnLockMethod;
 import org.apache.jackrabbit.webdav.client.methods.UnSubscribeMethod;
-import org.apache.jackrabbit.webdav.client.methods.PollMethod;
-import org.apache.jackrabbit.webdav.DavConstants;
-import org.apache.jackrabbit.webdav.MultiStatusResponse;
-import org.apache.jackrabbit.webdav.DavServletResponse;
-import org.apache.jackrabbit.webdav.DavException;
-import org.apache.jackrabbit.webdav.MultiStatus;
-import org.apache.jackrabbit.webdav.DavMethods;
-import org.apache.jackrabbit.webdav.ordering.OrderingConstants;
-import org.apache.jackrabbit.webdav.observation.SubscriptionInfo;
-import org.apache.jackrabbit.webdav.observation.EventType;
+import org.apache.jackrabbit.webdav.client.methods.UpdateMethod;
+import org.apache.jackrabbit.webdav.header.CodedUrlHeader;
+import org.apache.jackrabbit.webdav.header.IfHeader;
+import org.apache.jackrabbit.webdav.jcr.ItemResourceConstants;
+import org.apache.jackrabbit.webdav.jcr.nodetype.NodeTypeConstants;
+import org.apache.jackrabbit.webdav.jcr.nodetype.NodeTypeProperty;
+import org.apache.jackrabbit.webdav.jcr.observation.SubscriptionImpl;
+import org.apache.jackrabbit.webdav.jcr.property.NamespacesProperty;
+import org.apache.jackrabbit.webdav.jcr.property.ValuesProperty;
+import org.apache.jackrabbit.webdav.jcr.version.report.JcrPrivilegeReport;
+import org.apache.jackrabbit.webdav.jcr.version.report.NodeTypesReport;
+import org.apache.jackrabbit.webdav.jcr.version.report.RegisteredNamespacesReport;
+import org.apache.jackrabbit.webdav.jcr.version.report.RepositoryDescriptorsReport;
+import org.apache.jackrabbit.webdav.lock.ActiveLock;
+import org.apache.jackrabbit.webdav.lock.LockDiscovery;
+import org.apache.jackrabbit.webdav.lock.Scope;
+import org.apache.jackrabbit.webdav.lock.Type;
+import org.apache.jackrabbit.webdav.observation.DefaultEventType;
 import org.apache.jackrabbit.webdav.observation.EventDiscovery;
+import org.apache.jackrabbit.webdav.observation.EventType;
 import org.apache.jackrabbit.webdav.observation.ObservationConstants;
-import org.apache.jackrabbit.webdav.observation.DefaultEventType;
-import org.apache.jackrabbit.webdav.security.SecurityConstants;
+import org.apache.jackrabbit.webdav.observation.SubscriptionInfo;
+import org.apache.jackrabbit.webdav.ordering.OrderingConstants;
+import org.apache.jackrabbit.webdav.property.DavProperty;
+import org.apache.jackrabbit.webdav.property.DavPropertyName;
+import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
+import org.apache.jackrabbit.webdav.property.DavPropertySet;
+import org.apache.jackrabbit.webdav.property.HrefProperty;
+import org.apache.jackrabbit.webdav.search.SearchConstants;
+import org.apache.jackrabbit.webdav.search.SearchInfo;
 import org.apache.jackrabbit.webdav.security.CurrentUserPrivilegeSetProperty;
 import org.apache.jackrabbit.webdav.security.Privilege;
-import org.apache.jackrabbit.webdav.lock.Scope;
-import org.apache.jackrabbit.webdav.lock.Type;
-import org.apache.jackrabbit.webdav.lock.LockDiscovery;
-import org.apache.jackrabbit.webdav.lock.ActiveLock;
+import org.apache.jackrabbit.webdav.security.SecurityConstants;
 import org.apache.jackrabbit.webdav.transaction.TransactionConstants;
 import org.apache.jackrabbit.webdav.transaction.TransactionInfo;
+import org.apache.jackrabbit.webdav.version.DeltaVConstants;
+import org.apache.jackrabbit.webdav.version.LabelInfo;
+import org.apache.jackrabbit.webdav.version.MergeInfo;
+import org.apache.jackrabbit.webdav.version.UpdateInfo;
+import org.apache.jackrabbit.webdav.version.VersionControlledResource;
+import org.apache.jackrabbit.webdav.version.report.ReportInfo;
 import org.apache.jackrabbit.webdav.xml.DomUtil;
 import org.apache.jackrabbit.webdav.xml.ElementIterator;
 import org.apache.jackrabbit.webdav.xml.Namespace;
-import org.apache.jackrabbit.webdav.header.CodedUrlHeader;
-import org.apache.jackrabbit.webdav.header.IfHeader;
-import org.apache.jackrabbit.webdav.search.SearchConstants;
-import org.apache.jackrabbit.webdav.search.SearchInfo;
-import org.apache.jackrabbit.webdav.jcr.version.report.RepositoryDescriptorsReport;
-import org.apache.jackrabbit.webdav.jcr.version.report.RegisteredNamespacesReport;
-import org.apache.jackrabbit.webdav.jcr.version.report.NodeTypesReport;
-import org.apache.jackrabbit.webdav.jcr.version.report.JcrPrivilegeReport;
-import org.apache.jackrabbit.webdav.jcr.nodetype.NodeTypeConstants;
-import org.apache.jackrabbit.webdav.jcr.nodetype.NodeTypeProperty;
-import org.apache.jackrabbit.webdav.jcr.property.ValuesProperty;
-import org.apache.jackrabbit.webdav.jcr.property.NamespacesProperty;
-import org.apache.jackrabbit.webdav.jcr.observation.SubscriptionImpl;
-import org.apache.jackrabbit.webdav.jcr.ItemResourceConstants;
-import org.apache.jackrabbit.name.NameConstants;
-import org.apache.jackrabbit.namespace.NamespaceResolver;
-import org.apache.jackrabbit.namespace.AbstractNamespaceResolver;
-import org.apache.jackrabbit.conversion.NamePathResolver;
-import org.apache.jackrabbit.conversion.NameException;
-import org.apache.jackrabbit.conversion.ParsingNameResolver;
-import org.apache.jackrabbit.conversion.NameResolver;
-import org.apache.jackrabbit.conversion.PathResolver;
-import org.apache.jackrabbit.conversion.ParsingPathResolver;
-import org.apache.jackrabbit.conversion.IllegalNameException;
-import org.apache.jackrabbit.conversion.MalformedPathException;
-import org.apache.jackrabbit.spi.Batch;
-import org.apache.jackrabbit.spi.RepositoryService;
-import org.apache.jackrabbit.spi.SessionInfo;
-import org.apache.jackrabbit.spi.PropertyInfo;
-import org.apache.jackrabbit.spi.QueryInfo;
-import org.apache.jackrabbit.spi.ItemId;
-import org.apache.jackrabbit.spi.NodeId;
-import org.apache.jackrabbit.spi.PropertyId;
-import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.QNodeDefinition;
-import org.apache.jackrabbit.spi.QPropertyDefinition;
-import org.apache.jackrabbit.spi.QItemDefinition;
-import org.apache.jackrabbit.spi.IdFactory;
-import org.apache.jackrabbit.spi.LockInfo;
-import org.apache.jackrabbit.spi.EventBundle;
-import org.apache.jackrabbit.spi.EventFilter;
-import org.apache.jackrabbit.spi.Event;
-import org.apache.jackrabbit.spi.ChildInfo;
-import org.apache.jackrabbit.spi.QValue;
-import org.apache.jackrabbit.spi.QValueFactory;
-import org.apache.jackrabbit.spi.NodeInfo;
-import org.apache.jackrabbit.spi.PathFactory;
-import org.apache.jackrabbit.spi.NameFactory;
-import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.Path;
-import org.apache.jackrabbit.spi.Subscription;
-import org.apache.jackrabbit.spi.commons.EventFilterImpl;
-import org.apache.jackrabbit.spi.commons.EventBundleImpl;
-import org.apache.jackrabbit.spi.commons.ChildInfoImpl;
-import org.apache.jackrabbit.util.Text;
-import org.apache.jackrabbit.uuid.UUID;
-import org.apache.jackrabbit.value.ValueFormat;
-import org.apache.jackrabbit.value.QValueFactoryImpl;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
-import org.w3c.dom.Element;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.PathNotFoundException;
-import javax.jcr.ItemExistsException;
 import javax.jcr.AccessDeniedException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.ValueFormatException;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.Credentials;
 import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.LoginException;
 import javax.jcr.MergeException;
 import javax.jcr.NamespaceException;
-import javax.jcr.Credentials;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.PathNotFoundException;
 import javax.jcr.PropertyType;
+import javax.jcr.ReferentialIntegrityException;
+import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.Value;
 import javax.jcr.ValueFactory;
-import javax.jcr.LoginException;
-import javax.jcr.ReferentialIntegrityException;
-import javax.jcr.query.InvalidQueryException;
+import javax.jcr.ValueFormatException;
 import javax.jcr.lock.LockException;
 import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.query.InvalidQueryException;
 import javax.jcr.version.VersionException;
 import javax.xml.parsers.ParserConfigurationException;
-import java.util.List;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.HashSet;
-import java.util.Set;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
-import java.util.Collections;
-import java.io.InputStream;
-import java.io.IOException;
+import java.util.Set;
 
 /**
  * <code>RepositoryServiceImpl</code>...
@@ -206,6 +206,7 @@
     private final IdFactory idFactory;
     private final NameFactory nameFactory;
     private final PathFactory pathFactory;
+    private final QValueFactory qValueFactory;
     private final ValueFactory valueFactory;
 
     private final Document domFactory;
@@ -223,17 +224,17 @@
     public RepositoryServiceImpl(String uri, IdFactory idFactory,
                                  NameFactory nameFactory,
                                  PathFactory pathFactory,
-                                 ValueFactory valueFactory) throws RepositoryException {
+                                 QValueFactory qValueFactory) throws RepositoryException
{
         if (uri == null || "".equals(uri)) {
             throw new RepositoryException("Invalid repository uri '" + uri + "'.");
         }
-        if (idFactory == null || valueFactory == null) {
-            throw new RepositoryException("IdFactory and ValueFactory may not be null.");
+        if (idFactory == null || qValueFactory == null) {
+            throw new RepositoryException("IdFactory and QValueFactory may not be null.");
         }
         this.idFactory = idFactory;
         this.nameFactory = nameFactory;
         this.pathFactory = pathFactory;
-        this.valueFactory = valueFactory;
+        this.qValueFactory = qValueFactory;
 
         try {
             domFactory = DomUtil.BUILDER_FACTORY.newDocumentBuilder().newDocument();
@@ -247,8 +248,9 @@
             hostConfig.setHost(repositoryUri);
 
             nsCache = new NamespaceCache();
-            uriResolver = new URIResolverImpl(repositoryUri, this, new NamePathResolverImpl(nsCache),
domFactory);
-
+            NamePathResolver resolver = new NamePathResolverImpl(nsCache);
+            uriResolver = new URIResolverImpl(repositoryUri, this, resolver, domFactory);
+            valueFactory = new ValueFactoryQImpl(qValueFactory, resolver);
         } catch (URIException e) {
             throw new RepositoryException(e);
         }
@@ -434,7 +436,7 @@
     }
 
     public QValueFactory getQValueFactory() {
-        return QValueFactoryImpl.getInstance();
+        return qValueFactory;
     }
 
     /**



Mime
View raw message