You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by sk...@apache.org on 2010/06/15 17:51:43 UTC

svn commit: r954941 [4/7] - in /incubator/chemistry/opencmis/trunk: ./ _dev/ chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/ chemistry-opencmis-client/chemistry-opencmi...

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/log4j.properties?rev=954941&r1=954940&r2=954941&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/log4j.properties (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/log4j.properties Tue Jun 15 15:51:42 2010
@@ -1,3 +1,24 @@
+#
+#
+# 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.
+#
+#
+
 #sample log4j.properties
 
 log4j.rootCategory=DEBUG, R, O
@@ -19,4 +40,4 @@ log4j.appender.O.layout=org.apache.log4j
 log4j.appender.R.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c: %m%n
 log4j.appender.O.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c: %m%n
 
-log4j.logger.org.apache.opencmis.client.provider.spi=O
\ No newline at end of file
+log4j.logger.org.apache.opencmis.client.provider.spi=O

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareService.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareService.java?rev=954941&r1=954940&r2=954941&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareService.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareService.java Tue Jun 15 15:51:42 2010
@@ -1,297 +1,318 @@
-package org.apache.chemistry.opencmis.fileshare;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.chemistry.opencmis.commons.data.Acl;
-import org.apache.chemistry.opencmis.commons.data.AllowableActions;
-import org.apache.chemistry.opencmis.commons.data.ContentStream;
-import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
-import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
-import org.apache.chemistry.opencmis.commons.data.ObjectData;
-import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
-import org.apache.chemistry.opencmis.commons.data.ObjectInFolderList;
-import org.apache.chemistry.opencmis.commons.data.ObjectList;
-import org.apache.chemistry.opencmis.commons.data.ObjectParentData;
-import org.apache.chemistry.opencmis.commons.data.Properties;
-import org.apache.chemistry.opencmis.commons.data.RenditionData;
-import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
-import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
-import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
-import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
-import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
-import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
-import org.apache.chemistry.opencmis.commons.enums.VersioningState;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
-import org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectListImpl;
-import org.apache.chemistry.opencmis.commons.impl.server.AbstractCmisService;
-import org.apache.chemistry.opencmis.commons.server.CallContext;
-import org.apache.chemistry.opencmis.commons.spi.Holder;
-
-/**
- * FileShare service implementation.
- */
-public class FileShareService extends AbstractCmisService {
-
-    private RepositoryMap repositoryMap;
-    private CallContext context;
-
-    /**
-     * Constructor.
-     */
-    public FileShareService(RepositoryMap repositoryMap) {
-        this.repositoryMap = repositoryMap;
-    }
-
-    // --- context ---
-
-    public void setCallContext(CallContext context) {
-        this.context = context;
-    }
-
-    public CallContext getCallContext() {
-        return context;
-    }
-
-    public FileShareRepository getRepository() {
-        return repositoryMap.getRepository(getCallContext().getRepositoryId());
-    }
-
-    // --- repository service ---
-
-    @Override
-    public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
-        for (FileShareRepository fsr : repositoryMap.getRepositories()) {
-            if (fsr.getRepositoryId().equals(repositoryId)) {
-                return fsr.getRepositoryInfo(getCallContext());
-            }
-        }
-
-        throw new CmisObjectNotFoundException("Unknown repository '" + repositoryId + "'!");
-    }
-
-    @Override
-    public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
-        List<RepositoryInfo> result = new ArrayList<RepositoryInfo>();
-
-        for (FileShareRepository fsr : repositoryMap.getRepositories()) {
-            result.add(fsr.getRepositoryInfo(getCallContext()));
-        }
-
-        return result;
-    }
-
-    @Override
-    public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
-            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-        return getRepository().getTypesChildren(getCallContext(), typeId, includePropertyDefinitions, maxItems,
-                skipCount);
-    }
-
-    @Override
-    public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
-        return getRepository().getTypeDefinition(getCallContext(), typeId);
-    }
-
-    @Override
-    public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
-            Boolean includePropertyDefinitions, ExtensionsData extension) {
-        return getRepository().getTypesDescendants(getCallContext(), typeId, depth, includePropertyDefinitions);
-    }
-
-    // --- navigation service ---
-
-    @Override
-    public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
-            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-            Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-        return getRepository().getChildren(getCallContext(), folderId, filter, includeAllowableActions,
-                includePathSegment, maxItems, skipCount, this);
-    }
-
-    @Override
-    public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
-            String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-            String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
-        return getRepository().getDescendants(getCallContext(), folderId, depth, filter, includeAllowableActions,
-                includePathSegment, this, false);
-    }
-
-    @Override
-    public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
-        return getRepository().getFolderParent(getCallContext(), folderId, filter, this);
-    }
-
-    @Override
-    public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
-            String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-            String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
-        return getRepository().getDescendants(getCallContext(), folderId, depth, filter, includeAllowableActions,
-                includePathSegment, this, true);
-    }
-
-    @Override
-    public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
-            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-            Boolean includeRelativePathSegment, ExtensionsData extension) {
-        return getRepository().getObjectParents(getCallContext(), objectId, filter, includeAllowableActions,
-                includeRelativePathSegment, this);
-    }
-
-    @Override
-    public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
-            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-        ObjectListImpl result = new ObjectListImpl();
-        result.setHasMoreItems(false);
-        result.setNumItems(BigInteger.ZERO);
-        List<ObjectData> emptyList = Collections.emptyList();
-        result.setObjects(emptyList);
-
-        return result;
-    }
-
-    // --- object service ---
-
-    @Override
-    public String create(String repositoryId, Properties properties, String folderId, ContentStream contentStream,
-            VersioningState versioningState, List<String> policies, ExtensionsData extension) {
-        ObjectData object = getRepository().create(getCallContext(), properties, folderId, contentStream,
-                versioningState, this);
-
-        return object.getId();
-    }
-
-    @Override
-    public String createDocument(String repositoryId, Properties properties, String folderId,
-            ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
-            Acl removeAces, ExtensionsData extension) {
-        return getRepository().createDocument(getCallContext(), properties, folderId, contentStream, versioningState);
-    }
-
-    @Override
-    public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
-            String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces,
-            ExtensionsData extension) {
-        return getRepository().createDocumentFromSource(getCallContext(), sourceId, properties, folderId,
-                versioningState);
-    }
-
-    @Override
-    public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
-            Acl addAces, Acl removeAces, ExtensionsData extension) {
-        return getRepository().createFolder(getCallContext(), properties, folderId);
-    }
-
-    @Override
-    public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
-            ExtensionsData extension) {
-        getRepository().setContentStream(getCallContext(), objectId, true, null);
-    }
-
-    @Override
-    public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions,
-            ExtensionsData extension) {
-        getRepository().deleteObject(getCallContext(), objectId);
-    }
-
-    @Override
-    public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
-            UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
-        return getRepository().deleteTree(getCallContext(), folderId, continueOnFailure);
-    }
-
-    @Override
-    public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
-        return getRepository().getAllowableActions(getCallContext(), objectId);
-    }
-
-    @Override
-    public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
-            BigInteger length, ExtensionsData extension) {
-        return getRepository().getContentStream(getCallContext(), objectId, offset, length);
-    }
-
-    @Override
-    public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
-            IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
-            Boolean includeAcl, ExtensionsData extension) {
-        return getRepository().getObject(getCallContext(), objectId, null, filter, includeAllowableActions, includeAcl,
-                this);
-    }
-
-    @Override
-    public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
-            IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
-            Boolean includeAcl, ExtensionsData extension) {
-        return getRepository().getObjectByPath(getCallContext(), path, filter, includeAllowableActions, includeAcl,
-                this);
-    }
-
-    @Override
-    public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
-        ObjectData object = getRepository().getObject(getCallContext(), objectId, null, filter, false, false, this);
-        return object.getProperties();
-    }
-
-    @Override
-    public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
-            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-        return Collections.emptyList();
-    }
-
-    @Override
-    public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
-            ExtensionsData extension) {
-        getRepository().moveObject(getCallContext(), objectId, targetFolderId, this);
-    }
-
-    @Override
-    public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
-            Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
-        getRepository().setContentStream(getCallContext(), objectId, overwriteFlag, contentStream);
-    }
-
-    @Override
-    public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
-            Properties properties, ExtensionsData extension) {
-        getRepository().updateProperties(getCallContext(), objectId, properties, this);
-    }
-
-    // --- versioning service ---
-
-    @Override
-    public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
-            Boolean includeAllowableActions, ExtensionsData extension) {
-        ObjectData theVersion = getRepository().getObject(getCallContext(), objectId, versionSeriesId, filter,
-                includeAllowableActions, false, this);
-
-        return Collections.singletonList(theVersion);
-    }
-
-    @Override
-    public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
-            Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-            String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) {
-        return getRepository().getObject(getCallContext(), objectId, versionSeriesId, filter, includeAllowableActions,
-                includeAcl, this);
-    }
-
-    @Override
-    public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
-            Boolean major, String filter, ExtensionsData extension) {
-        ObjectData object = getRepository().getObject(getCallContext(), objectId, versionSeriesId, filter, false,
-                false, null);
-
-        return object.getProperties();
-    }
-
-    // --- ACL service ---
-
-    @Override
-    public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
-        return getRepository().getAcl(getCallContext(), objectId);
-    }
-}
+package org.apache.chemistry.opencmis.fileshare;
+/*
+ *
+ * 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.
+ *
+ */
+
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.chemistry.opencmis.commons.data.Acl;
+import org.apache.chemistry.opencmis.commons.data.AllowableActions;
+import org.apache.chemistry.opencmis.commons.data.ContentStream;
+import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
+import org.apache.chemistry.opencmis.commons.data.ObjectData;
+import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
+import org.apache.chemistry.opencmis.commons.data.ObjectInFolderList;
+import org.apache.chemistry.opencmis.commons.data.ObjectList;
+import org.apache.chemistry.opencmis.commons.data.ObjectParentData;
+import org.apache.chemistry.opencmis.commons.data.Properties;
+import org.apache.chemistry.opencmis.commons.data.RenditionData;
+import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
+import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
+import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
+import org.apache.chemistry.opencmis.commons.enums.VersioningState;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectListImpl;
+import org.apache.chemistry.opencmis.commons.impl.server.AbstractCmisService;
+import org.apache.chemistry.opencmis.commons.server.CallContext;
+import org.apache.chemistry.opencmis.commons.spi.Holder;
+
+/**
+ * FileShare service implementation.
+ */
+public class FileShareService extends AbstractCmisService {
+
+    private RepositoryMap repositoryMap;
+    private CallContext context;
+
+    /**
+     * Constructor.
+     */
+    public FileShareService(RepositoryMap repositoryMap) {
+        this.repositoryMap = repositoryMap;
+    }
+
+    // --- context ---
+
+    public void setCallContext(CallContext context) {
+        this.context = context;
+    }
+
+    public CallContext getCallContext() {
+        return context;
+    }
+
+    public FileShareRepository getRepository() {
+        return repositoryMap.getRepository(getCallContext().getRepositoryId());
+    }
+
+    // --- repository service ---
+
+    @Override
+    public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
+        for (FileShareRepository fsr : repositoryMap.getRepositories()) {
+            if (fsr.getRepositoryId().equals(repositoryId)) {
+                return fsr.getRepositoryInfo(getCallContext());
+            }
+        }
+
+        throw new CmisObjectNotFoundException("Unknown repository '" + repositoryId + "'!");
+    }
+
+    @Override
+    public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
+        List<RepositoryInfo> result = new ArrayList<RepositoryInfo>();
+
+        for (FileShareRepository fsr : repositoryMap.getRepositories()) {
+            result.add(fsr.getRepositoryInfo(getCallContext()));
+        }
+
+        return result;
+    }
+
+    @Override
+    public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        return getRepository().getTypesChildren(getCallContext(), typeId, includePropertyDefinitions, maxItems,
+                skipCount);
+    }
+
+    @Override
+    public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        return getRepository().getTypeDefinition(getCallContext(), typeId);
+    }
+
+    @Override
+    public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
+            Boolean includePropertyDefinitions, ExtensionsData extension) {
+        return getRepository().getTypesDescendants(getCallContext(), typeId, depth, includePropertyDefinitions);
+    }
+
+    // --- navigation service ---
+
+    @Override
+    public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        return getRepository().getChildren(getCallContext(), folderId, filter, includeAllowableActions,
+                includePathSegment, maxItems, skipCount, this);
+    }
+
+    @Override
+    public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
+            String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+        return getRepository().getDescendants(getCallContext(), folderId, depth, filter, includeAllowableActions,
+                includePathSegment, this, false);
+    }
+
+    @Override
+    public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
+        return getRepository().getFolderParent(getCallContext(), folderId, filter, this);
+    }
+
+    @Override
+    public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
+            String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+        return getRepository().getDescendants(getCallContext(), folderId, depth, filter, includeAllowableActions,
+                includePathSegment, this, true);
+    }
+
+    @Override
+    public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            Boolean includeRelativePathSegment, ExtensionsData extension) {
+        return getRepository().getObjectParents(getCallContext(), objectId, filter, includeAllowableActions,
+                includeRelativePathSegment, this);
+    }
+
+    @Override
+    public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        ObjectListImpl result = new ObjectListImpl();
+        result.setHasMoreItems(false);
+        result.setNumItems(BigInteger.ZERO);
+        List<ObjectData> emptyList = Collections.emptyList();
+        result.setObjects(emptyList);
+
+        return result;
+    }
+
+    // --- object service ---
+
+    @Override
+    public String create(String repositoryId, Properties properties, String folderId, ContentStream contentStream,
+            VersioningState versioningState, List<String> policies, ExtensionsData extension) {
+        ObjectData object = getRepository().create(getCallContext(), properties, folderId, contentStream,
+                versioningState, this);
+
+        return object.getId();
+    }
+
+    @Override
+    public String createDocument(String repositoryId, Properties properties, String folderId,
+            ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
+            Acl removeAces, ExtensionsData extension) {
+        return getRepository().createDocument(getCallContext(), properties, folderId, contentStream, versioningState);
+    }
+
+    @Override
+    public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
+            String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces,
+            ExtensionsData extension) {
+        return getRepository().createDocumentFromSource(getCallContext(), sourceId, properties, folderId,
+                versioningState);
+    }
+
+    @Override
+    public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
+            Acl addAces, Acl removeAces, ExtensionsData extension) {
+        return getRepository().createFolder(getCallContext(), properties, folderId);
+    }
+
+    @Override
+    public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+            ExtensionsData extension) {
+        getRepository().setContentStream(getCallContext(), objectId, true, null);
+    }
+
+    @Override
+    public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions,
+            ExtensionsData extension) {
+        getRepository().deleteObject(getCallContext(), objectId);
+    }
+
+    @Override
+    public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
+            UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
+        return getRepository().deleteTree(getCallContext(), folderId, continueOnFailure);
+    }
+
+    @Override
+    public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
+        return getRepository().getAllowableActions(getCallContext(), objectId);
+    }
+
+    @Override
+    public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
+            BigInteger length, ExtensionsData extension) {
+        return getRepository().getContentStream(getCallContext(), objectId, offset, length);
+    }
+
+    @Override
+    public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
+            IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+            Boolean includeAcl, ExtensionsData extension) {
+        return getRepository().getObject(getCallContext(), objectId, null, filter, includeAllowableActions, includeAcl,
+                this);
+    }
+
+    @Override
+    public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
+            IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+            Boolean includeAcl, ExtensionsData extension) {
+        return getRepository().getObjectByPath(getCallContext(), path, filter, includeAllowableActions, includeAcl,
+                this);
+    }
+
+    @Override
+    public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
+        ObjectData object = getRepository().getObject(getCallContext(), objectId, null, filter, false, false, this);
+        return object.getProperties();
+    }
+
+    @Override
+    public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        return Collections.emptyList();
+    }
+
+    @Override
+    public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
+            ExtensionsData extension) {
+        getRepository().moveObject(getCallContext(), objectId, targetFolderId, this);
+    }
+
+    @Override
+    public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
+            Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
+        getRepository().setContentStream(getCallContext(), objectId, overwriteFlag, contentStream);
+    }
+
+    @Override
+    public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+            Properties properties, ExtensionsData extension) {
+        getRepository().updateProperties(getCallContext(), objectId, properties, this);
+    }
+
+    // --- versioning service ---
+
+    @Override
+    public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
+            Boolean includeAllowableActions, ExtensionsData extension) {
+        ObjectData theVersion = getRepository().getObject(getCallContext(), objectId, versionSeriesId, filter,
+                includeAllowableActions, false, this);
+
+        return Collections.singletonList(theVersion);
+    }
+
+    @Override
+    public ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+            Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) {
+        return getRepository().getObject(getCallContext(), objectId, versionSeriesId, filter, includeAllowableActions,
+                includeAcl, this);
+    }
+
+    @Override
+    public Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
+            Boolean major, String filter, ExtensionsData extension) {
+        ObjectData object = getRepository().getObject(getCallContext(), objectId, versionSeriesId, filter, false,
+                false, null);
+
+        return object.getProperties();
+    }
+
+    // --- ACL service ---
+
+    @Override
+    public Acl getAcl(String repositoryId, String objectId, Boolean onlyBasicPermissions, ExtensionsData extension) {
+        return getRepository().getAcl(getCallContext(), objectId);
+    }
+}

Modified: incubator/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/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java?rev=954941&r1=954940&r2=954941&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-fileshare/src/main/java/org/apache/chemistry/opencmis/fileshare/FileShareServiceFactory.java Tue Jun 15 15:51:42 2010
@@ -1,208 +1,229 @@
-package org.apache.chemistry.opencmis.fileshare;
-
-import java.io.File;
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-
-import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
-import org.apache.chemistry.opencmis.commons.impl.Converter;
-import org.apache.chemistry.opencmis.commons.impl.JaxBHelper;
-import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
-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.chemistry.opencmis.server.support.CmisServiceWrapper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class FileShareServiceFactory extends AbstractServiceFactory {
-
-    private static final String PREFIX_LOGIN = "login.";
-    private static final String PREFIX_REPOSITORY = "repository.";
-    private static final String PREFIX_TYPE = "type.";
-    private static final String SUFFIX_READWRITE = ".readwrite";
-    private static final String SUFFIX_READONLY = ".readonly";
-
-    private static final BigInteger DEFAULT_MAX_ITEMS_TYPES = BigInteger.valueOf(50);
-    private static final BigInteger DEFAULT_DEPTH_TYPES = BigInteger.valueOf(-1);
-    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 RepositoryMap repositoryMap;
-    private TypeManager typeManager;
-
-    private ThreadLocal<CmisServiceWrapper<FileShareService>> threadLocalService = new ThreadLocal<CmisServiceWrapper<FileShareService>>();
-
-    public FileShareServiceFactory() {
-    }
-
-    @Override
-    public void init(Map<String, String> parameters) {
-        repositoryMap = new RepositoryMap();
-        typeManager = new TypeManager();
-
-        readConfiguration(parameters);
-    }
-
-    @Override
-    public void destroy() {
-        threadLocalService = null;
-    }
-
-    @Override
-    public CmisService getService(CallContext context) {
-        repositoryMap.authenticate(context);
-
-        CmisServiceWrapper<FileShareService> wrapperService = threadLocalService.get();
-        if (wrapperService == null) {
-            wrapperService = new CmisServiceWrapper<FileShareService>(new FileShareService(repositoryMap),
-                    DEFAULT_MAX_ITEMS_TYPES, DEFAULT_DEPTH_TYPES, DEFAULT_MAX_ITEMS_OBJECTS, DEFAULT_DEPTH_OBJECTS);
-            threadLocalService.set(wrapperService);
-        }
-
-        wrapperService.getWrappedService().setCallContext(context);
-
-        return wrapperService;
-    }
-
-    // ---- helpers ----
-
-    private void readConfiguration(Map<String, String> parameters) {
-        List<String> keys = new ArrayList<String>(parameters.keySet());
-        Collections.sort(keys);
-
-        for (String key : keys) {
-            if (key.startsWith(PREFIX_LOGIN)) {
-                // get logins
-                String usernameAndPassword = replaceSystemProperties(parameters.get(key));
-                if (usernameAndPassword == null) {
-                    continue;
-                }
-
-                String username = usernameAndPassword;
-                String password = "";
-
-                int x = usernameAndPassword.indexOf(':');
-                if (x > -1) {
-                    username = usernameAndPassword.substring(0, x);
-                    password = usernameAndPassword.substring(x + 1);
-                }
-
-                repositoryMap.addLogin(username, password);
-
-                log.info("Added login '" + username + "'.");
-            } else if (key.startsWith(PREFIX_TYPE)) {
-                // load type definition
-                TypeDefinition type = loadType(replaceSystemProperties(parameters.get(key)));
-                if (type != null) {
-                    typeManager.addType(type);
-                }
-            } else if (key.startsWith(PREFIX_REPOSITORY)) {
-                // configure repositories
-                String repositoryId = key.substring(PREFIX_REPOSITORY.length()).trim();
-                int x = repositoryId.lastIndexOf('.');
-                if (x > 0) {
-                    repositoryId = repositoryId.substring(0, x);
-                }
-
-                if (repositoryId.length() == 0) {
-                    throw new IllegalArgumentException("No repository id!");
-                }
-
-                if (key.endsWith(SUFFIX_READWRITE)) {
-                    // read-write users
-                    FileShareRepository fsr = repositoryMap.getRepository(repositoryId);
-                    for (String user : split(parameters.get(key))) {
-                        fsr.addUser(replaceSystemProperties(user), false);
-                    }
-                } else if (key.endsWith(SUFFIX_READONLY)) {
-                    // read-only users
-                    FileShareRepository fsr = repositoryMap.getRepository(repositoryId);
-                    for (String user : split(parameters.get(key))) {
-                        fsr.addUser(replaceSystemProperties(user), true);
-                    }
-                } else {
-                    // new repository
-                    String root = replaceSystemProperties(parameters.get(key));
-                    FileShareRepository fsr = new FileShareRepository(repositoryId, root, typeManager);
-
-                    repositoryMap.addRepository(fsr);
-
-                    log.info("Added repository '" + fsr.getRepositoryId() + "': " + root);
-                }
-            }
-        }
-    }
-
-    private List<String> split(String csl) {
-        if (csl == null) {
-            return Collections.emptyList();
-        }
-
-        List<String> result = new ArrayList<String>();
-        for (String s : csl.split(",")) {
-            result.add(s.trim());
-        }
-
-        return result;
-    }
-
-    private String replaceSystemProperties(String s) {
-        if (s == null) {
-            return null;
-        }
-
-        StringBuilder result = new StringBuilder();
-        StringBuilder property = null;
-        boolean inProperty = false;
-
-        for (int i = 0; i < s.length(); i++) {
-            char c = s.charAt(i);
-
-            if (inProperty) {
-                if (c == '}') {
-                    String value = System.getProperty(property.toString());
-                    if (value != null) {
-                        result.append(value);
-                    }
-                    inProperty = false;
-                } else {
-                    property.append(c);
-                }
-            } else {
-                if (c == '{') {
-                    property = new StringBuilder();
-                    inProperty = true;
-                } else {
-                    result.append(c);
-                }
-            }
-        }
-
-        return result.toString();
-    }
-
-    @SuppressWarnings("unchecked")
-    private TypeDefinition loadType(String filename) {
-        TypeDefinition result = null;
-
-        try {
-            Unmarshaller u = JaxBHelper.createUnmarshaller();
-            JAXBElement<CmisTypeDefinitionType> type = (JAXBElement<CmisTypeDefinitionType>) u.unmarshal(new File(
-                    filename));
-            result = Converter.convert(type.getValue());
-        } catch (Exception e) {
-            log.info("Could not load type: '" + filename + "'", e);
-        }
-
-        return result;
-    }
-}
+package org.apache.chemistry.opencmis.fileshare;
+/*
+ *
+ * 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.
+ *
+ */
+
+
+import java.io.File;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
+import org.apache.chemistry.opencmis.commons.impl.Converter;
+import org.apache.chemistry.opencmis.commons.impl.JaxBHelper;
+import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
+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.chemistry.opencmis.server.support.CmisServiceWrapper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class FileShareServiceFactory extends AbstractServiceFactory {
+
+    private static final String PREFIX_LOGIN = "login.";
+    private static final String PREFIX_REPOSITORY = "repository.";
+    private static final String PREFIX_TYPE = "type.";
+    private static final String SUFFIX_READWRITE = ".readwrite";
+    private static final String SUFFIX_READONLY = ".readonly";
+
+    private static final BigInteger DEFAULT_MAX_ITEMS_TYPES = BigInteger.valueOf(50);
+    private static final BigInteger DEFAULT_DEPTH_TYPES = BigInteger.valueOf(-1);
+    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 RepositoryMap repositoryMap;
+    private TypeManager typeManager;
+
+    private ThreadLocal<CmisServiceWrapper<FileShareService>> threadLocalService = new ThreadLocal<CmisServiceWrapper<FileShareService>>();
+
+    public FileShareServiceFactory() {
+    }
+
+    @Override
+    public void init(Map<String, String> parameters) {
+        repositoryMap = new RepositoryMap();
+        typeManager = new TypeManager();
+
+        readConfiguration(parameters);
+    }
+
+    @Override
+    public void destroy() {
+        threadLocalService = null;
+    }
+
+    @Override
+    public CmisService getService(CallContext context) {
+        repositoryMap.authenticate(context);
+
+        CmisServiceWrapper<FileShareService> wrapperService = threadLocalService.get();
+        if (wrapperService == null) {
+            wrapperService = new CmisServiceWrapper<FileShareService>(new FileShareService(repositoryMap),
+                    DEFAULT_MAX_ITEMS_TYPES, DEFAULT_DEPTH_TYPES, DEFAULT_MAX_ITEMS_OBJECTS, DEFAULT_DEPTH_OBJECTS);
+            threadLocalService.set(wrapperService);
+        }
+
+        wrapperService.getWrappedService().setCallContext(context);
+
+        return wrapperService;
+    }
+
+    // ---- helpers ----
+
+    private void readConfiguration(Map<String, String> parameters) {
+        List<String> keys = new ArrayList<String>(parameters.keySet());
+        Collections.sort(keys);
+
+        for (String key : keys) {
+            if (key.startsWith(PREFIX_LOGIN)) {
+                // get logins
+                String usernameAndPassword = replaceSystemProperties(parameters.get(key));
+                if (usernameAndPassword == null) {
+                    continue;
+                }
+
+                String username = usernameAndPassword;
+                String password = "";
+
+                int x = usernameAndPassword.indexOf(':');
+                if (x > -1) {
+                    username = usernameAndPassword.substring(0, x);
+                    password = usernameAndPassword.substring(x + 1);
+                }
+
+                repositoryMap.addLogin(username, password);
+
+                log.info("Added login '" + username + "'.");
+            } else if (key.startsWith(PREFIX_TYPE)) {
+                // load type definition
+                TypeDefinition type = loadType(replaceSystemProperties(parameters.get(key)));
+                if (type != null) {
+                    typeManager.addType(type);
+                }
+            } else if (key.startsWith(PREFIX_REPOSITORY)) {
+                // configure repositories
+                String repositoryId = key.substring(PREFIX_REPOSITORY.length()).trim();
+                int x = repositoryId.lastIndexOf('.');
+                if (x > 0) {
+                    repositoryId = repositoryId.substring(0, x);
+                }
+
+                if (repositoryId.length() == 0) {
+                    throw new IllegalArgumentException("No repository id!");
+                }
+
+                if (key.endsWith(SUFFIX_READWRITE)) {
+                    // read-write users
+                    FileShareRepository fsr = repositoryMap.getRepository(repositoryId);
+                    for (String user : split(parameters.get(key))) {
+                        fsr.addUser(replaceSystemProperties(user), false);
+                    }
+                } else if (key.endsWith(SUFFIX_READONLY)) {
+                    // read-only users
+                    FileShareRepository fsr = repositoryMap.getRepository(repositoryId);
+                    for (String user : split(parameters.get(key))) {
+                        fsr.addUser(replaceSystemProperties(user), true);
+                    }
+                } else {
+                    // new repository
+                    String root = replaceSystemProperties(parameters.get(key));
+                    FileShareRepository fsr = new FileShareRepository(repositoryId, root, typeManager);
+
+                    repositoryMap.addRepository(fsr);
+
+                    log.info("Added repository '" + fsr.getRepositoryId() + "': " + root);
+                }
+            }
+        }
+    }
+
+    private List<String> split(String csl) {
+        if (csl == null) {
+            return Collections.emptyList();
+        }
+
+        List<String> result = new ArrayList<String>();
+        for (String s : csl.split(",")) {
+            result.add(s.trim());
+        }
+
+        return result;
+    }
+
+    private String replaceSystemProperties(String s) {
+        if (s == null) {
+            return null;
+        }
+
+        StringBuilder result = new StringBuilder();
+        StringBuilder property = null;
+        boolean inProperty = false;
+
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+
+            if (inProperty) {
+                if (c == '}') {
+                    String value = System.getProperty(property.toString());
+                    if (value != null) {
+                        result.append(value);
+                    }
+                    inProperty = false;
+                } else {
+                    property.append(c);
+                }
+            } else {
+                if (c == '{') {
+                    property = new StringBuilder();
+                    inProperty = true;
+                } else {
+                    result.append(c);
+                }
+            }
+        }
+
+        return result.toString();
+    }
+
+    @SuppressWarnings("unchecked")
+    private TypeDefinition loadType(String filename) {
+        TypeDefinition result = null;
+
+        try {
+            Unmarshaller u = JaxBHelper.createUnmarshaller();
+            JAXBElement<CmisTypeDefinitionType> type = (JAXBElement<CmisTypeDefinitionType>) u.unmarshal(new File(
+                    filename));
+            result = Converter.convert(type.getValue());
+        } catch (Exception e) {
+            log.info("Could not load type: '" + filename + "'", e);
+        }
+
+        return result;
+    }
+}

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.java?rev=954941&r1=954940&r2=954941&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.java Tue Jun 15 15:51:42 2010
@@ -1,48 +1,69 @@
-package org.apache.chemistry.opencmis.inmemory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.chemistry.opencmis.commons.server.CallContext;
-
-public class DummyCallContext implements CallContext {
-    private Map<String, String> fParameter = new HashMap<String, String>();
-
-    public DummyCallContext() {
-        fParameter.put(USERNAME, "TestUser");
-        fParameter.put(PASSWORD, "secret");
-        fParameter.put(LOCALE, "en");
-    }
-
-    public boolean isObjectInfoRequired() {
-        return false;
-    }
-
-    public String get(String key) {
-        return fParameter.get(key);
-    }
-
-    public String getBinding() {
-        return BINDING_ATOMPUB;
-    }
-
-    public String getRepositoryId() {
-        return get(REPOSITORY_ID);
-    }
-
-    public String getLocale() {
-        return get(LOCALE);
-    }
-
-    public String getPassword() {
-        return get(PASSWORD);
-    }
-
-    public String getUsername() {
-        return get(USERNAME);
-    }
-
-    public void put(String key, String value) {
-        fParameter.put(key, value);
-    }
-}
+package org.apache.chemistry.opencmis.inmemory;
+/*
+ *
+ * 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.
+ *
+ */
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.chemistry.opencmis.commons.server.CallContext;
+
+public class DummyCallContext implements CallContext {
+    private Map<String, String> fParameter = new HashMap<String, String>();
+
+    public DummyCallContext() {
+        fParameter.put(USERNAME, "TestUser");
+        fParameter.put(PASSWORD, "secret");
+        fParameter.put(LOCALE, "en");
+    }
+
+    public boolean isObjectInfoRequired() {
+        return false;
+    }
+
+    public String get(String key) {
+        return fParameter.get(key);
+    }
+
+    public String getBinding() {
+        return BINDING_ATOMPUB;
+    }
+
+    public String getRepositoryId() {
+        return get(REPOSITORY_ID);
+    }
+
+    public String getLocale() {
+        return get(LOCALE);
+    }
+
+    public String getPassword() {
+        return get(PASSWORD);
+    }
+
+    public String getUsername() {
+        return get(USERNAME);
+    }
+
+    public void put(String key, String value) {
+        fParameter.put(key, value);
+    }
+}

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java?rev=954941&r1=954940&r2=954941&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java Tue Jun 15 15:51:42 2010
@@ -1,4 +1,25 @@
 package org.apache.chemistry.opencmis.inmemory.storedobj.impl;
+/*
+ *
+ * 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.
+ *
+ */
+
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java?rev=954941&r1=954940&r2=954941&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FolderImpl.java Tue Jun 15 15:51:42 2010
@@ -1,4 +1,25 @@
 package org.apache.chemistry.opencmis.inmemory.storedobj.impl;
+/*
+ *
+ * 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.
+ *
+ */
+
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -241,4 +262,4 @@ public class FolderImpl extends Abstract
         return null;
     }
 
-}
\ No newline at end of file
+}