You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2012/04/28 18:33:39 UTC
svn commit: r1331791 [1/12] - in /chemistry/opencmis/trunk: ./
chemistry-opencmis-client/chemistry-opencmis-client-bindings/
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/...
Author: fmui
Date: Sat Apr 28 16:33:35 2012
New Revision: 1331791
URL: http://svn.apache.org/viewvc?rev=1331791&view=rev
Log:
CMIS-525: replaced Commons Logging with SLF4J
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieManager.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/HttpUtils.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/ItemIterableTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomDocumentBase.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/dummy/DummyServicesFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/Dispatcher.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/ConfigurationSettings.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryAclService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryDiscoveryServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryVersioningServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AbstractServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AclPermissionsTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AclServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/AclTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/DiscoveryServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/MultiFilingTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/NavigationServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/RepositoryServiceMutabilityTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/RepositoryServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersioningTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/query/AbstractQueryConditionProcessor.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/query/EvalQueryTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/query/ProcessQueryTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/query/QueryParseTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/query/QueryTypesTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrDocument.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrFolder.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrNode.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrPrivateWorkingCopy.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrRepository.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrServiceFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrTypeManager.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrVersionBase.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/PathManager.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/impl/DefaultDocumentTypeHandler.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/impl/DefaultFolderTypeHandler.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/type/JcrTypeHandlerManager.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/antlr3/org/apache/chemistry/opencmis/server/support/query/CmisQueryWalker.g
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/CmisServiceWrapper.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/filter/LoggingFilter.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/AbstractParserTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserExt.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserStrict.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserTextSearch.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-browser/src/main/java/org/apache/chemistry/opencmis/browser/BrowseServlet.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/main/java/org/apache/chemistry/opencmis/client/filecopy/FileCopier.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/main/java/org/apache/chemistry/opencmis/client/mapper/Configurator.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/main/java/org/apache/chemistry/opencmis/client/mapper/PropertyMapperExif.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/main/java/org/apache/chemistry/opencmis/client/mapper/PropertyMapperTika.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/main/java/org/apache/chemistry/opencmis/client/parser/AbstractMetadataParser.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/main/java/org/apache/chemistry/opencmis/client/parser/MetadataParserExif.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/main/java/org/apache/chemistry/opencmis/client/parser/MetadataParserTika.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/main/java/org/apache/chemistry/opencmis/client/specexamples/Main.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-client/src/test/java/org/apache/chemistry/opencmis/client/mapper/ConfiguratorTest.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/main/java/org/apache/chemistry/opencmis/util/content/fractal/FractalGenerator.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/main/java/org/apache/chemistry/opencmis/util/repository/ObjectGenerator.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/main/java/org/apache/chemistry/opencmis/util/repository/TimeLogger.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/test/java/org/apache/chemistry/opencmis/util/content/loremipsum/LoremIpsumTest.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ChangeLogFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/RepositoryInfoFrame.java
chemistry/opencmis/trunk/pom.xml
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/pom.xml Sat Apr 28 16:33:35 2012
@@ -95,6 +95,18 @@
<version>2.1.7</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.4</version>
+ <scope>test</scope>
+ </dependency>
<!--
<dependency>
<groupId>org.apache.cxf</groupId>
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java Sat Apr 28 16:33:35 2012
@@ -26,15 +26,15 @@ import java.util.concurrent.locks.Reentr
import org.apache.chemistry.opencmis.client.bindings.cache.Cache;
import org.apache.chemistry.opencmis.client.bindings.cache.CacheLevel;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Default cache implementation.
*/
public class CacheImpl implements Cache {
- private static final Log log = LogFactory.getLog(CacheImpl.class);
+ private static final Logger log = LoggerFactory.getLogger(CacheImpl.class);
private static final long serialVersionUID = 1L;
@@ -315,4 +315,4 @@ public class CacheImpl implements Cache
return sb.toString();
}
-}
\ No newline at end of file
+}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/CmisAtomPubSpi.java Sat Apr 28 16:33:35 2012
@@ -29,15 +29,15 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.spi.RelationshipService;
import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
import org.apache.chemistry.opencmis.commons.spi.VersioningService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* CMIS AtomPub SPI implementation.
*/
public class CmisAtomPubSpi implements CmisSpi {
- private static final Log log = LogFactory.getLog(CmisAtomPubSpi.class);
+ private static final Logger log = LoggerFactory.getLogger(CmisAtomPubSpi.class);
private final BindingSession session;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/browser/CmisBrowserBindingSpi.java Sat Apr 28 16:33:35 2012
@@ -29,12 +29,12 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.spi.RelationshipService;
import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
import org.apache.chemistry.opencmis.commons.spi.VersioningService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class CmisBrowserBindingSpi implements CmisSpi {
- private static final Log log = LogFactory.getLog(CmisBrowserBindingSpi.class);
+ private static final Logger log = LoggerFactory.getLogger(CmisBrowserBindingSpi.class);
private final BindingSession session;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieManager.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieManager.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieManager.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieManager.java Sat Apr 28 16:33:35 2012
@@ -34,8 +34,8 @@ import java.util.Map;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Cookie Manager.
@@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFac
public class CmisCookieManager implements Serializable {
private static final long serialVersionUID = 1L;
- private static final Log LOG = LogFactory.getLog(CmisCookieManager.class.getName());
+ private static final Logger LOG = LoggerFactory.getLogger(CmisCookieManager.class.getName());
private static final String VERSION_ZERO_HEADER = "Set-cookie";
private static final String VERSION_ONE_HEADER = "Set-cookie2";
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/HttpUtils.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/HttpUtils.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/HttpUtils.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/HttpUtils.java Sat Apr 28 16:33:35 2012
@@ -43,15 +43,15 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.Base64;
import org.apache.chemistry.opencmis.commons.impl.UrlBuilder;
import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* HTTP helper methods.
*/
public class HttpUtils {
- private static final Log log = LogFactory.getLog(HttpUtils.class);
+ private static final Logger log = LoggerFactory.getLogger(HttpUtils.class);
private static final int BUFFER_SIZE = 2 * 1024 * 1024;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java Sat Apr 28 16:33:35 2012
@@ -37,15 +37,15 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.spi.RelationshipService;
import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
import org.apache.chemistry.opencmis.commons.spi.VersioningService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* * CMIS local SPI implementation.
*/
public class CmisLocalSpi implements CmisSpi {
- private static final Log log = LogFactory.getLog(CmisLocalSpi.class);
+ private static final Logger log = LoggerFactory.getLogger(CmisLocalSpi.class);
private final CmisServiceFactory factory;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/AbstractPortProvider.java Sat Apr 28 16:33:35 2012
@@ -58,12 +58,12 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.jaxb.VersioningService;
import org.apache.chemistry.opencmis.commons.impl.jaxb.VersioningServicePort;
import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public abstract class AbstractPortProvider {
- private static final Log log = LogFactory.getLog(AbstractPortProvider.class);
+ private static final Logger log = LoggerFactory.getLogger(AbstractPortProvider.class);
public static final String CMIS_NAMESPACE = "http://docs.oasis-open.org/ns/cmis/ws/200908/";
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java Sat Apr 28 16:33:35 2012
@@ -30,15 +30,15 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.spi.RelationshipService;
import org.apache.chemistry.opencmis.commons.spi.RepositoryService;
import org.apache.chemistry.opencmis.commons.spi.VersioningService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* CMIS Web Services SPI implementation.
*/
public class CmisWebServicesSpi implements CmisSpi {
- private static final Log log = LogFactory.getLog(CmisWebServicesSpi.class);
+ private static final Logger log = LoggerFactory.getLogger(CmisWebServicesSpi.class);
private final RepositoryService repositoryService;
private final NavigationService navigationService;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java Sat Apr 28 16:33:35 2012
@@ -40,8 +40,8 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.jaxb.RepositoryService;
import org.apache.chemistry.opencmis.commons.impl.jaxb.VersioningService;
import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
import com.sun.xml.ws.api.message.Headers;
@@ -54,7 +54,7 @@ import com.sun.xml.ws.developer.WSBindin
* headers.
*/
public class PortProvider extends AbstractPortProvider {
- private static final Log log = LogFactory.getLog(PortProvider.class);
+ private static final Logger log = LoggerFactory.getLogger(PortProvider.class);
/**
* Creates a port object.
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/WebSpherePortProvider.java Sat Apr 28 16:33:35 2012
@@ -49,8 +49,8 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.jaxb.RepositoryService;
import org.apache.chemistry.opencmis.commons.impl.jaxb.VersioningService;
import org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
/**
@@ -58,7 +58,7 @@ import org.w3c.dom.Element;
* headers.
*/
public class WebSpherePortProvider extends AbstractPortProvider {
- private static final Log log = LogFactory.getLog(WebSpherePortProvider.class);
+ private static final Logger log = LoggerFactory.getLogger(WebSpherePortProvider.class);
/**
* Creates a port object.
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/test/java/org/apache/chemistry/opencmis/client/bindings/framework/AbstractCmisTestCase.java Sat Apr 28 16:33:35 2012
@@ -51,8 +51,8 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
import org.apache.chemistry.opencmis.commons.spi.BindingsObjectFactory;
import org.apache.chemistry.opencmis.commons.spi.CmisBinding;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -96,7 +96,7 @@ public abstract class AbstractCmisTestCa
private String fTestRepositoryId;
private String fTestFolderId;
- private static final Log log = LogFactory.getLog(AbstractCmisTestCase.class);
+ private static final Logger log = LoggerFactory.getLogger(AbstractCmisTestCase.class);
/**
* Read configuration file.
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/pom.xml Sat Apr 28 16:33:35 2012
@@ -114,6 +114,18 @@
<artifactId>org.osgi.core</artifactId>
<version>1.0.0</version>
</dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.4</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<profiles>
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java Sat Apr 28 16:33:35 2012
@@ -88,7 +88,7 @@ public class SessionImpl implements Sess
CREATE_UPDATABILITY.add(Updatability.READWRITE);
}
- // private static Log log = LogFactory.getLog(SessionImpl.class);
+ // private static Logger log = LoggerFactory.getLogger(SessionImpl.class);
private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/ItemIterableTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/ItemIterableTest.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/ItemIterableTest.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/test/java/org/apache/chemistry/opencmis/client/runtime/ItemIterableTest.java Sat Apr 28 16:33:35 2012
@@ -27,8 +27,8 @@ import java.util.Properties;
import org.apache.chemistry.opencmis.client.api.ItemIterable;
import org.apache.chemistry.opencmis.client.runtime.util.AbstractPageFetcher;
import org.apache.chemistry.opencmis.client.runtime.util.CollectionIterable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.log4j.PropertyConfigurator;
import org.junit.Test;
@@ -36,7 +36,7 @@ import static org.junit.Assert.*;
public class ItemIterableTest {
- private static final Log log = LogFactory.getLog(ItemIterableTest.class);
+ private static final Logger log = LoggerFactory.getLogger(ItemIterableTest.class);
static {
Properties p = new Properties();
try {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java Sat Apr 28 16:33:35 2012
@@ -29,8 +29,8 @@ import javax.servlet.ServletContextEvent
import javax.servlet.ServletContextListener;
import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* CMIS context listener.
@@ -39,7 +39,7 @@ public class CmisRepositoryContextListen
public static final String SERVICES_FACTORY = "org.apache.chemistry.opencmis.servicesfactory";
- private static final Log log = LogFactory.getLog(CmisRepositoryContextListener.class.getName());
+ private static final Logger log = LoggerFactory.getLogger(CmisRepositoryContextListener.class.getName());
private static final String CONFIG_INIT_PARAM = "org.apache.chemistry.opencmis.REPOSITORY_CONFIG_FILE";
private static final String CONFIG_FILENAME = "/repository.properties";
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomDocumentBase.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomDocumentBase.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomDocumentBase.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomDocumentBase.java Sat Apr 28 16:33:35 2012
@@ -29,323 +29,351 @@ import java.util.TimeZone;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
+import org.apache.chemistry.opencmis.commons.impl.Base64;
import org.apache.chemistry.opencmis.commons.impl.Constants;
-import org.apache.commons.codec.binary.Base64;
/**
* Atom base class.
*/
public abstract class AtomDocumentBase extends XMLDocumentBase {
- private static final String ID_PREFIX = "http://chemistry.apache.org/";
- private static final String ID_DUMMY = "http://chemistry.apache.org/no-id";
+ private static final String ID_PREFIX = "http://chemistry.apache.org/";
+ private static final String ID_DUMMY = "http://chemistry.apache.org/no-id";
- private SimpleDateFormat dateFormater;
+ private SimpleDateFormat dateFormater;
- /**
- * Formats a DateTime.
- */
- public String formatDate(long millis) {
- if (dateFormater == null) {
- dateFormater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US);
- dateFormater.setTimeZone(TimeZone.getTimeZone("UTC"));
- }
-
- return dateFormater.format(millis);
- }
-
- /**
- * Generates a valid Atom id.
- */
- public String generateAtomId(String input) {
- if (input == null) {
- return ID_DUMMY;
- }
-
- try {
- return ID_PREFIX + (new String(Base64.encodeBase64(input.getBytes("UTF-8"))));
- } catch (UnsupportedEncodingException e) {
- return ID_DUMMY;
- }
- }
-
- /**
- * Writes a simple tag.
- */
- public void writeSimpleTag(String namespace, String name, String value) throws XMLStreamException {
- if (value == null) {
- return;
- }
-
- XMLStreamWriter xsw = getWriter();
-
- xsw.writeStartElement(namespace, name);
- xsw.writeCharacters(value);
- xsw.writeEndElement();
- }
-
- /**
- * Writes a simple date tag.
- */
- public void writeSimpleDate(String namespace, String name, GregorianCalendar value) throws XMLStreamException {
- if (value == null) {
- return;
- }
-
- writeSimpleTag(namespace, name, formatDate(value.getTimeInMillis()));
- }
-
- /**
- * Writes a simple date tag.
- */
- public void writeSimpleDate(String namespace, String name, long millis) throws XMLStreamException {
- writeSimpleTag(namespace, name, formatDate(millis));
- }
-
- /**
- * Writes an Atom id tag.
- */
- public void writeId(String id) throws XMLStreamException {
- writeSimpleTag(Constants.NAMESPACE_ATOM, "id", id);
- }
-
- /**
- * Writes an Atom title tag.
- */
- public void writeTitle(String title) throws XMLStreamException {
- writeSimpleTag(Constants.NAMESPACE_ATOM, "title", title);
- }
-
- /**
- * Writes an Atom author tag.
- */
- public void writeAuthor(String author) throws XMLStreamException {
- XMLStreamWriter xsw = getWriter();
-
- xsw.writeStartElement(Constants.NAMESPACE_ATOM, "author");
- writeSimpleTag(Constants.NAMESPACE_ATOM, "name", author);
- xsw.writeEndElement();
- }
-
- /**
- * Writes an Atom updated tag.
- */
- public void writeUpdated(GregorianCalendar updated) throws XMLStreamException {
- writeSimpleDate(Constants.NAMESPACE_APP, "edited", updated);
- writeSimpleDate(Constants.NAMESPACE_ATOM, "updated", updated);
- }
-
- /**
- * Writes an Atom updated tag.
- */
- public void writeUpdated(long updated) throws XMLStreamException {
- writeSimpleDate(Constants.NAMESPACE_APP, "edited", updated);
- writeSimpleDate(Constants.NAMESPACE_ATOM, "updated", updated);
- }
-
- /**
- * Writes an Atom published tag.
- */
- public void writePublished(GregorianCalendar published) throws XMLStreamException {
- writeSimpleDate(Constants.NAMESPACE_ATOM, "published", published);
- }
-
- /**
- * Writes an Atom published tag.
- */
- public void writePublished(long published) throws XMLStreamException {
- writeSimpleDate(Constants.NAMESPACE_ATOM, "published", published);
- }
-
- /**
- * Writes a CMIS pathSegment tag.
- */
- public void writePathSegment(String pathSegment) throws XMLStreamException {
- writeSimpleTag(Constants.NAMESPACE_RESTATOM, "pathSegment", pathSegment);
- }
-
- /**
- * Writes a CMIS relativePathSegment tag.
- */
- public void writeRelativePathSegment(String relativePathSegment) throws XMLStreamException {
- writeSimpleTag(Constants.NAMESPACE_RESTATOM, "relativePathSegment", relativePathSegment);
- }
-
- /**
- * Writes an Atom collection.
- */
- public void writeCollection(String href, String collectionType, String text, String... accept)
- throws XMLStreamException {
- XMLStreamWriter xsw = getWriter();
-
- xsw.writeStartElement(Constants.NAMESPACE_APP, "collection");
- xsw.writeAttribute("href", href);
-
- if (collectionType != null) {
- xsw.writeStartElement(Constants.NAMESPACE_RESTATOM, "collectionType");
- xsw.writeCharacters(collectionType);
- xsw.writeEndElement();
- }
-
- xsw.writeStartElement(Constants.NAMESPACE_ATOM, "title");
- xsw.writeAttribute("type", "text");
- xsw.writeCharacters(text);
- xsw.writeEndElement();
-
- for (String ct : accept) {
- xsw.writeStartElement(Constants.NAMESPACE_APP, "accept");
- xsw.writeCharacters(ct);
- xsw.writeEndElement();
- }
-
- xsw.writeEndElement();
- }
-
- /**
- * Writes a link.
- */
- public void writeLink(String rel, String href, String type, String id) throws XMLStreamException {
- XMLStreamWriter xsw = getWriter();
-
- xsw.writeStartElement(Constants.NAMESPACE_ATOM, "link");
-
- xsw.writeAttribute("rel", rel);
- xsw.writeAttribute("href", href);
- if (type != null) {
- xsw.writeAttribute("type", type);
- }
- if (id != null) {
- xsw.writeAttribute(Constants.NAMESPACE_RESTATOM, "id", id);
- }
-
- xsw.writeEndElement();
- }
-
- public void writeServiceLink(String href, String repositoryId) throws XMLStreamException {
- try {
- writeLink(Constants.REL_SERVICE, href + "?repositoryId=" + URLEncoder.encode(repositoryId, "UTF-8"),
- Constants.MEDIATYPE_SERVICE, null);
- } catch (UnsupportedEncodingException e) {
- }
- }
-
- public void writeSelfLink(String href, String id) throws XMLStreamException {
- writeLink(Constants.REL_SELF, href, Constants.MEDIATYPE_ENTRY, id);
- }
-
- public void writeEnclosureLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_ENCLOSURE, href, Constants.MEDIATYPE_ENTRY, null);
- }
-
- public void writeEditLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_EDIT, href, Constants.MEDIATYPE_ENTRY, null);
- }
-
- public void writeAlternateLink(String href, String type, String kind, String title, BigInteger length)
- throws XMLStreamException {
- XMLStreamWriter xsw = getWriter();
-
- xsw.writeStartElement(Constants.NAMESPACE_ATOM, "link");
-
- xsw.writeAttribute("rel", Constants.REL_ALTERNATE);
- xsw.writeAttribute("href", href);
- if (type != null) {
- xsw.writeAttribute("type", type);
- }
- if (kind != null) {
- xsw.writeAttribute(Constants.NAMESPACE_RESTATOM, "renditionKind", kind);
- }
- if (title != null) {
- xsw.writeAttribute("title", title);
- }
- if (length != null) {
- xsw.writeAttribute("length", length.toString());
- }
-
- xsw.writeEndElement();
- }
-
- public void writeWorkingCopyLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_WORKINGCOPY, href, Constants.MEDIATYPE_ENTRY, null);
- }
-
- public void writeUpLink(String href, String type) throws XMLStreamException {
- writeLink(Constants.REL_UP, href, type, null);
- }
-
- public void writeDownLink(String href, String type) throws XMLStreamException {
- writeLink(Constants.REL_DOWN, href, type, null);
- }
-
- public void writeVersionHistoryLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_VERSIONHISTORY, href, Constants.MEDIATYPE_FEED, null);
- }
-
- public void writeCurrentVerionsLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_CURRENTVERSION, href, Constants.MEDIATYPE_ENTRY, null);
- }
-
- public void writeEditMediaLink(String href, String type) throws XMLStreamException {
- writeLink(Constants.REL_EDITMEDIA, href, type, null);
- }
-
- public void writeDescribedByLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_DESCRIBEDBY, href, Constants.MEDIATYPE_ENTRY, null);
- }
-
- public void writeAllowableActionsLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_ALLOWABLEACTIONS, href, Constants.MEDIATYPE_ALLOWABLEACTION, null);
- }
-
- public void writeAclLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_ACL, href, Constants.MEDIATYPE_ACL, null);
- }
-
- public void writePoliciesLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_POLICIES, href, Constants.MEDIATYPE_FEED, null);
- }
-
- public void writeRelationshipsLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_RELATIONSHIPS, href, Constants.MEDIATYPE_FEED, null);
- }
-
- public void writeRelationshipSourceLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_SOURCE, href, Constants.MEDIATYPE_ENTRY, null);
- }
-
- public void writeRelationshipTargetLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_TARGET, href, Constants.MEDIATYPE_ENTRY, null);
- }
-
- public void writeFolderTreeLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_FOLDERTREE, href, Constants.MEDIATYPE_DESCENDANTS, null);
- }
-
- public void writeTypeUpLink(String href, String type) throws XMLStreamException {
- writeLink(Constants.REL_UP, href, type, null);
- }
-
- public void writeTypeDownLink(String href, String type) throws XMLStreamException {
- writeLink(Constants.REL_DOWN, href, type, null);
- }
-
- public void writeViaLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_VIA, href, Constants.MEDIATYPE_ENTRY, null);
- }
-
- public void writeFirstLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_FIRST, href, Constants.MEDIATYPE_FEED, null);
- }
-
- public void writeLastLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_LAST, href, Constants.MEDIATYPE_FEED, null);
- }
-
- public void writePreviousLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_PREV, href, Constants.MEDIATYPE_FEED, null);
- }
-
- public void writeNextLink(String href) throws XMLStreamException {
- writeLink(Constants.REL_NEXT, href, Constants.MEDIATYPE_FEED, null);
- }
+ /**
+ * Formats a DateTime.
+ */
+ public String formatDate(long millis) {
+ if (dateFormater == null) {
+ dateFormater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'",
+ Locale.US);
+ dateFormater.setTimeZone(TimeZone.getTimeZone("UTC"));
+ }
+
+ return dateFormater.format(millis);
+ }
+
+ /**
+ * Generates a valid Atom id.
+ */
+ public String generateAtomId(String input) {
+ if (input == null) {
+ return ID_DUMMY;
+ }
+
+ try {
+ return ID_PREFIX + Base64.encodeBytes(input.getBytes("UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ return ID_DUMMY;
+ }
+ }
+
+ /**
+ * Writes a simple tag.
+ */
+ public void writeSimpleTag(String namespace, String name, String value)
+ throws XMLStreamException {
+ if (value == null) {
+ return;
+ }
+
+ XMLStreamWriter xsw = getWriter();
+
+ xsw.writeStartElement(namespace, name);
+ xsw.writeCharacters(value);
+ xsw.writeEndElement();
+ }
+
+ /**
+ * Writes a simple date tag.
+ */
+ public void writeSimpleDate(String namespace, String name,
+ GregorianCalendar value) throws XMLStreamException {
+ if (value == null) {
+ return;
+ }
+
+ writeSimpleTag(namespace, name, formatDate(value.getTimeInMillis()));
+ }
+
+ /**
+ * Writes a simple date tag.
+ */
+ public void writeSimpleDate(String namespace, String name, long millis)
+ throws XMLStreamException {
+ writeSimpleTag(namespace, name, formatDate(millis));
+ }
+
+ /**
+ * Writes an Atom id tag.
+ */
+ public void writeId(String id) throws XMLStreamException {
+ writeSimpleTag(Constants.NAMESPACE_ATOM, "id", id);
+ }
+
+ /**
+ * Writes an Atom title tag.
+ */
+ public void writeTitle(String title) throws XMLStreamException {
+ writeSimpleTag(Constants.NAMESPACE_ATOM, "title", title);
+ }
+
+ /**
+ * Writes an Atom author tag.
+ */
+ public void writeAuthor(String author) throws XMLStreamException {
+ XMLStreamWriter xsw = getWriter();
+
+ xsw.writeStartElement(Constants.NAMESPACE_ATOM, "author");
+ writeSimpleTag(Constants.NAMESPACE_ATOM, "name", author);
+ xsw.writeEndElement();
+ }
+
+ /**
+ * Writes an Atom updated tag.
+ */
+ public void writeUpdated(GregorianCalendar updated)
+ throws XMLStreamException {
+ writeSimpleDate(Constants.NAMESPACE_APP, "edited", updated);
+ writeSimpleDate(Constants.NAMESPACE_ATOM, "updated", updated);
+ }
+
+ /**
+ * Writes an Atom updated tag.
+ */
+ public void writeUpdated(long updated) throws XMLStreamException {
+ writeSimpleDate(Constants.NAMESPACE_APP, "edited", updated);
+ writeSimpleDate(Constants.NAMESPACE_ATOM, "updated", updated);
+ }
+
+ /**
+ * Writes an Atom published tag.
+ */
+ public void writePublished(GregorianCalendar published)
+ throws XMLStreamException {
+ writeSimpleDate(Constants.NAMESPACE_ATOM, "published", published);
+ }
+
+ /**
+ * Writes an Atom published tag.
+ */
+ public void writePublished(long published) throws XMLStreamException {
+ writeSimpleDate(Constants.NAMESPACE_ATOM, "published", published);
+ }
+
+ /**
+ * Writes a CMIS pathSegment tag.
+ */
+ public void writePathSegment(String pathSegment) throws XMLStreamException {
+ writeSimpleTag(Constants.NAMESPACE_RESTATOM, "pathSegment", pathSegment);
+ }
+
+ /**
+ * Writes a CMIS relativePathSegment tag.
+ */
+ public void writeRelativePathSegment(String relativePathSegment)
+ throws XMLStreamException {
+ writeSimpleTag(Constants.NAMESPACE_RESTATOM, "relativePathSegment",
+ relativePathSegment);
+ }
+
+ /**
+ * Writes an Atom collection.
+ */
+ public void writeCollection(String href, String collectionType,
+ String text, String... accept) throws XMLStreamException {
+ XMLStreamWriter xsw = getWriter();
+
+ xsw.writeStartElement(Constants.NAMESPACE_APP, "collection");
+ xsw.writeAttribute("href", href);
+
+ if (collectionType != null) {
+ xsw.writeStartElement(Constants.NAMESPACE_RESTATOM,
+ "collectionType");
+ xsw.writeCharacters(collectionType);
+ xsw.writeEndElement();
+ }
+
+ xsw.writeStartElement(Constants.NAMESPACE_ATOM, "title");
+ xsw.writeAttribute("type", "text");
+ xsw.writeCharacters(text);
+ xsw.writeEndElement();
+
+ for (String ct : accept) {
+ xsw.writeStartElement(Constants.NAMESPACE_APP, "accept");
+ xsw.writeCharacters(ct);
+ xsw.writeEndElement();
+ }
+
+ xsw.writeEndElement();
+ }
+
+ /**
+ * Writes a link.
+ */
+ public void writeLink(String rel, String href, String type, String id)
+ throws XMLStreamException {
+ XMLStreamWriter xsw = getWriter();
+
+ xsw.writeStartElement(Constants.NAMESPACE_ATOM, "link");
+
+ xsw.writeAttribute("rel", rel);
+ xsw.writeAttribute("href", href);
+ if (type != null) {
+ xsw.writeAttribute("type", type);
+ }
+ if (id != null) {
+ xsw.writeAttribute(Constants.NAMESPACE_RESTATOM, "id", id);
+ }
+
+ xsw.writeEndElement();
+ }
+
+ public void writeServiceLink(String href, String repositoryId)
+ throws XMLStreamException {
+ try {
+ writeLink(Constants.REL_SERVICE, href + "?repositoryId="
+ + URLEncoder.encode(repositoryId, "UTF-8"),
+ Constants.MEDIATYPE_SERVICE, null);
+ } catch (UnsupportedEncodingException e) {
+ }
+ }
+
+ public void writeSelfLink(String href, String id) throws XMLStreamException {
+ writeLink(Constants.REL_SELF, href, Constants.MEDIATYPE_ENTRY, id);
+ }
+
+ public void writeEnclosureLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_ENCLOSURE, href, Constants.MEDIATYPE_ENTRY,
+ null);
+ }
+
+ public void writeEditLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_EDIT, href, Constants.MEDIATYPE_ENTRY, null);
+ }
+
+ public void writeAlternateLink(String href, String type, String kind,
+ String title, BigInteger length) throws XMLStreamException {
+ XMLStreamWriter xsw = getWriter();
+
+ xsw.writeStartElement(Constants.NAMESPACE_ATOM, "link");
+
+ xsw.writeAttribute("rel", Constants.REL_ALTERNATE);
+ xsw.writeAttribute("href", href);
+ if (type != null) {
+ xsw.writeAttribute("type", type);
+ }
+ if (kind != null) {
+ xsw.writeAttribute(Constants.NAMESPACE_RESTATOM, "renditionKind",
+ kind);
+ }
+ if (title != null) {
+ xsw.writeAttribute("title", title);
+ }
+ if (length != null) {
+ xsw.writeAttribute("length", length.toString());
+ }
+
+ xsw.writeEndElement();
+ }
+
+ public void writeWorkingCopyLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_WORKINGCOPY, href, Constants.MEDIATYPE_ENTRY,
+ null);
+ }
+
+ public void writeUpLink(String href, String type) throws XMLStreamException {
+ writeLink(Constants.REL_UP, href, type, null);
+ }
+
+ public void writeDownLink(String href, String type)
+ throws XMLStreamException {
+ writeLink(Constants.REL_DOWN, href, type, null);
+ }
+
+ public void writeVersionHistoryLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_VERSIONHISTORY, href, Constants.MEDIATYPE_FEED,
+ null);
+ }
+
+ public void writeCurrentVerionsLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_CURRENTVERSION, href,
+ Constants.MEDIATYPE_ENTRY, null);
+ }
+
+ public void writeEditMediaLink(String href, String type)
+ throws XMLStreamException {
+ writeLink(Constants.REL_EDITMEDIA, href, type, null);
+ }
+
+ public void writeDescribedByLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_DESCRIBEDBY, href, Constants.MEDIATYPE_ENTRY,
+ null);
+ }
+
+ public void writeAllowableActionsLink(String href)
+ throws XMLStreamException {
+ writeLink(Constants.REL_ALLOWABLEACTIONS, href,
+ Constants.MEDIATYPE_ALLOWABLEACTION, null);
+ }
+
+ public void writeAclLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_ACL, href, Constants.MEDIATYPE_ACL, null);
+ }
+
+ public void writePoliciesLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_POLICIES, href, Constants.MEDIATYPE_FEED, null);
+ }
+
+ public void writeRelationshipsLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_RELATIONSHIPS, href, Constants.MEDIATYPE_FEED,
+ null);
+ }
+
+ public void writeRelationshipSourceLink(String href)
+ throws XMLStreamException {
+ writeLink(Constants.REL_SOURCE, href, Constants.MEDIATYPE_ENTRY, null);
+ }
+
+ public void writeRelationshipTargetLink(String href)
+ throws XMLStreamException {
+ writeLink(Constants.REL_TARGET, href, Constants.MEDIATYPE_ENTRY, null);
+ }
+
+ public void writeFolderTreeLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_FOLDERTREE, href,
+ Constants.MEDIATYPE_DESCENDANTS, null);
+ }
+
+ public void writeTypeUpLink(String href, String type)
+ throws XMLStreamException {
+ writeLink(Constants.REL_UP, href, type, null);
+ }
+
+ public void writeTypeDownLink(String href, String type)
+ throws XMLStreamException {
+ writeLink(Constants.REL_DOWN, href, type, null);
+ }
+
+ public void writeViaLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_VIA, href, Constants.MEDIATYPE_ENTRY, null);
+ }
+
+ public void writeFirstLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_FIRST, href, Constants.MEDIATYPE_FEED, null);
+ }
+
+ public void writeLastLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_LAST, href, Constants.MEDIATYPE_FEED, null);
+ }
+
+ public void writePreviousLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_PREV, href, Constants.MEDIATYPE_FEED, null);
+ }
+
+ public void writeNextLink(String href) throws XMLStreamException {
+ writeLink(Constants.REL_NEXT, href, Constants.MEDIATYPE_FEED, null);
+ }
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java Sat Apr 28 16:33:35 2012
@@ -77,8 +77,8 @@ import org.apache.chemistry.opencmis.ser
import org.apache.chemistry.opencmis.server.shared.ExceptionHelper;
import org.apache.chemistry.opencmis.server.shared.HttpUtils;
import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* CMIS AtomPub servlet.
@@ -88,7 +88,7 @@ public class CmisAtomPubServlet extends
public static final String PARAM_CALL_CONTEXT_HANDLER = "callContextHandler";
public static final String PARAM_TRUSTED_PROXIES = "trustedProxies";
- private static final Log LOG = LogFactory.getLog(CmisAtomPubServlet.class.getName());
+ private static final Logger LOG = LoggerFactory.getLogger(CmisAtomPubServlet.class.getName());
private static final long serialVersionUID = 1L;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java Sat Apr 28 16:33:35 2012
@@ -113,8 +113,8 @@ import org.apache.chemistry.opencmis.ser
import org.apache.chemistry.opencmis.server.shared.Dispatcher;
import org.apache.chemistry.opencmis.server.shared.ExceptionHelper;
import org.apache.chemistry.opencmis.server.shared.HttpUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class CmisBrowserBindingServlet extends HttpServlet {
@@ -122,7 +122,7 @@ public class CmisBrowserBindingServlet e
public static final String PARAM_CALL_CONTEXT_HANDLER = "callContextHandler";
- private static final Log LOG = LogFactory.getLog(CmisBrowserBindingServlet.class.getName());
+ private static final Logger LOG = LoggerFactory.getLogger(CmisBrowserBindingServlet.class.getName());
private File tempDir;
private int memoryThreshold;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/dummy/DummyServicesFactory.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/dummy/DummyServicesFactory.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/dummy/DummyServicesFactory.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/dummy/DummyServicesFactory.java Sat Apr 28 16:33:35 2012
@@ -23,8 +23,8 @@ import java.util.Map;
import org.apache.chemistry.opencmis.commons.impl.server.AbstractServiceFactory;
import org.apache.chemistry.opencmis.commons.server.CallContext;
import org.apache.chemistry.opencmis.commons.server.CmisService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Implementation of a repository factory without back-end for test purposes.
@@ -37,7 +37,7 @@ public class DummyServicesFactory extend
private static final String REPOSITORY_NAME = "repository.name";
private static final String REPOSITORY_NAME_DEFAULT = "Test Repository";
- private static final Log LOG = LogFactory.getLog(DummyServicesFactory.class.getName());
+ private static final Logger LOG = LoggerFactory.getLogger(DummyServicesFactory.class.getName());
private DummyService service;
private String id;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java Sat Apr 28 16:33:35 2012
@@ -24,8 +24,8 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
+import org.apache.chemistry.opencmis.commons.impl.Base64;
import org.apache.chemistry.opencmis.commons.server.CallContext;
-import org.apache.commons.codec.binary.Base64;
/**
* Call Context handler that handles basic authentication.
@@ -52,7 +52,7 @@ public class BasicAuthCallContextHandler
String credentials = null;
try {
- credentials = new String(Base64.decodeBase64(authHeader.substring(x + 1).getBytes("ISO-8859-1")),
+ credentials = new String(Base64.decode(authHeader.substring(x + 1).getBytes("ISO-8859-1")),
"ISO-8859-1");
} catch (Exception e) {
return result;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/Dispatcher.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/Dispatcher.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/Dispatcher.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/Dispatcher.java Sat Apr 28 16:33:35 2012
@@ -31,8 +31,8 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
import org.apache.chemistry.opencmis.commons.server.CallContext;
import org.apache.chemistry.opencmis.commons.server.CmisService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Dispatcher for the AtomPub and Browser binding servlet.
@@ -46,7 +46,7 @@ public class Dispatcher implements Seria
public static final String METHOD_PUT = "PUT";
public static final String METHOD_DELETE = "DELETE";
- private static final Log LOG = LogFactory.getLog(Dispatcher.class.getName());
+ private static final Logger LOG = LoggerFactory.getLogger(Dispatcher.class.getName());
private final boolean caseSensitive;
private Map<String, Method> methodMap = new HashMap<String, Method>();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java Sat Apr 28 16:33:35 2012
@@ -29,8 +29,8 @@ import java.io.ByteArrayOutputStream;
import org.apache.chemistry.opencmis.commons.PropertyIds;
import org.apache.chemistry.opencmis.commons.data.ContentStream;
import org.apache.chemistry.opencmis.commons.data.PropertyString;
+import org.apache.chemistry.opencmis.commons.impl.Base64;
import org.apache.chemistry.opencmis.server.impl.atompub.AtomEntryParser;
-import org.apache.commons.codec.binary.Base64;
import org.junit.Test;
/**
@@ -55,7 +55,7 @@ public class AtomEntryParserTest {
+ " <cmis:propertyId propertyDefinitionId=\"cmis:objectTypeId\">"
+ " <cmis:value>cmis:document</cmis:value>" + " </cmis:propertyId>" + " </cmis:properties>"
+ "</cmisra:object>" + "<cmisra:content>" + " <cmisra:mediatype>text/plain</cmisra:mediatype>"
- + " <cmisra:base64>" + Base64.encodeBase64String(CMIS_ENTRY_CONTENT.getBytes()) + "</cmisra:base64>"
+ + " <cmisra:base64>" + Base64.encodeBytes(CMIS_ENTRY_CONTENT.getBytes()) + "</cmisra:base64>"
+ "</cmisra:content>" + "</atom:entry>";
private static final String ATOM_ENTRY_TEXT_CONTENT = "This is plain text!";
@@ -120,7 +120,7 @@ public class AtomEntryParserTest {
+ " <cmis:propertyId propertyDefinitionId=\"cmis:objectTypeId\">"
+ " <cmis:value>cmis:document</cmis:value>" + " </cmis:propertyId>" + " </cmis:properties>"
+ "</cmisra:object>" + "<atom:content type=\"application/something\">"
- + Base64.encodeBase64String(ATOM_ENTRY_BASE64_CONTENT.getBytes()) + "</atom:content>" + "</atom:entry>";
+ + Base64.encodeBytes(ATOM_ENTRY_BASE64_CONTENT.getBytes()) + "</atom:content>" + "</atom:entry>";
private static final String ATOM_ENTRY_NAME = "<?xml version='1.0' encoding='utf-8'?>"
+ "<atom:entry xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:cmis=\"http://docs.oasis-open.org/ns/cmis/core/200908/\" xmlns:cmisra=\"http://docs.oasis-open.org/ns/cmis/restatom/200908/\">"
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareRepository.java Sat Apr 28 16:33:35 2012
@@ -90,6 +90,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisStreamNotSupportedException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisUpdateConflictException;
+import org.apache.chemistry.opencmis.commons.impl.Base64;
import org.apache.chemistry.opencmis.commons.impl.Converter;
import org.apache.chemistry.opencmis.commons.impl.JaxBHelper;
import org.apache.chemistry.opencmis.commons.impl.MimeTypes;
@@ -124,9 +125,8 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.server.CallContext;
import org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler;
import org.apache.chemistry.opencmis.commons.spi.Holder;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* File system back-end for CMIS server.
@@ -145,7 +145,7 @@ public class FileShareRepository {
private static final int BUFFER_SIZE = 64 * 1024;
- private static final Log log = LogFactory.getLog(FileShareRepository.class);
+ private static final Logger log = LoggerFactory.getLogger(FileShareRepository.class);
/** Repository id */
private final String repositoryId;
@@ -2091,7 +2091,7 @@ public class FileShareRepository {
return root;
}
- return new File(root, (new String(Base64.decodeBase64(id.getBytes("ISO-8859-1")), "UTF-8")).replace('/',
+ return new File(root, (new String(Base64.decode(id.getBytes("US-ASCII")), "UTF-8")).replace('/',
File.separatorChar));
}
@@ -2121,7 +2121,7 @@ public class FileShareRepository {
String path = getRepositoryPath(file);
- return new String(Base64.encodeBase64(path.getBytes("UTF-8")), "ISO-8859-1");
+ return Base64.encodeBytes(path.getBytes("UTF-8"));
}
private String getRepositoryPath(File file) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java Sat Apr 28 16:33:35 2012
@@ -38,8 +38,8 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.server.CallContext;
import org.apache.chemistry.opencmis.commons.server.CmisService;
import org.apache.chemistry.opencmis.server.support.CmisServiceWrapper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class FileShareServiceFactory extends AbstractServiceFactory {
@@ -54,7 +54,7 @@ public class FileShareServiceFactory ext
private static final BigInteger DEFAULT_MAX_ITEMS_OBJECTS = BigInteger.valueOf(200);
private static final BigInteger DEFAULT_DEPTH_OBJECTS = BigInteger.valueOf(10);
- private static final Log log = LogFactory.getLog(FileShareServiceFactory.class);
+ private static final Logger log = LoggerFactory.getLogger(FileShareServiceFactory.class);
private RepositoryMap repositoryMap;
private TypeManager typeManager;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/TypeManager.java Sat Apr 28 16:33:35 2012
@@ -54,8 +54,8 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.dataobjects.TypeDefinitionContainerImpl;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.TypeDefinitionListImpl;
import org.apache.chemistry.opencmis.commons.server.CallContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Type Manager.
@@ -68,7 +68,7 @@ public class TypeManager {
private static final String NAMESPACE = "http://opencmis.org/fileshare";
- private static final Log log = LogFactory.getLog(TypeManager.class);
+ private static final Logger log = LoggerFactory.getLogger(TypeManager.class);
private Map<String, TypeDefinitionContainerImpl> types;
private List<TypeDefinitionContainer> typesList;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/ConfigurationSettings.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/ConfigurationSettings.java?rev=1331791&r1=1331790&r2=1331791&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/ConfigurationSettings.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/ConfigurationSettings.java Sat Apr 28 16:33:35 2012
@@ -1,66 +1,66 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.chemistry.opencmis.inmemory;
-
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class ConfigurationSettings {
-
- private static final Log LOG = LogFactory.getLog(ConfigurationSettings.class.getName());
-
- private static ConfigurationSettings singleInstance;
-
- final Map<String, String> parameters;
-
- private ConfigurationSettings(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
- private String getConfigurationValueIntern(String key) {
- return parameters.get(key);
- }
-
- public static String getConfigurationValueAsString(String key) {
- if (null == singleInstance) {
- LOG.error("ConfigurationSettings are not initialized. Initialize before reading values");
- throw new RuntimeException("ConfigurationSettings are not initialized.");
- }
- return singleInstance.getConfigurationValueIntern(key);
- }
-
- public static Long getConfigurationValueAsLong(String key) {
- String str = getConfigurationValueAsString(key);
- if (null != str) {
- return Long.valueOf(str);
- } else {
- return null;
- }
- }
-
- public static void init(Map<String, String> parameters) {
- singleInstance = new ConfigurationSettings(parameters);
- }
-
- public static Map<String, String> getParameters() {
- return singleInstance.parameters;
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.chemistry.opencmis.inmemory;
+
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ConfigurationSettings {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ConfigurationSettings.class.getName());
+
+ private static ConfigurationSettings singleInstance;
+
+ final Map<String, String> parameters;
+
+ private ConfigurationSettings(Map<String, String> parameters) {
+ this.parameters = parameters;
+ }
+
+ private String getConfigurationValueIntern(String key) {
+ return parameters.get(key);
+ }
+
+ public static String getConfigurationValueAsString(String key) {
+ if (null == singleInstance) {
+ LOG.error("ConfigurationSettings are not initialized. Initialize before reading values");
+ throw new RuntimeException("ConfigurationSettings are not initialized.");
+ }
+ return singleInstance.getConfigurationValueIntern(key);
+ }
+
+ public static Long getConfigurationValueAsLong(String key) {
+ String str = getConfigurationValueAsString(key);
+ if (null != str) {
+ return Long.valueOf(str);
+ } else {
+ return null;
+ }
+ }
+
+ public static void init(Map<String, String> parameters) {
+ singleInstance = new ConfigurationSettings(parameters);
+ }
+
+ public static Map<String, String> getParameters() {
+ return singleInstance.parameters;
+ }
+}