chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1494313 [1/3] - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory: ./ src/main/java/org/apache/chemistry/opencmis/inmemory/ src/main/java/org/apache/chemistry/opencmis/inmemory/query/ src/main/java/o...
Date Tue, 18 Jun 2013 21:24:09 GMT
Author: jens
Date: Tue Jun 18 21:24:08 2013
New Revision: 1494313

URL: http://svn.apache.org/r1494313
Log:
InMemory: erge refactoring branch

Added:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Fileable.java
      - copied unchanged from r1494271, chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Fileable.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreFiling.java
      - copied, changed from r1494271, chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreFiling.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreMultiFiling.java
      - copied unchanged from r1494271, chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreMultiFiling.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreSingleFiling.java
      - copied unchanged from r1494271, chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreSingleFiling.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FilingImpl.java
      - copied unchanged from r1494271, chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FilingImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FilingMutable.java
      - copied unchanged from r1494271, chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/FilingMutable.java
Removed:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/AbstractMultiFilingImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/AbstractSingleFilingImpl.java
Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/   (props changed)
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/pom.xml
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.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/BaseServiceValidatorImpl.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/InMemoryRelationshipServiceImpl.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/storedobj/api/Document.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoreManager.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoredObject.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/VersionedDocument.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.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/DocumentVersionImpl.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/InMemoryAcl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ItemImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ObjectStoreImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/PolicyImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/RelationshipImpl.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/storedobj/impl/StoredObjectImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DefaultTypeSystemCreator.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyUtil.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/DiscoveryServiceTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/FolderTest.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/PolicyTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/UnitTestTypeSystemCreator.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/VersionTestTypeSystemCreator.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/query/AbstractQueryConditionProcessor.java

Propchange: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Jun 18 21:24:08 2013
@@ -0,0 +1,3 @@
+/chemistry/opencmis/branches/inmemory-refactoring:1485997-1494271
+/incubator/chemistry/branches/0.62/opencmis/chemistry-opencmis-server/chemistry-opencmis-server-inmemory:812496-833086
+/incubator/chemistry/opencmis/branches/dev-maven-release/chemistry-opencmis-server/chemistry-opencmis-server-inmemory:954236-957294

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/pom.xml?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/pom.xml Tue Jun 18 21:24:08 2013
@@ -25,6 +25,8 @@
 
 	<properties>
 		<parentBasedir>../../</parentBasedir>
+        <maven.compile.source>1.6</maven.compile.source>
+        <maven.compile.target>1.6</maven.compile.target>
 	</properties>
 
 	<build>

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.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/DataObjectCreator.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java Tue Jun 18 21:24:08 2013
@@ -77,7 +77,7 @@ public class DataObjectCreator {
         boolean canCheckIn = false;
         boolean isVersioned = so instanceof Version || so instanceof VersionedDocument;
         boolean hasContent = so instanceof Content && ((Content) so).hasContent();
-        boolean isRootFolder = isFolder && ((Folder) so).getParent() == null;
+        boolean isRootFolder = isFolder && ((Folder) so).getParentId() == null;
         boolean hasRendition = so.hasRendition(user);
         boolean canGetAcl = user != null && (isDocument || isFolder || isItem);
         boolean canSetAcl = canGetAcl;

Modified: 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/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DummyCallContext.java Tue Jun 18 21:24:08 2013
@@ -43,43 +43,53 @@ public class DummyCallContext implements
         fParameter.put(LOCALE, "en");
     }
 
-    public boolean isObjectInfoRequired() {
+    @Override
+	public boolean isObjectInfoRequired() {
         return false;
     }
 
-    public Object get(String key) {
+    @Override
+	public Object get(String key) {
         return fParameter.get(key);
     }
 
-    public String getBinding() {
+    @Override
+	public String getBinding() {
         return BINDING_ATOMPUB;
     }
     
-    public CmisVersion getCmisVersion() {
+    @Override
+	public CmisVersion getCmisVersion() {
         return CmisVersion.CMIS_1_1;
     }
 
-    public String getRepositoryId() {
+    @Override
+	public String getRepositoryId() {
         return (String) get(REPOSITORY_ID);
     }
 
-    public String getLocale() {
+    @Override
+	public String getLocale() {
         return (String) get(LOCALE);
     }
 
-    public BigInteger getOffset() {
+    @Override
+	public BigInteger getOffset() {
         return (BigInteger) get(OFFSET);
     }
 
-    public BigInteger getLength() {
+    @Override
+	public BigInteger getLength() {
         return (BigInteger) get(LENGTH);
     }
 
-    public String getPassword() {
+    @Override
+	public String getPassword() {
         return (String) get(PASSWORD);
     }
 
-    public String getUsername() {
+    @Override
+	public String getUsername() {
         return (String) get(USERNAME);
     }
 
@@ -87,19 +97,23 @@ public class DummyCallContext implements
         fParameter.put(key, value);
     }
 
-    public File getTempDirectory() {
+    @Override
+	public File getTempDirectory() {
         return null;
     }
 
-    public boolean encryptTempFiles() {
+    @Override
+	public boolean encryptTempFiles() {
         return false;
     }
 
-    public int getMemoryThreshold() {
+    @Override
+	public int getMemoryThreshold() {
         return 4 * 1024 * 1024;
     }
 
-    public long getMaxContentSize() {
+    @Override
+	public long getMaxContentSize() {
         return 4 * 1024 * 1024 * 1024;
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.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/TypeManagerImpl.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.java Tue Jun 18 21:24:08 2013
@@ -62,14 +62,16 @@ public class TypeManagerImpl implements 
     /* (non-Javadoc)
      * @see org.apache.chemistry.opencmis.inmemory.TypeManager#getTypeById(java.lang.String)
      */
-    public TypeDefinitionContainer getTypeById(String typeId) {
+    @Override
+	public TypeDefinitionContainer getTypeById(String typeId) {
         return fTypesMap.get(typeId);
     }
 
     /* (non-Javadoc)
      * @see org.apache.chemistry.opencmis.inmemory.TypeManager#getTypeByQueryName(java.lang.String)
      */
-    public TypeDefinition getTypeByQueryName(String typeQueryName) {
+    @Override
+	public TypeDefinition getTypeByQueryName(String typeQueryName) {
         for (Entry<String, TypeDefinitionContainer> entry : fTypesMap.entrySet()) {
             if (entry.getValue().getTypeDefinition().getQueryName().equals(typeQueryName)) {
                 return entry.getValue().getTypeDefinition();
@@ -81,14 +83,16 @@ public class TypeManagerImpl implements 
     /* (non-Javadoc)
      * @see org.apache.chemistry.opencmis.inmemory.TypeManager#getTypeDefinitionList()
      */
-    public Collection<TypeDefinitionContainer> getTypeDefinitionList() {
+    @Override
+	public Collection<TypeDefinitionContainer> getTypeDefinitionList() {
         return Collections.unmodifiableCollection(fTypesMap.values());
     }
 
     /* (non-Javadoc)
      * @see org.apache.chemistry.opencmis.inmemory.TypeManager#getRootTypes()
      */
-    public List<TypeDefinitionContainer> getRootTypes() {
+    @Override
+	public List<TypeDefinitionContainer> getRootTypes() {
         // just take first repository
         List<TypeDefinitionContainer> rootTypes = new ArrayList<TypeDefinitionContainer>();
 
@@ -134,7 +138,8 @@ public class TypeManagerImpl implements 
      * @param cmisType
      *            new type to add
      */
-    public void addTypeDefinition(TypeDefinition cmisType) {
+    @Override
+	public void addTypeDefinition(TypeDefinition cmisType) {
         
         TypeDefinitionContainerImpl typeContainer = new TypeDefinitionContainerImpl(cmisType);
 
@@ -152,7 +157,8 @@ public class TypeManagerImpl implements 
         fTypesMap.put(cmisType.getId(), typeContainer);
     }
     
-    public void updateTypeDefinition(TypeDefinition typeDefinition) {
+    @Override
+	public void updateTypeDefinition(TypeDefinition typeDefinition) {
         throw new CmisNotSupportedException("updating a type definition is not supported.");
     }
 
@@ -160,7 +166,8 @@ public class TypeManagerImpl implements 
      * Remove a type from a type system
      * @param typeId
      */
-    public void deleteTypeDefinition(String typeId) {
+    @Override
+	public void deleteTypeDefinition(String typeId) {
         TypeDefinitionContainer typeDef = fTypesMap.remove(typeId);  
         // remove type from children of parent types
         TypeDefinitionContainer parentTypeContainer = fTypesMap.get(typeDef.getTypeDefinition().getParentTypeId());
@@ -184,7 +191,8 @@ public class TypeManagerImpl implements 
     /* (non-Javadoc)
      * @see org.apache.chemistry.opencmis.inmemory.TypeManager#getPropertyIdForQueryName(org.apache.chemistry.opencmis.commons.definitions.TypeDefinition, java.lang.String)
      */
-    public String getPropertyIdForQueryName(TypeDefinition typeDefinition, String propQueryName) {
+    @Override
+	public String getPropertyIdForQueryName(TypeDefinition typeDefinition, String propQueryName) {
         for (PropertyDefinition<?> pd : typeDefinition.getPropertyDefinitions().values()) {
             if (pd.getQueryName().equals(propQueryName)) {
                 return pd.getId();

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.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/query/InMemoryQueryProcessor.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java Tue Jun 18 21:24:08 2013
@@ -48,6 +48,7 @@ import org.apache.chemistry.opencmis.inm
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Folder;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStore;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStoreFiling;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoredObject;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.VersionedDocument;
 import org.apache.chemistry.opencmis.inmemory.storedobj.impl.ContentStreamDataImpl;
@@ -192,7 +193,8 @@ public class InMemoryQueryProcessor {
         }
         class ResultComparator implements Comparator<StoredObject> {
 
-            @SuppressWarnings("unchecked")
+            @Override
+			@SuppressWarnings("unchecked")
             public int compare(StoredObject so1, StoredObject so2) {
                 SortSpec s = orderBy.get(0);
                 CmisSelector sel = s.getSelector();
@@ -637,11 +639,11 @@ public class InMemoryQueryProcessor {
                 
     }
     
-    private static boolean hasParent(Filing objInFolder, String folderId, String user) {
-        List<Folder> parents = objInFolder.getParents(user);
+    private boolean hasParent(Filing objInFolder, String folderId, String user) {
+        List<String> parents = objStore.getParentIds(objInFolder, user);
 
-        for (Folder folder : parents) {
-            if (folderId.equals(folder.getId())) {
+        for (String parentId : parents) {
+            if (folderId.equals(parentId)) {
                 return true;
             }
         }
@@ -649,15 +651,16 @@ public class InMemoryQueryProcessor {
     }
 
     private boolean hasAncestor(Filing objInFolder, String folderId, String user) {
-        List<Folder> parents = objInFolder.getParents(user);
+        List<String> parents = objStore.getParentIds(objInFolder, user);
 
-        for (Folder folder : parents) {
-            if (folderId.equals(folder.getId())) {
+        for (String parentId : parents) {
+            if (folderId.equals(parentId)) {
                 return true;
             }
         }
-        for (Folder folder : parents) {
-            if (hasAncestor(folder, folderId, user)) {
+        for (String parentId : parents) {
+            Folder parentFolder = (Folder) objStore.getObjectById(parentId);
+            if (hasAncestor(parentFolder, folderId, user)) {
                 return true;
             }
         }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.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/server/BaseServiceValidatorImpl.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java Tue Jun 18 21:24:08 2013
@@ -179,59 +179,70 @@ public class BaseServiceValidatorImpl im
         }
     }
 
-    public void getRepositoryInfos(CallContext context, ExtensionsData extension) {
+    @Override
+	public void getRepositoryInfos(CallContext context, ExtensionsData extension) {
     }
 
-    public void getRepositoryInfo(CallContext context, String repositoryId, ExtensionsData extension) {
+    @Override
+	public void getRepositoryInfo(CallContext context, String repositoryId, ExtensionsData extension) {
 
         checkRepositoryId(repositoryId);
     }
 
-    public void getTypeChildren(CallContext context, String repositoryId, String typeId, ExtensionsData extension) {
+    @Override
+	public void getTypeChildren(CallContext context, String repositoryId, String typeId, ExtensionsData extension) {
 
         checkRepositoryId(repositoryId);
     }
 
-    public void getTypeDescendants(CallContext context, String repositoryId, String typeId, ExtensionsData extension) {
+    @Override
+	public void getTypeDescendants(CallContext context, String repositoryId, String typeId, ExtensionsData extension) {
 
         checkRepositoryId(repositoryId);
     }
 
-    public void getTypeDefinition(CallContext context, String repositoryId, String typeId, ExtensionsData extension) {
+    @Override
+	public void getTypeDefinition(CallContext context, String repositoryId, String typeId, ExtensionsData extension) {
 
         checkRepositoryId(repositoryId);
     }
 
-    public StoredObject getChildren(CallContext context, String repositoryId, String folderId, ExtensionsData extension) {
+    @Override
+	public StoredObject getChildren(CallContext context, String repositoryId, String folderId, ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, folderId);
     }
 
-    public StoredObject getDescendants(CallContext context, String repositoryId, String folderId,
+    @Override
+	public StoredObject getDescendants(CallContext context, String repositoryId, String folderId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, folderId);
     }
 
-    public StoredObject getFolderTree(CallContext context, String repositoryId, String folderId,
+    @Override
+	public StoredObject getFolderTree(CallContext context, String repositoryId, String folderId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, folderId);
     }
 
-    public StoredObject getObjectParents(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getObjectParents(CallContext context, String repositoryId, String objectId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject getFolderParent(CallContext context, String repositoryId, String folderId,
+    @Override
+	public StoredObject getFolderParent(CallContext context, String repositoryId, String folderId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, folderId);
     }
 
-    public StoredObject getCheckedOutDocs(CallContext context, String repositoryId, String folderId,
+    @Override
+	public StoredObject getCheckedOutDocs(CallContext context, String repositoryId, String folderId,
             ExtensionsData extension) {
 
         if (null != folderId) {
@@ -243,83 +254,97 @@ public class BaseServiceValidatorImpl im
 
     }
 
-    public StoredObject createDocument(CallContext context, String repositoryId, String folderId,
+    @Override
+	public StoredObject createDocument(CallContext context, String repositoryId, String folderId,
             List<String> policyIds, ExtensionsData extension) {
         return checkStandardParametersAllowNull(repositoryId, folderId);
     }
 
-    public StoredObject createDocumentFromSource(CallContext context, String repositoryId, String sourceId,
+    @Override
+	public StoredObject createDocumentFromSource(CallContext context, String repositoryId, String sourceId,
             String folderId, List<String> policyIds, ExtensionsData extension) {
 
         return checkStandardParametersAllowNull(repositoryId, sourceId);
     }
 
-    public StoredObject createFolder(CallContext context, String repositoryId, String folderId, List<String> policyIds,
+    @Override
+	public StoredObject createFolder(CallContext context, String repositoryId, String folderId, List<String> policyIds,
             ExtensionsData extension) {
         return checkStandardParameters(repositoryId, folderId);
     }
 
-    public StoredObject[] createRelationship(CallContext context, String repositoryId, String sourceId,
+    @Override
+	public StoredObject[] createRelationship(CallContext context, String repositoryId, String sourceId,
             String targetId, List<String> policyIds, ExtensionsData extension) {
         checkRepositoryId(repositoryId);
         checkStandardParametersAllowNull(repositoryId, null);
         return checkParams(repositoryId, sourceId, targetId);
     }
 
-    public StoredObject createPolicy(CallContext context, String repositoryId, String folderId, Acl addAces,
+    @Override
+	public StoredObject createPolicy(CallContext context, String repositoryId, String folderId, Acl addAces,
             Acl removeAces, List<String> policyIds, ExtensionsData extension) {
 
         return checkStandardParametersAllowNull(repositoryId, null);
     }
 
     // CMIS 1.1
-    public StoredObject createItem(CallContext context, String repositoryId, Properties properties, String folderId,
+    @Override
+	public StoredObject createItem(CallContext context, String repositoryId, Properties properties, String folderId,
             List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {
         return checkStandardParametersAllowNull(repositoryId, folderId);
     }
 
-    public StoredObject getAllowableActions(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getAllowableActions(CallContext context, String repositoryId, String objectId,
             ExtensionsData extension) {
         //
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject getObject(CallContext context, String repositoryId, String objectId, ExtensionsData extension) {
+    @Override
+	public StoredObject getObject(CallContext context, String repositoryId, String objectId, ExtensionsData extension) {
 
         StoredObject so = checkStandardParameters(repositoryId, objectId);
         return so;
     }
 
-    public StoredObject getProperties(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getProperties(CallContext context, String repositoryId, String objectId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject getRenditions(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getRenditions(CallContext context, String repositoryId, String objectId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject getObjectByPath(CallContext context, String repositoryId, String path, ExtensionsData extension) {
+    @Override
+	public StoredObject getObjectByPath(CallContext context, String repositoryId, String path, ExtensionsData extension) {
 
         return checkStandardParametersByPath(repositoryId, path, context.getUsername());
     }
 
-    public StoredObject getContentStream(CallContext context, String repositoryId, String objectId, String streamId,
+    @Override
+	public StoredObject getContentStream(CallContext context, String repositoryId, String objectId, String streamId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject updateProperties(CallContext context, String repositoryId, Holder<String> objectId,
+    @Override
+	public StoredObject updateProperties(CallContext context, String repositoryId, Holder<String> objectId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId.getValue());
     }
 
-    public StoredObject[] moveObject(CallContext context, String repositoryId, Holder<String> objectId,
+    @Override
+	public StoredObject[] moveObject(CallContext context, String repositoryId, Holder<String> objectId,
             String targetFolderId, String sourceFolderId, ExtensionsData extension) {
 
         StoredObject[] res = new StoredObject[3];
@@ -329,91 +354,107 @@ public class BaseServiceValidatorImpl im
         return res;
     }
 
-    public StoredObject deleteObject(CallContext context, String repositoryId, String objectId, Boolean allVersions,
+    @Override
+	public StoredObject deleteObject(CallContext context, String repositoryId, String objectId, Boolean allVersions,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject deleteTree(CallContext context, String repositoryId, String folderId, Boolean allVersions,
+    @Override
+	public StoredObject deleteTree(CallContext context, String repositoryId, String folderId, Boolean allVersions,
             UnfileObject unfileObjects, ExtensionsData extension) {
         return checkStandardParameters(repositoryId, folderId);
     }
 
-    public StoredObject setContentStream(CallContext context, String repositoryId, Holder<String> objectId,
+    @Override
+	public StoredObject setContentStream(CallContext context, String repositoryId, Holder<String> objectId,
             Boolean overwriteFlag, ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId.getValue());
     }
 
-    public StoredObject appendContentStream(CallContext context, String repositoryId, Holder<String> objectId,
+    @Override
+	public StoredObject appendContentStream(CallContext context, String repositoryId, Holder<String> objectId,
             ExtensionsData extension) {
         return checkStandardParameters(repositoryId, objectId.getValue());
     }
 
-    public StoredObject deleteContentStream(CallContext context, String repositoryId, Holder<String> objectId,
+    @Override
+	public StoredObject deleteContentStream(CallContext context, String repositoryId, Holder<String> objectId,
             ExtensionsData extension) {
         return checkStandardParameters(repositoryId, objectId.getValue());
     }
 
-    public StoredObject checkOut(CallContext context, String repositoryId, Holder<String> objectId,
+    @Override
+	public StoredObject checkOut(CallContext context, String repositoryId, Holder<String> objectId,
             ExtensionsData extension, Holder<Boolean> contentCopied) {
 
         return checkStandardParameters(repositoryId, objectId.getValue());
     }
 
-    public StoredObject cancelCheckOut(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject cancelCheckOut(CallContext context, String repositoryId, String objectId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject checkIn(CallContext context, String repositoryId, Holder<String> objectId, Acl addAces,
+    @Override
+	public StoredObject checkIn(CallContext context, String repositoryId, Holder<String> objectId, Acl addAces,
             Acl removeAces, List<String> policyIds, ExtensionsData extension) {
         return checkStandardParameters(repositoryId, objectId.getValue());
     }
 
-    public StoredObject getObjectOfLatestVersion(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getObjectOfLatestVersion(CallContext context, String repositoryId, String objectId,
             String versionSeriesId, ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, versionSeriesId == null ? objectId : versionSeriesId);
     }
 
-    public StoredObject getPropertiesOfLatestVersion(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getPropertiesOfLatestVersion(CallContext context, String repositoryId, String objectId,
             String versionSeriesId, ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, versionSeriesId == null ? objectId : versionSeriesId);
     }
 
-    public StoredObject getAllVersions(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getAllVersions(CallContext context, String repositoryId, String objectId,
             String versionSeriesId, ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, versionSeriesId == null ? objectId : versionSeriesId);
     }
 
-    public void query(CallContext context, String repositoryId, ExtensionsData extension) {
+    @Override
+	public void query(CallContext context, String repositoryId, ExtensionsData extension) {
 
         checkRepositoryId(repositoryId);
     }
 
-    public void getContentChanges(CallContext context, String repositoryId, ExtensionsData extension) {
+    @Override
+	public void getContentChanges(CallContext context, String repositoryId, ExtensionsData extension) {
 
         checkRepositoryId(repositoryId);
     }
 
-    public StoredObject[] addObjectToFolder(CallContext context, String repositoryId, String objectId, String folderId,
+    @Override
+	public StoredObject[] addObjectToFolder(CallContext context, String repositoryId, String objectId, String folderId,
             Boolean allVersions, ExtensionsData extension) {
 
         return checkParams(repositoryId, objectId, folderId);
     }
 
-    public StoredObject[] removeObjectFromFolder(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject[] removeObjectFromFolder(CallContext context, String repositoryId, String objectId,
             String folderId, ExtensionsData extension) {
 
         return checkParams(repositoryId, objectId, folderId);
     }
 
-    public StoredObject getObjectRelationships(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getObjectRelationships(CallContext context, String repositoryId, String objectId,
             RelationshipDirection relationshipDirection, String typeId, ExtensionsData extension) {
 
         StoredObject so = checkStandardParameters(repositoryId, objectId);
@@ -436,24 +477,28 @@ public class BaseServiceValidatorImpl im
         return so;
     }
 
-    public StoredObject getAcl(CallContext context, String repositoryId, String objectId, ExtensionsData extension) {
+    @Override
+	public StoredObject getAcl(CallContext context, String repositoryId, String objectId, ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject applyAcl(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject applyAcl(CallContext context, String repositoryId, String objectId,
             AclPropagation aclPropagation, ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject[] applyPolicy(CallContext context, String repositoryId, String policyId, String objectId,
+    @Override
+	public StoredObject[] applyPolicy(CallContext context, String repositoryId, String policyId, String objectId,
             ExtensionsData extension) {
 
         return checkParams(repositoryId, policyId, objectId);
     }
 
-    public StoredObject[] removePolicy(CallContext context, String repositoryId, String policyId, String objectId,
+    @Override
+	public StoredObject[] removePolicy(CallContext context, String repositoryId, String policyId, String objectId,
             ExtensionsData extension) {
 
         StoredObject[] sos = checkParams(repositoryId, policyId, objectId);
@@ -463,13 +508,15 @@ public class BaseServiceValidatorImpl im
         return sos;
     }
 
-    public StoredObject getAppliedPolicies(CallContext context, String repositoryId, String objectId,
+    @Override
+	public StoredObject getAppliedPolicies(CallContext context, String repositoryId, String objectId,
             ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject create(CallContext context, String repositoryId, String folderId, ExtensionsData extension) {
+    @Override
+	public StoredObject create(CallContext context, String repositoryId, String folderId, ExtensionsData extension) {
 
         return checkStandardParameters(repositoryId, folderId);
     }
@@ -480,7 +527,8 @@ public class BaseServiceValidatorImpl im
         return checkStandardParameters(repositoryId, objectId);
     }
 
-    public StoredObject applyAcl(CallContext context, String repositoryId, String objectId) {
+    @Override
+	public StoredObject applyAcl(CallContext context, String repositoryId, String objectId) {
 
         return checkStandardParameters(repositoryId, objectId);
     }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryDiscoveryServiceImpl.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/server/InMemoryDiscoveryServiceImpl.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryDiscoveryServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryDiscoveryServiceImpl.java Tue Jun 18 21:24:08 2013
@@ -30,7 +30,6 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.data.ObjectData;
 import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
 import org.apache.chemistry.opencmis.commons.data.ObjectList;
-import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
 import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.ChangeType;
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
@@ -66,18 +65,10 @@ public class InMemoryDiscoveryServiceImp
             BigInteger maxItems, ExtensionsData extension, ObjectInfoHandler objectInfos) {
         // dummy implementation using hard coded values
 
-        RepositoryInfo rep = fRepositoryService.getRepositoryInfo(context, repositoryId, null);
-        String rootFolderId = rep.getRootFolderId();
-
         ObjectListImpl objList = new ObjectListImpl();
-        List<ObjectInFolderContainer> tempRes = fNavigationService.getDescendants(context, repositoryId, rootFolderId,
-                BigInteger.valueOf(3), filter, false, IncludeRelationships.NONE, null, false, extension, null);
 
         // convert ObjectInFolderContainerList to objectList
         List<ObjectData> lod = new ArrayList<ObjectData>();
-        for (ObjectInFolderContainer obj : tempRes) {
-//            convertList(lod, obj);
-        }
 
         // add a dummy delete event
         ObjectDataImpl odImpl = new ObjectDataImpl();

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.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/server/InMemoryMultiFilingServiceImpl.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.java Tue Jun 18 21:24:08 2013
@@ -20,12 +20,14 @@ package org.apache.chemistry.opencmis.in
 
 import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
 import org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl;
 import org.apache.chemistry.opencmis.commons.server.CallContext;
 import org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Folder;
-import org.apache.chemistry.opencmis.inmemory.storedobj.api.MultiFiling;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStore;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStoreMultiFiling;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoreManager;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoredObject;
 import org.slf4j.Logger;
@@ -52,12 +54,10 @@ public class InMemoryMultiFilingServiceI
         }
         StoredObject so = sos[0];
         StoredObject folder = sos[1];
-        checkObjects(so, folder);
+        ObjectStoreMultiFiling osmf = checkObjects(repositoryId, so, folder);
 
         Folder newParent = (Folder) folder;
-        MultiFiling obj = (MultiFiling) so;
-        obj.addParent(newParent);
-
+        osmf.addParent(so, newParent);
         if (context.isObjectInfoRequired()) {
             ObjectInfoImpl objectInfo = new ObjectInfoImpl();
             fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, so, objectInfo);
@@ -78,10 +78,10 @@ public class InMemoryMultiFilingServiceI
 
         StoredObject folder = sos[1];
 
-        checkObjects(so, folder);
+        ObjectStoreMultiFiling osmf = checkObjects(repositoryId, so, folder);
         Folder parent = (Folder) folder;
-        MultiFiling obj = (MultiFiling) so;
-        obj.removeParent(parent);
+        
+        osmf.removeParent(so, parent);
 
         // To be able to provide all Atom links in the response we need
         // additional information:
@@ -95,10 +95,10 @@ public class InMemoryMultiFilingServiceI
         LOG.debug("End removeObjectFromFolder()");
     }
 
-    private static void checkObjects(StoredObject so, StoredObject folder) {
-        if (!(so instanceof MultiFiling)) {
-            throw new CmisConstraintException("Cannot add object to folder, object id " + so.getId()
-                    + " is not a multi-filed object.");
+    private ObjectStoreMultiFiling checkObjects(String repositoryId, StoredObject so, StoredObject folder) {
+        ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
+        if (!(objStore instanceof ObjectStoreMultiFiling)) {
+            throw new CmisInvalidArgumentException("Repository Id " + repositoryId + " does not support multi-filing");
         }
 
         if ((so instanceof Folder)) {
@@ -110,6 +110,8 @@ public class InMemoryMultiFilingServiceI
             throw new CmisConstraintException("Cannot add object to folder, folder id " + folder.getId()
                     + " does not refer to a folder.");
         }
+        
+        return (ObjectStoreMultiFiling) objStore;
     }
 
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.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/server/InMemoryNavigationServiceImpl.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryNavigationServiceImpl.java Tue Jun 18 21:24:08 2013
@@ -33,7 +33,6 @@ import org.apache.chemistry.opencmis.com
 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.definitions.TypeDefinition;
 import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
@@ -49,14 +48,13 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler;
 import org.apache.chemistry.opencmis.inmemory.DataObjectCreator;
 import org.apache.chemistry.opencmis.inmemory.FilterParser;
-import org.apache.chemistry.opencmis.inmemory.storedobj.api.Children;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.DocumentVersion;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.Fileable;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Folder;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Item;
-import org.apache.chemistry.opencmis.inmemory.storedobj.api.MultiFiling;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStore;
-import org.apache.chemistry.opencmis.inmemory.storedobj.api.SingleFiling;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStoreFiling;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoreManager;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoredObject;
 import org.apache.chemistry.opencmis.inmemory.types.PropertyCreationHelper;
@@ -275,36 +273,34 @@ public class InMemoryNavigationServiceIm
 
         ObjectInFolderListImpl result = new ObjectInFolderListImpl();
         List<ObjectInFolderData> folderList = new ArrayList<ObjectInFolderData>();
-        ObjectStore fs = fStoreManager.getObjectStore(repositoryId);
-        StoredObject so = fs.getObjectById(folderId);
-        Folder folder = null;
+        ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
+        StoredObject so = objStore.getObjectById(folderId);
+        ObjectStoreFiling objStoreFiling = (ObjectStoreFiling) objStore;
         boolean cmis11 = InMemoryServiceContext.getCallContext().getCmisVersion() != CmisVersion.CMIS_1_0;
         
         if (so == null) {
             throw new CmisObjectNotFoundException("Unknown object id: " + folderId);
         }
 
-        if (so instanceof Folder) {
-            folder = (Folder) so;
-        }
-        else {
+        if (!(so instanceof Folder)) {
             return null; // it is a document and has no children
         }
 
-        Children.ChildrenResult children = folderOnly ? folder.getFolderChildren(maxItems, skipCount, user) : folder
-                .getChildren(maxItems, skipCount, user, includePwc);
+        ObjectStoreFiling.ChildrenResult children = folderOnly ? objStoreFiling.getFolderChildren((Folder)so, maxItems, skipCount, user) : objStoreFiling
+                .getChildren((Folder)so, maxItems, skipCount, user, includePwc);
+
+        for (Fileable child : children.getChildren()) {
 
-        for (StoredObject spo : children.getChildren()) {
-            if (!cmis11 && spo instanceof Item)
+            if (!cmis11 && child instanceof Item)
                 continue; // ignore items for CMIS 1.0
             
             ObjectInFolderDataImpl oifd = new ObjectInFolderDataImpl();
             if (includePathSegments != null && includePathSegments) {
-                oifd.setPathSegment(spo.getName());
+                oifd.setPathSegment(child.getName());
             }
 
             TypeManager tm = fStoreManager.getTypeManager(repositoryId);
-            ObjectData objectData = PropertyCreationHelper.getObjectData(tm, spo, filter, user, includeAllowableActions, 
+            ObjectData objectData = PropertyCreationHelper.getObjectData(tm, child, filter, user, includeAllowableActions, 
                     includeRelationships, renditionFilter, false, false, null);
 
             oifd.setObject(objectData);
@@ -312,10 +308,9 @@ public class InMemoryNavigationServiceIm
             // add additional information for Atom
             if (objectInfos != null) {
                 ObjectInfoImpl objectInfo = new ObjectInfoImpl();
-                fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, spo, objectInfo);
+                fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, child, objectInfo);
                 objectInfos.addObjectInfo(objectInfo);
             }
-
         }
         result.setObjects(folderList);
         result.setNumItems(BigInteger.valueOf(children.getNoItems()));
@@ -365,66 +360,50 @@ public class InMemoryNavigationServiceIm
         return childrenOfFolderId;
     }
 
-	private List<ObjectParentData> getObjectParentsIntern(String repositoryId,
-			Filing sop, String filter, ObjectInfoHandler objectInfos,
-			Boolean includeAllowableActions,
-			IncludeRelationships includeRelationships, String renditionFilter,
-			Boolean includeRelativePathSegment, String user) {
-
-        List<ObjectParentData> result = null;
-        if (sop instanceof SingleFiling) {
-            ObjectData parent = getFolderParentIntern(repositoryId, (SingleFiling) sop, filter, 
-            		includeAllowableActions, includeRelationships, user, objectInfos);
-            if (null != parent) {
+    private List<ObjectParentData> getObjectParentsIntern(String repositoryId, Filing sop, String filter,
+            ObjectInfoHandler objectInfos, Boolean includeAllowableActions, 
+            IncludeRelationships includeRelationships, String renditionFilter, Boolean includeRelativePathSegment, String user) {
+
+        List<ObjectParentData> result = null;        
+        result = new ArrayList<ObjectParentData>();
+        ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
+        List<String> parentIds = ((ObjectStoreFiling)objStore).getParentIds(sop, user);
+        if (null != parentIds) {
+            for (String parentId : parentIds) {
                 ObjectParentDataImpl parentData = new ObjectParentDataImpl();
-                parentData.setObject(parent);
-                String path = ((SingleFiling) sop).getPath();
-                int beginIndex = path.lastIndexOf(Filing.PATH_SEPARATOR) + 1; 
-                //   Note: if not found results in 0
-                String relPathSeg = path.substring(beginIndex, path.length());
+                TypeManager tm = fStoreManager.getTypeManager(repositoryId);
+                Folder parent = (Folder) objStore.getObjectById(parentId);
+                ObjectData objData = PropertyCreationHelper.getObjectData(tm, parent, filter, user, includeAllowableActions, 
+                        includeRelationships, renditionFilter, false, true, null);
+                parentData.setObject(objData);
                 if (null != includeRelativePathSegment && includeRelativePathSegment)
-                	parentData.setRelativePathSegment(relPathSeg);
-                result = Collections.singletonList((ObjectParentData) parentData);
-            } else {
-                result = Collections.emptyList();
-            }
-        } else if (sop instanceof MultiFiling) {
-            result = new ArrayList<ObjectParentData>();
-            MultiFiling multiParentObj = (MultiFiling) sop;
-            List<Folder> parents = multiParentObj.getParents(user);
-            if (null != parents) {
-                for (Folder parent : parents) {
-                    ObjectParentDataImpl parentData = new ObjectParentDataImpl();
-                    TypeManager tm = fStoreManager.getTypeManager(repositoryId);
-                    ObjectData objData = PropertyCreationHelper.getObjectData(tm, parent, filter, user, includeAllowableActions, 
-                            includeRelationships, renditionFilter, false, true, null);
-
-                    parentData.setObject(objData);
-                    if (null != includeRelativePathSegment && includeRelativePathSegment)
-                    	parentData.setRelativePathSegment(multiParentObj.getPathSegment());
-                    result.add(parentData);
-                    if (objectInfos != null) {
-                        ObjectInfoImpl objectInfo = new ObjectInfoImpl();
-                        fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, parent, objectInfo);
-                        objectInfos.addObjectInfo(objectInfo);
-                    }
+                    parentData.setRelativePathSegment(sop.getPathSegment());
+                result.add(parentData);
+                if (objectInfos != null) {
+                    ObjectInfoImpl objectInfo = new ObjectInfoImpl();
+                    fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, parent, objectInfo);
+                    objectInfos.addObjectInfo(objectInfo);
                 }
             }
         }
+        
         return result;
     }
 
-    private ObjectData getFolderParentIntern(String repositoryId, SingleFiling sop, String filter,
+    private ObjectData getFolderParentIntern(String repositoryId, Filing sop, String filter,
     		Boolean includeAllowableActions, IncludeRelationships includeRelationships, 
     		String user, ObjectInfoHandler objectInfos) {
 
         ObjectDataImpl parent = new ObjectDataImpl();
 
-        Folder parentFolder = sop.getParent();
-
-        if (null == parentFolder) {
+        ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
+        List<String> parents = ((ObjectStoreFiling)objStore).getParentIds(sop, user);
+        if (null == parents || parents.isEmpty()) {
             return null;
         }
+        String parentId = parents.get(0);
+
+        Folder parentFolder = (Folder) objStore.getObjectById(parentId);
 
         copyFilteredProperties(repositoryId, parentFolder, filter, parent);
         

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.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/server/InMemoryObjectServiceImpl.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java Tue Jun 18 21:24:08 2013
@@ -68,13 +68,15 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.spi.Holder;
 import org.apache.chemistry.opencmis.inmemory.FilterParser;
 import org.apache.chemistry.opencmis.inmemory.NameValidator;
-import org.apache.chemistry.opencmis.inmemory.storedobj.api.Children.ChildrenResult;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Content;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Document;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.DocumentVersion;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.Fileable;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.Folder;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStore;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStoreFiling;
+import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStoreFiling.ChildrenResult;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoreManager;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoredObject;
 import org.apache.chemistry.opencmis.inmemory.storedobj.api.VersionedDocument;
@@ -117,12 +119,6 @@ public class InMemoryObjectServiceImpl e
         LOG.debug("start createDocumentFromSource()");
         StoredObject so = validator.createDocumentFromSource(context, repositoryId, sourceId, folderId, policies,
                 extension);
-        TypeDefinition td = getTypeDefinition(repositoryId, so); // type
-                                                                 // definition
-                                                                 // may be
-                                                                 // copied from
-                                                                 // source
-                                                                 // object
 
         ContentStream content = getContentStream(context, repositoryId, sourceId, null, BigInteger.valueOf(-1),
                 BigInteger.valueOf(-1), null);
@@ -167,7 +163,6 @@ public class InMemoryObjectServiceImpl e
     public String createPolicy(CallContext context, String repositoryId, Properties properties, String folderId,
             List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {
 
-        // TODO to be completed if policies are implemented
         LOG.debug("start createPolicy()");
         StoredObject so = createPolicyIntern(context, repositoryId, properties, folderId, policies, addAces,
                 removeAces, extension);
@@ -501,7 +496,7 @@ public class InMemoryObjectServiceImpl e
         } else if (so instanceof Filing) {
             spo = (Filing) so;
         } else {
-            throw new CmisInvalidArgumentException("Object must be folder or document: " + objectId.getValue());
+            throw new CmisInvalidArgumentException("Object must be fileable: " + objectId.getValue());
         }
 
         StoredObject soTarget = objectStore.getObjectById(targetFolderId);
@@ -524,8 +519,8 @@ public class InMemoryObjectServiceImpl e
         }
 
         boolean foundOldParent = false;
-        for (Folder parent : spo.getParents(user)) {
-            if (parent.getId().equals(soSource.getId())) {
+        for (String parentId : ((ObjectStoreFiling)objectStore).getParentIds(spo, user)) {
+            if (parentId.equals(soSource.getId())) {
                 foundOldParent = true;
                 break;
             }
@@ -535,12 +530,17 @@ public class InMemoryObjectServiceImpl e
                     + "is not a parent of object " + objectId.getValue());
         }
 
-        if (so instanceof Folder && hasDescendant((Folder) so, targetFolder)) {
+        if (so instanceof Folder && hasDescendant(context.getUsername(), objectStore, (Folder) so, targetFolder)) {
             throw new CmisNotSupportedException("Destination of a move cannot be a subfolder of the source");
         }
 
-        spo.move(sourceFolder, targetFolder);
+        if (objectStore instanceof ObjectStoreFiling) {
+            ((ObjectStoreFiling) objectStore).move(so, sourceFolder, targetFolder);
+        } else {
+            throw new CmisInvalidArgumentException("Repository " + repositoryId + "does not support Filing");
+        }
         objectId.setValue(so.getId());
+
         LOG.debug("stop moveObject()");
 
         TypeManager tm = fStoreManager.getTypeManager(repositoryId);
@@ -704,16 +704,19 @@ public class InMemoryObjectServiceImpl e
             PropertyData<?> pd = properties.getProperties().get(PropertyIds.NAME);
             if (pd != null && so instanceof Filing) {
                 String newName = (String) pd.getFirstValue();
-                List<Folder> parents = ((Filing) so).getParents(user);
-                if (so instanceof Folder && parents.isEmpty()) {
+                boolean hasParent = ((Filing) so).hasParent();
+                if (so instanceof Folder && !hasParent) {
                     throw new CmisConstraintException("updateProperties failed, you cannot rename the root folder");
                 }
                 if (newName == null || newName.equals("")) {
                     throw new CmisConstraintException("updateProperties failed, name must not be empty.");
                 }
-
-                so.rename((String) pd.getFirstValue()); // note: this does
-                                                        // persist
+                if (!NameValidator.isValidName(newName)) {
+                    throw new CmisInvalidArgumentException(NameValidator.ERROR_ILLEGAL_NAME);
+                }
+                // Note: the test for duplicated name in folder is left to the object store
+                ObjectStoreFiling objStore = (ObjectStoreFiling) fStoreManager.getObjectStore(repositoryId);
+                objStore.rename((Fileable)so, (String) pd.getFirstValue()); 
                 hasUpdatedProp = true;
             }
         }
@@ -738,6 +741,7 @@ public class InMemoryObjectServiceImpl e
         }
 
         if (null != acl) {
+            // TODO
             LOG.warn("Setting ACLs is currently not supported by this implementation, acl is ignored");
             // if implemented add this call:
             // fAclService.appyAcl(context, repositoryId, acl, null,
@@ -1179,22 +1183,18 @@ public class InMemoryObjectServiceImpl e
 
     }
 
-    private static boolean hasDescendant(Folder sourceFolder, Folder targetFolder) {
+    private boolean hasDescendant(String user, ObjectStore objStore, Folder sourceFolder, Folder targetFolder) {
         String sourceId = sourceFolder.getId();
         String targetId = targetFolder.getId();
+        
         while (targetId != null) {
-            // log.debug("comparing source id " + sourceId +
-            // " with predecessor "
-            // +
-            // targetId);
             if (targetId.equals(sourceId)) {
                 return true;
             }
-            targetFolder = targetFolder.getParent();
-            if (null != targetFolder) {
-                targetId = targetFolder.getId();
-            } else {
-                targetId = null;
+            List<String>parentIds = ((ObjectStoreFiling)objStore).getParentIds(targetFolder, user);
+            targetId = parentIds == null || parentIds.isEmpty() ? null : parentIds.get(0);    
+            if (null != targetId) {
+                targetFolder = (Folder) objStore.getObjectById(targetId);
             }
         }
         return false;
@@ -1204,7 +1204,7 @@ public class InMemoryObjectServiceImpl e
      * Recursively delete a tree by traversing it and first deleting all
      * children and then the object itself
      * 
-     * @param folderStore
+     * @param objStore
      * @param parentFolder
      * @param continueOnFailure
      * @param allVersions
@@ -1212,31 +1212,33 @@ public class InMemoryObjectServiceImpl e
      * @return returns true if operation should continue, false if it should
      *         stop
      */
-    private boolean deleteRecursive(ObjectStore folderStore, Folder parentFolder, boolean continueOnFailure,
+    private boolean deleteRecursive(ObjectStore objStore, Folder parentFolder, boolean continueOnFailure,
             boolean allVersions, List<String> failedToDeleteIds, String user) {
-        ChildrenResult childrenResult = parentFolder.getChildren(-1, -1, "Admin", true);
-        List<? extends StoredObject> children = childrenResult.getChildren();
+        
+        ObjectStoreFiling filingStore = (ObjectStoreFiling) objStore;
+        ChildrenResult childrenResult = filingStore.getChildren(parentFolder, -1, -1, "Admin", true);
+        List<Fileable> children = childrenResult.getChildren();
 
         if (null == children) {
             return true;
         }
 
-        for (StoredObject child : children) {
+        for (Fileable child : children) {
             if (child instanceof Folder) {
-                boolean mustContinue = deleteRecursive(folderStore, (Folder) child, continueOnFailure, allVersions,
+                boolean mustContinue = deleteRecursive(objStore, (Folder) child, continueOnFailure, allVersions,
                         failedToDeleteIds, user);
                 if (!mustContinue && !continueOnFailure) {
                     return false; // stop further deletions
                 }
             } else {
                 try {
-                    folderStore.deleteObject(child.getId(), allVersions, user);
+                    objStore.deleteObject(child.getId(), allVersions, user);
                 } catch (Exception e) {
                     failedToDeleteIds.add(child.getId());
                 }
             }
         }
-        folderStore.deleteObject(parentFolder.getId(), allVersions, user);
+        objStore.deleteObject(parentFolder.getId(), allVersions, user);
         return true;
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryRelationshipServiceImpl.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/server/InMemoryRelationshipServiceImpl.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryRelationshipServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryRelationshipServiceImpl.java Tue Jun 18 21:24:08 2013
@@ -26,7 +26,6 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.data.ObjectData;
 import org.apache.chemistry.opencmis.commons.data.ObjectList;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
-import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
 import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.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/server/InMemoryServiceFactoryImpl.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.java Tue Jun 18 21:24:08 2013
@@ -322,60 +322,74 @@ public class InMemoryServiceFactoryImpl 
 
         class DummyCallContext implements CallContext {
 
-            public String get(String key) {
+            @Override
+			public String get(String key) {
                 return null;
             }
 
-            public String getBinding() {
+            @Override
+			public String getBinding() {
                 return null;
             }
 
-            public boolean isObjectInfoRequired() {
+            @Override
+			public boolean isObjectInfoRequired() {
                 return false;
             }
 
-            public CmisVersion getCmisVersion() {
+            @Override
+			public CmisVersion getCmisVersion() {
                 return CmisVersion.CMIS_1_1;
             }
 
-            public String getRepositoryId() {
+            @Override
+			public String getRepositoryId() {
                 return null;
             }
 
-            public String getLocale() {
+            @Override
+			public String getLocale() {
                 return null;
             }
 
-            public BigInteger getOffset() {
+            @Override
+			public BigInteger getOffset() {
                 return null;
             }
 
-            public BigInteger getLength() {
+            @Override
+			public BigInteger getLength() {
                 return null;
             }
 
-            public String getPassword() {
+            @Override
+			public String getPassword() {
                 return null;
             }
 
-            public String getUsername() {
+            @Override
+			public String getUsername() {
                 return null;
             }
 
-            public File getTempDirectory() {
+            @Override
+			public File getTempDirectory() {
 
                 return tempDir;
             }
 
-            public boolean encryptTempFiles() {
+            @Override
+			public boolean encryptTempFiles() {
                 return encrypt;
             }
 
-            public int getMemoryThreshold() {
+            @Override
+			public int getMemoryThreshold() {
                 return memoryThreshold;
             }
 
-            public long getMaxContentSize() {
+            @Override
+			public long getMaxContentSize() {
                 return maxContentSize;
             }
         }
@@ -508,7 +522,8 @@ public class InMemoryServiceFactoryImpl 
         public void startCleanRepositoryJob(long intervalInMinutes) {
 
             final Runnable cleaner = new Runnable() {
-                public void run() {
+                @Override
+				public void run() {
                     LOG.info("Cleaning repository as part of a scheduled maintenance job.");
                     for (String repositoryId : storeManager.getAllRepositoryIds()) {
                         ObjectStore store = storeManager.getObjectStore(repositoryId);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Document.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/storedobj/api/Document.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Document.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Document.java Tue Jun 18 21:24:08 2013
@@ -26,6 +26,6 @@ package org.apache.chemistry.opencmis.in
  * 
  */
 
-public interface Document extends StoredObject, MultiFiling, Content {
+public interface Document extends Fileable, Content {
 
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.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/storedobj/api/DocumentVersion.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.java Tue Jun 18 21:24:08 2013
@@ -27,6 +27,6 @@ package org.apache.chemistry.opencmis.in
  * @author Jens
  * 
  */
-public interface DocumentVersion extends Version, Content, StoredObject, MultiFiling {
+public interface DocumentVersion extends Version, Content, Fileable {
 
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.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/storedobj/api/Filing.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.java Tue Jun 18 21:24:08 2013
@@ -35,7 +35,7 @@ public interface Filing {
      * character indicating how folders are separated within a path string. This
      * char must not be a valid character of an object name.
      */
-    String PATH_SEPARATOR = "/";
+    final String PATH_SEPARATOR = "/";
 
     /**
      * return a list of parents the principal has access to. for single parent object this list must contain
@@ -45,7 +45,7 @@ public interface Filing {
      * 		user id
      * @return list of parent folders
      */
-    List<Folder> getParents(String user);
+    List<String> getParents();
     
     /**
      * usually true except for the root folder, optimized call that just tests
@@ -58,12 +58,8 @@ public interface Filing {
     boolean hasParent();
 
     /**
-     * Move an object to a different folder. Source and target object are
-     * persisted in this call as part of a transactional step.
-     * 
-     * @param newParent
-     *            new parent folder for the object
+     * get the path segment of this object
+     * @return
      */
-    void move(Folder oldParent, Folder newParent);
-
+    String getPathSegment();
 }
\ No newline at end of file

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.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/storedobj/api/Folder.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.java Tue Jun 18 21:24:08 2013
@@ -29,9 +29,24 @@ import java.util.List;
  * 
  */
 
-public interface Folder extends Children, SingleFiling, StoredObject {
+public interface Folder extends Fileable {
 
     /**
+     * get parent if of this folder
+     * @return
+     *      parent id of this folder
+     */
+    String getParentId();
+    
+    /**
+     * get the path of this folder (for folder in CMIS path is unique)
+     * 
+     * @return
+     *      path of this folder
+     */
+    String getPath();
+    
+    /**
      * return a list of allowed types of children in this folder
      * 
      * @return

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.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/storedobj/api/Item.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.java Tue Jun 18 21:24:08 2013
@@ -18,6 +18,6 @@
  */
 package org.apache.chemistry.opencmis.inmemory.storedobj.api;
 
-public interface Item {
+public interface Item extends Fileable {
 
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.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/storedobj/api/ObjectStore.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.java Tue Jun 18 21:24:08 2013
@@ -196,7 +196,7 @@ public interface ObjectStore {
      */
     public StoredObject createPolicy(String name, String policyText, Map<String, PropertyData<?>> propMap, String user);
 
-     /**
+    /**
      * Clear repository and remove all data.
      */
     void clear();

Copied: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreFiling.java (from r1494271, chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreFiling.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/storedobj/api/ObjectStoreFiling.java?p2=chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreFiling.java&p1=chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreFiling.java&r1=1494271&r2=1494313&rev=1494313&view=diff
==============================================================================
--- chemistry/opencmis/branches/inmemory-refactoring/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreFiling.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStoreFiling.java Tue Jun 18 21:24:08 2013
@@ -51,9 +51,13 @@ public interface ObjectStoreFiling {
      * @param skipCount
      *            initial offset where to start fetching
      * @param user 
+     * 			user to determine visible children
+     * @param usePwc 
+     * 			if true return private working copy otherwise return latest version; 
+     * 
      * @return list of children objects
      */
-    ChildrenResult getChildren(Folder folder, int maxItems, int skipCount, String user );
+    ChildrenResult getChildren(Folder folder, int maxItems, int skipCount, String user, boolean usePwc);
 
     /**
      * get all the children of this folder which are folders. To support paging

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoreManager.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/storedobj/api/StoreManager.java?rev=1494313&r1=1494312&r2=1494313&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoreManager.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoreManager.java Tue Jun 18 21:24:08 2013
@@ -164,6 +164,10 @@ public interface StoreManager {
      */
     TypeManagerCreatable getTypeManager(String repositoryId);
     
+    boolean supportsSingleFiling(String repositoryId);
+    
+    boolean supportsMultiFilings(String repositoryId);
+    
     /**
      * Execute a query against the repository (same parameter as the discovery service
      * query method
@@ -183,4 +187,6 @@ public interface StoreManager {
             Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
             BigInteger maxItems, BigInteger skipCount);
     
+    
+    
  }
\ No newline at end of file



Mime
View raw message