chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r920429 - in /incubator/chemistry/trunk/opencmis/opencmis-client: opencmis-client-api/src/main/java/org/apache/opencmis/client/api/ opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/ opencmis-provider-impl/src/main/java/...
Date Mon, 08 Mar 2010 18:16:17 GMT
Author: fmui
Date: Mon Mar  8 18:16:17 2010
New Revision: 920429

URL: http://svn.apache.org/viewvc?rev=920429&view=rev
Log:
CMIS-149: fixed root folder behavior
preparation for re-introducing caching

Modified:
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Folder.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/OperationContext.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AbstractPersistentCmisObject.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/OperationContextImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentDocumentImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/main/java/org/apache/opencmis/client/provider/spi/atompub/NavigationServiceImpl.java

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Folder.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Folder.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Folder.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Folder.java
Mon Mar  8 18:16:17 2010
@@ -67,6 +67,8 @@
 
   PagingList<CmisObject> getChildren(OperationContext context, int itemsPerPage);
 
+  boolean isRootFolder();
+  
   Folder getFolderParent();
 
   String getPath();

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/OperationContext.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/OperationContext.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/OperationContext.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/OperationContext.java
Mon Mar  8 18:16:17 2010
@@ -18,24 +18,26 @@
  */
 package org.apache.opencmis.client.api;
 
+import java.util.Set;
+
 import org.apache.opencmis.commons.enums.IncludeRelationships;
 
 public interface OperationContext {
 
-  String getFilter();
+  Set<String> getFilter();
 
-  void setFilter(String filter);
+  void setFilter(Set<String> propertyFilter);
 
   /**
    * Returns the filter extended by cmis:objectId, cmis:objectTypeId and cmis:baseTypeId.
    */
-  String getFullFilter();
+  String getFilterString();
 
-  boolean getIncludeAllowableActions();
+  boolean isIncludeAllowableActions();
 
   void setIncludeAllowableActions(boolean include);
 
-  boolean getIncludeAcls();
+  boolean isIncludeAcls();
 
   void setIncludeAcls(boolean include);
 
@@ -43,15 +45,17 @@
 
   void setIncludeRelationships(IncludeRelationships include);
 
-  boolean getIncludePolicies();
+  boolean isIncludePolicies();
 
   void setIncludePolicies(boolean include);
 
-  String getRenditionFilter();
+  Set<String> getRenditionFilter();
+
+  void setRenditionFilter(Set<String> renditionFilter);
 
-  void setRenditionFilter(String filter);
+  String getRenditionFilterString();
 
-  boolean getIncludePathSegments();
+  boolean isIncludePathSegments();
 
   void setIncludePathSegments(boolean include);
 
@@ -59,4 +63,9 @@
 
   void setOrderBy(String orderBy);
 
+  boolean isCacheEnabled();
+
+  void setCacheEnabled(boolean cacheEnabled);
+
+  String getCacheKey();
 }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Session.java
Mon Mar  8 18:16:17 2010
@@ -20,6 +20,7 @@
 
 import java.util.List;
 import java.util.Locale;
+import java.util.Set;
 
 import org.apache.opencmis.client.api.objecttype.ObjectType;
 import org.apache.opencmis.client.api.repository.ObjectFactory;
@@ -66,10 +67,10 @@
   /**
    * Creates an operation context object.
    */
-  OperationContext createOperationContext(String filter, boolean includeAcls,
+  OperationContext createOperationContext(Set<String> filter, boolean includeAcls,
       boolean includeAllowableActions, boolean includePolicies,
-      IncludeRelationships includeRelationships, String renditionFilter,
-      boolean includePathSegments, String orderBy);
+      IncludeRelationships includeRelationships, Set<String> renditionFilter,
+      boolean includePathSegments, String orderBy, boolean cacheEnabled);
 
   // localization
 

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AbstractPersistentCmisObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AbstractPersistentCmisObject.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AbstractPersistentCmisObject.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AbstractPersistentCmisObject.java
Mon Mar  8 18:16:17 2010
@@ -627,7 +627,7 @@
         // fetch the relationships
         ObjectList relList = relationshipService.getObjectRelationships(getRepositoryId(),
             objectId, includeSubRelationshipTypes, relationshipDirection, typeId, ctxt
-                .getFullFilter(), ctxt.getIncludeAllowableActions(), BigInteger
+                .getFilterString(), ctxt.isIncludeAllowableActions(), BigInteger
                 .valueOf(getMaxItemsPerPage()), BigInteger.valueOf(skipCount), null);
 
         // convert relationship objects
@@ -679,9 +679,10 @@
 
     // get the latest data from the repository
     ObjectData objectData = getSession().getProvider().getObjectService().getObject(
-        getRepositoryId(), objectId, context.getFullFilter(), context.getIncludeAllowableActions(),
-        context.getIncludeRelationships(), context.getRenditionFilter(),
-        context.getIncludePolicies(), context.getIncludeAcls(), null);
+        getRepositoryId(), objectId, context.getFilterString(),
+        context.isIncludeAllowableActions(), context.getIncludeRelationships(),
+        context.getRenditionFilterString(), context.isIncludePolicies(), context.isIncludeAcls(),
+        null);
 
     // reset this object
     initialize(getSession(), getObjectType(), objectData);

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/OperationContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/OperationContextImpl.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/OperationContextImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/OperationContextImpl.java
Mon Mar  8 18:16:17 2010
@@ -19,6 +19,9 @@
 package org.apache.opencmis.client.runtime;
 
 import java.io.Serializable;
+import java.util.Collections;
+import java.util.Set;
+import java.util.TreeSet;
 
 import org.apache.opencmis.client.api.OperationContext;
 import org.apache.opencmis.commons.PropertyIds;
@@ -31,77 +34,120 @@
 
   private static final long serialVersionUID = 1L;
 
-  private String filter;
+  private TreeSet<String> filter;
   private boolean includeAcls;
   private boolean includeAllowableActions;
   private boolean includePolicies;
   private IncludeRelationships includeRelationships;
-  private String renditionFilter;
+  private TreeSet<String> renditionFilter;
   private boolean includePathSegments;
   private String orderBy;
+  private boolean cacheEnabled;
 
   public OperationContextImpl() {
-    this.filter = null;
-    this.includeAcls = false;
-    this.includeAllowableActions = true;
-    this.includePolicies = true;
-    this.includeRelationships = IncludeRelationships.NONE;
-    this.renditionFilter = null;
-    this.includePathSegments = true;
-    this.orderBy = null;
+    setFilter(null);
+    setIncludeAcls(false);
+    setIncludeAllowableActions(true);
+    setIncludePolicies(false);
+    setIncludeRelationships(IncludeRelationships.NONE);
+    setRenditionFilter(null);
+    setIncludePathSegments(true);
+    setOrderBy(null);
+    setCacheEnabled(false);
   }
 
   public OperationContextImpl(OperationContext source) {
-    this.filter = source.getFilter();
-    this.includeAcls = source.getIncludeAcls();
-    this.includeAllowableActions = source.getIncludeAllowableActions();
-    this.includePolicies = source.getIncludePolicies();
-    this.includeRelationships = source.getIncludeRelationships();
-    this.renditionFilter = source.getRenditionFilter();
-    this.includePathSegments = source.getIncludePathSegments();
-    this.orderBy = source.getOrderBy();
-  }
-
-  public OperationContextImpl(String filter, boolean includeAcls, boolean includeAllowableActions,
-      boolean includePolicies, IncludeRelationships includeRelationships, String renditionFilter,
-      boolean includePathSegments, String orderBy) {
-    this.filter = filter;
-    this.includeAcls = includeAcls;
-    this.includeAllowableActions = includeAllowableActions;
-    this.includePolicies = includePolicies;
-    this.includeRelationships = includeRelationships;
-    this.renditionFilter = renditionFilter;
-    this.includePathSegments = includePathSegments;
-    this.orderBy = orderBy;
-  }
+    setFilter(source.getFilter());
+    setIncludeAcls(source.isIncludeAcls());
+    setIncludeAllowableActions(source.isIncludeAllowableActions());
+    setIncludePolicies(source.isIncludePolicies());
+    setIncludeRelationships(source.getIncludeRelationships());
+    setRenditionFilter(source.getRenditionFilter());
+    setIncludePathSegments(source.isIncludePathSegments());
+    setOrderBy(source.getOrderBy());
+    setCacheEnabled(source.isCacheEnabled());
+  }
+
+  public OperationContextImpl(Set<String> propertyFilter, boolean includeAcls,
+      boolean includeAllowableActions, boolean includePolicies,
+      IncludeRelationships includeRelationships, Set<String> renditionFilter,
+      boolean includePathSegments, String orderBy, boolean cacheEnabled) {
+    setFilter(filter);
+    setIncludeAcls(includeAcls);
+    setIncludeAllowableActions(includeAllowableActions);
+    setIncludePolicies(includePolicies);
+    setIncludeRelationships(includeRelationships);
+    setRenditionFilter(renditionFilter);
+    setIncludePathSegments(includePathSegments);
+    setOrderBy(orderBy);
+    setCacheEnabled(cacheEnabled);
+  }
+
+  public Set<String> getFilter() {
+    return Collections.unmodifiableSet(this.filter);
+  }
+
+  public void setFilter(Set<String> propertyFilter) {
+    if (propertyFilter != null) {
+      TreeSet<String> tempSet = new TreeSet<String>();
+
+      for (String oid : propertyFilter) {
+        if (oid == null) {
+          continue;
+        }
+
+        String toid = oid.trim();
+        if (toid.length() == 0) {
+          continue;
+        }
+        if (toid.equals("*")) {
+          tempSet = new TreeSet<String>();
+          tempSet.add("*");
+          break;
+        }
 
-  public String getFilter() {
-    return this.filter;
-  }
+        tempSet.add(toid);
+      }
 
-  public void setFilter(String filter) {
-    this.filter = filter;
+      if (tempSet.size() == 0) {
+        this.filter = null;
+      }
+      else {
+        this.filter = tempSet;
+      }
+    }
+    else {
+      this.filter = null;
+    }
   }
 
-  public String getFullFilter() {
-    String fullFilter = filter;
+  public String getFilterString() {
+    if (this.filter == null) {
+      return null;
+    }
 
-    if ((fullFilter != null) && (fullFilter.indexOf('*') == -1)) {
-      if (fullFilter.indexOf(PropertyIds.CMIS_OBJECT_ID) == -1) {
-        fullFilter = PropertyIds.CMIS_OBJECT_ID + "," + fullFilter;
-      }
-      if (fullFilter.indexOf(PropertyIds.CMIS_BASE_TYPE_ID) == -1) {
-        fullFilter = PropertyIds.CMIS_BASE_TYPE_ID + "," + fullFilter;
-      }
-      if (fullFilter.indexOf(PropertyIds.CMIS_OBJECT_TYPE_ID) == -1) {
-        fullFilter = PropertyIds.CMIS_OBJECT_TYPE_ID + "," + fullFilter;
+    if (this.filter.contains("*")) {
+      return "*";
+    }
+
+    this.filter.add(PropertyIds.CMIS_OBJECT_ID);
+    this.filter.add(PropertyIds.CMIS_BASE_TYPE_ID);
+    this.filter.add(PropertyIds.CMIS_OBJECT_TYPE_ID);
+
+    StringBuilder sb = new StringBuilder();
+
+    for (String oid : this.filter) {
+      if (sb.length() > 0) {
+        sb.append(",");
       }
+
+      sb.append(oid);
     }
 
-    return fullFilter;
+    return sb.toString();
   }
 
-  public boolean getIncludeAcls() {
+  public boolean isIncludeAcls() {
     return includeAcls;
   }
 
@@ -109,7 +155,7 @@
     this.includeAcls = include;
   }
 
-  public boolean getIncludeAllowableActions() {
+  public boolean isIncludeAllowableActions() {
     return this.includeAllowableActions;
   }
 
@@ -117,7 +163,7 @@
     this.includeAllowableActions = include;
   }
 
-  public boolean getIncludePolicies() {
+  public boolean isIncludePolicies() {
     return this.includePolicies;
   }
 
@@ -133,15 +179,57 @@
     this.includeRelationships = include;
   }
 
-  public String getRenditionFilter() {
-    return this.renditionFilter;
+  public Set<String> getRenditionFilter() {
+    return Collections.unmodifiableSet(this.renditionFilter);
   }
 
-  public void setRenditionFilter(String filter) {
-    this.renditionFilter = filter;
+  public void setRenditionFilter(Set<String> renditionFilter) {
+    TreeSet<String> tempSet = new TreeSet<String>();
+
+    if (renditionFilter != null) {
+      for (String rf : renditionFilter) {
+        if (rf == null) {
+          continue;
+        }
+
+        String trf = rf.trim();
+        if (trf.length() == 0) {
+          continue;
+        }
+
+        tempSet.add(trf);
+      }
+
+      if (tempSet.size() == 0) {
+        tempSet.add("cmis:none");
+      }
+    }
+    else {
+      tempSet.add("cmis:none");
+    }
+
+    this.renditionFilter = tempSet;
+  }
+
+  public String getRenditionFilterString() {
+    if (this.renditionFilter == null) {
+      return null;
+    }
+
+    StringBuilder sb = new StringBuilder();
+
+    for (String rf : this.renditionFilter) {
+      if (sb.length() > 0) {
+        sb.append(",");
+      }
+
+      sb.append(rf);
+    }
+
+    return sb.toString();
   }
 
-  public boolean getIncludePathSegments() {
+  public boolean isIncludePathSegments() {
     return includePathSegments;
   }
 
@@ -157,4 +245,16 @@
     this.orderBy = orderBy;
   }
 
+  public boolean isCacheEnabled() {
+    return cacheEnabled;
+  }
+
+  public void setCacheEnabled(boolean cacheEnabled) {
+    this.cacheEnabled = cacheEnabled;
+  }
+
+  public String getCacheKey() {
+    // TODO Auto-generated method stub
+    return null;
+  }
 }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentDocumentImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentDocumentImpl.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentDocumentImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentDocumentImpl.java
Mon Mar  8 18:16:17 2010
@@ -138,7 +138,7 @@
     String objectId = getObjectId();
 
     List<ObjectData> versions = getProvider().getVersioningService().getAllVersions(
-        getRepositoryId(), objectId, context.getFullFilter(), context.getIncludeAllowableActions(),
+        getRepositoryId(), objectId, context.getFilterString(), context.isIncludeAllowableActions(),
         null);
 
     ObjectFactory objectFactory = getSession().getObjectFactory();

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java
Mon Mar  8 18:16:17 2010
@@ -169,8 +169,8 @@
 
         // get checked out documents for this folder
         ObjectList checkedOutDocs = nagivationService.getCheckedOutDocs(getRepositoryId(),
-            objectId, ctxt.getFullFilter(), ctxt.getOrderBy(), ctxt.getIncludeAllowableActions(),
-            ctxt.getIncludeRelationships(), ctxt.getRenditionFilter(), BigInteger
+            objectId, ctxt.getFilterString(), ctxt.getOrderBy(), ctxt.isIncludeAllowableActions(),
+            ctxt.getIncludeRelationships(), ctxt.getRenditionFilterString(), BigInteger
                 .valueOf(getMaxItemsPerPage()), BigInteger.valueOf(skipCount), null);
 
         // convert objects
@@ -231,9 +231,9 @@
 
         // get the children
         ObjectInFolderList children = navigationService.getChildren(getRepositoryId(), objectId,
-            ctxt.getFullFilter(), ctxt.getOrderBy(), ctxt.getIncludeAllowableActions(), ctxt
-                .getIncludeRelationships(), ctxt.getRenditionFilter(), ctxt
-                .getIncludePathSegments(), BigInteger.valueOf(getMaxItemsPerPage()), BigInteger
+            ctxt.getFilterString(), ctxt.getOrderBy(), ctxt.isIncludeAllowableActions(),
ctxt
+                .getIncludeRelationships(), ctxt.getRenditionFilterString(), ctxt
+                .isIncludePathSegments(), BigInteger.valueOf(getMaxItemsPerPage()), BigInteger
                 .valueOf(skipCount), null);
 
         // convert objects
@@ -275,9 +275,9 @@
     // get the descendants
     List<ObjectInFolderContainer> providerContainerList = getProvider().getNavigationService()
         .getDescendants(getRepositoryId(), objectId, BigInteger.valueOf(depth),
-            context.getFullFilter(), context.getIncludeAllowableActions(),
-            context.getIncludeRelationships(), context.getRenditionFilter(),
-            context.getIncludePathSegments(), null);
+            context.getFilterString(), context.isIncludeAllowableActions(),
+            context.getIncludeRelationships(), context.getRenditionFilterString(),
+            context.isIncludePathSegments(), null);
 
     return convertProviderContainer(providerContainerList);
   }
@@ -297,9 +297,9 @@
     // get the folder tree
     List<ObjectInFolderContainer> providerContainerList = getProvider().getNavigationService()
         .getFolderTree(getRepositoryId(), objectId, BigInteger.valueOf(depth),
-            context.getFullFilter(), context.getIncludeAllowableActions(),
-            context.getIncludeRelationships(), context.getRenditionFilter(),
-            context.getIncludePathSegments(), null);
+            context.getFilterString(), context.isIncludeAllowableActions(),
+            context.getIncludeRelationships(), context.getRenditionFilterString(),
+            context.isIncludePathSegments(), null);
 
     return convertProviderContainer(providerContainerList);
   }
@@ -342,9 +342,25 @@
   /*
    * (non-Javadoc)
    * 
+   * @see org.apache.opencmis.client.api.Folder#isRootFolder()
+   */
+  public boolean isRootFolder() {
+    String objectId = getObjectId();
+    String rootFolderId = getSession().getRepositoryInfo().getRootFolderId();
+
+    return objectId.equals(rootFolderId);
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
    * @see org.apache.opencmis.client.api.Folder#getFolderParent()
    */
   public Folder getFolderParent() {
+    if (isRootFolder()) {
+      return null;
+    }
+
     List<Folder> parents = getParents();
 
     if ((parents == null) || (parents.isEmpty())) {
@@ -360,6 +376,10 @@
    * @see org.apache.opencmis.client.api.Folder#getPath()
    */
   public String getPath() {
+    if (isRootFolder()) {
+      return "/";
+    }
+
     List<String> paths = getPaths();
     if ((paths == null) || (paths.isEmpty())) {
       return null;

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java
Mon Mar  8 18:16:17 2010
@@ -24,6 +24,7 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 import java.util.UUID;
 
 import org.apache.commons.logging.Log;
@@ -74,7 +75,7 @@
 public class PersistentSessionImpl implements PersistentSession, Testable, Serializable {
 
   private static final OperationContext DEFAULT_CONTEXT = new OperationContextImpl(null,
false,
-      true, false, IncludeRelationships.NONE, null, true, null);
+      true, false, IncludeRelationships.NONE, null, true, null, true);
 
   private static Log log = LogFactory.getLog(PersistentSessionImpl.class);
 
@@ -248,8 +249,8 @@
 
         // get all checked out documents
         ObjectList checkedOutDocs = nagivationService.getCheckedOutDocs(getRepositoryId(),
null,
-            ctxt.getFullFilter(), ctxt.getOrderBy(), ctxt.getIncludeAllowableActions(), ctxt
-                .getIncludeRelationships(), ctxt.getRenditionFilter(), BigInteger
+            ctxt.getFilterString(), ctxt.getOrderBy(), ctxt.isIncludeAllowableActions(),
ctxt
+                .getIncludeRelationships(), ctxt.getRenditionFilterString(), BigInteger
                 .valueOf(getMaxItemsPerPage()), BigInteger.valueOf(skipCount), null);
 
         // convert objects
@@ -307,16 +308,16 @@
   /*
    * (non-Javadoc)
    * 
-   * @see org.apache.opencmis.client.api.Session#createOperationContext(java.lang.String,
boolean,
-   * boolean, boolean, org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
-   * boolean, java.lang.String)
+   * @see org.apache.opencmis.client.api.Session#createOperationContext(java.util.Set, boolean,
+   * boolean, boolean, org.apache.opencmis.commons.enums.IncludeRelationships, java.util.Set,
+   * boolean, java.lang.String, boolean)
    */
-  public OperationContext createOperationContext(String filter, boolean includeAcls,
+  public OperationContext createOperationContext(Set<String> filter, boolean includeAcls,
       boolean includeAllowableActions, boolean includePolicies,
-      IncludeRelationships includeRelationships, String renditionFilter,
-      boolean includePathSegments, String orderBy) {
+      IncludeRelationships includeRelationships, Set<String> renditionFilter,
+      boolean includePathSegments, String orderBy, boolean cacheEnabled) {
     return new OperationContextImpl(filter, includeAcls, includeAllowableActions, includePolicies,
-        includeRelationships, renditionFilter, includePathSegments, orderBy);
+        includeRelationships, renditionFilter, includePathSegments, orderBy, cacheEnabled);
   }
 
   public Locale getLocale() {
@@ -344,9 +345,9 @@
     }
 
     ObjectData objectData = this.provider.getObjectService().getObject(getRepositoryId(),
objectId,
-        context.getFullFilter(), context.getIncludeAllowableActions(),
-        context.getIncludeRelationships(), context.getRenditionFilter(),
-        context.getIncludePolicies(), context.getIncludeAcls(), null);
+        context.getFilterString(), context.isIncludeAllowableActions(),
+        context.getIncludeRelationships(), context.getRenditionFilterString(),
+        context.isIncludePolicies(), context.isIncludeAcls(), null);
 
     return getObjectFactory().convertObject(objectData);
   }
@@ -372,9 +373,9 @@
     }
 
     ObjectData objectData = this.provider.getObjectService().getObjectByPath(getRepositoryId(),
-        path, context.getFullFilter(), context.getIncludeAllowableActions(),
-        context.getIncludeRelationships(), context.getRenditionFilter(),
-        context.getIncludePolicies(), context.getIncludeAcls(), null);
+        path, context.getFilterString(), context.isIncludeAllowableActions(),
+        context.getIncludeRelationships(), context.getRenditionFilterString(),
+        context.isIncludePolicies(), context.isIncludeAcls(), null);
 
     return getObjectFactory().convertObject(objectData);
   }
@@ -546,8 +547,8 @@
 
         // fetch the data
         ObjectList resultList = discoveryService.query(getRepositoryId(), statement,
-            searchAllVersions, ctxt.getIncludeAllowableActions(), ctxt.getIncludeRelationships(),
-            ctxt.getRenditionFilter(), BigInteger.valueOf(getMaxItemsPerPage()), BigInteger
+            searchAllVersions, ctxt.isIncludeAllowableActions(), ctxt.getIncludeRelationships(),
+            ctxt.getRenditionFilterString(), BigInteger.valueOf(getMaxItemsPerPage()), BigInteger
                 .valueOf(skipCount), null);
 
         // convert type definitions
@@ -628,8 +629,8 @@
     Property<String> nameProperty = this.getPropertyFactory().createProperty(namePropertyType,
         UUID.randomUUID().toString());
     properties.add(nameProperty);
-    Property<String> typeProperty = this.getPropertyFactory().createProperty(objectTypeIdPropertyType,
-        folderTypeId);
+    Property<String> typeProperty = this.getPropertyFactory().createProperty(
+        objectTypeIdPropertyType, folderTypeId);
     properties.add(typeProperty);
 
     this.testRootFolder = rootFolder.createFolder(properties, null, null, null);

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/main/java/org/apache/opencmis/client/provider/spi/atompub/NavigationServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/main/java/org/apache/opencmis/client/provider/spi/atompub/NavigationServiceImpl.java?rev=920429&r1=920428&r2=920429&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/main/java/org/apache/opencmis/client/provider/spi/atompub/NavigationServiceImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-provider-impl/src/main/java/org/apache/opencmis/client/provider/spi/atompub/NavigationServiceImpl.java
Mon Mar  8 18:16:17 2010
@@ -301,7 +301,7 @@
     String link = loadLink(repositoryId, objectId, Constants.REL_UP, Constants.MEDIATYPE_FEED);
 
     if (link == null) {
-      throw new CmisObjectNotFoundException("Unknown repository or folder!");
+      throw new CmisObjectNotFoundException("Unknown repository or folder or object has no
parents!");
     }
 
     UrlBuilder url = new UrlBuilder(link);



Mime
View raw message