[
https://issues.apache.org/jira/browse/CMIS-818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14068372#comment-14068372
]
Ron Gavlin edited comment on CMIS-818 at 7/21/14 10:06 AM:
-----------------------------------------------------------
Yes, this appears to be a effective, generalized means for addressing my
specific requirement as well as potentially many others. Thanks much!
FYI, it appears there is a typo in your patch. See the duplicate
stopAfterService(service) invocations in the getFolderTree() method of
NavigationService below.
https://github.com/apache/chemistry-opencmis/blob/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/NavigationService.java
{quote}
public List<CmisObjectInFolderContainerType> getFolderTree(String repositoryId,
String folderId, BigInteger depth,
String filter, Boolean includeAllowableActions,
EnumIncludeRelationships includeRelationships,
String renditionFilter, Boolean includePathSegment,
CmisExtensionType extension) throws CmisException {
CmisService service = null;
CmisVersion cmisVersion = null;
try {
service = getService(wsContext, repositoryId);
cmisVersion = getCmisVersion(wsContext);
List<CmisObjectInFolderContainerType> result = new
ArrayList<CmisObjectInFolderContainerType>();
if (stopBeforeService(service)) {
return null;
}
if (stopAfterService(service)) {
return null;
}
List<ObjectInFolderContainer> serviceResult =
service.getFolderTree(repositoryId, folderId, depth, filter,
includeAllowableActions,
convert(IncludeRelationships.class, includeRelationships),
renditionFilter, includePathSegment, convert(extension));
if (stopAfterService(service)) {
return null;
}
if (serviceResult != null) {
for (ObjectInFolderContainer container : serviceResult) {
result.add(convert(container, cmisVersion));
}
}
return result;
} catch (Exception e) {
throw convertException(e);
} finally {
closeService(service);
}
}
{quote}
Thanks again!
was (Author: rgavlin):
Yes, this appears to be a effective, generalized means for addressing my
specific requirement as well as potentially many others. Thanks much!
FYI, it appears there is a typo in your patch. See the duplicate
stopAfterService(service) invocations in the getFolderTree() method of
NavigationService below.
https://github.com/apache/chemistry-opencmis/blob/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/NavigationService.java
public List<CmisObjectInFolderContainerType> getFolderTree(String repositoryId,
String folderId, BigInteger depth,
String filter, Boolean includeAllowableActions,
EnumIncludeRelationships includeRelationships,
String renditionFilter, Boolean includePathSegment,
CmisExtensionType extension) throws CmisException {
CmisService service = null;
CmisVersion cmisVersion = null;
try {
service = getService(wsContext, repositoryId);
cmisVersion = getCmisVersion(wsContext);
List<CmisObjectInFolderContainerType> result = new
ArrayList<CmisObjectInFolderContainerType>();
if (stopBeforeService(service)) {
return null;
}
if (stopAfterService(service)) {
return null;
}
List<ObjectInFolderContainer> serviceResult =
service.getFolderTree(repositoryId, folderId, depth, filter,
includeAllowableActions,
convert(IncludeRelationships.class, includeRelationships),
renditionFilter, includePathSegment, convert(extension));
if (stopAfterService(service)) {
return null;
}
if (serviceResult != null) {
for (ObjectInFolderContainer container : serviceResult) {
result.add(convert(container, cmisVersion));
}
}
return result;
} catch (Exception e) {
throw convertException(e);
} finally {
closeService(service);
}
}
Thanks again!
> Navigation services should support Last-Modified/If-Modified-Since Headers
> --------------------------------------------------------------------------
>
> Key: CMIS-818
> URL: https://issues.apache.org/jira/browse/CMIS-818
> Project: Chemistry
> Issue Type: Improvement
> Components: opencmis-server
> Affects Versions: OpenCMIS 0.11.0
> Reporter: Ron Gavlin
> Assignee: Florian Müller
>
> AtomPub and Browser navigation services including getChildren, getFolderTree,
> getDescendants, and potentially the others should support
> Last-Modified/If-Modified-Since Headers.
> Some repositories have built-in caching mechanisms to track whether a folder
> tree has been modified. Since many of the Navigation services often require
> significant server-side resources, repositories with these built-in caching
> mechanisms should be able to leverage them with OpenCMIS. Currently, the
> OpenCMIS NavigationService does not provide hooks to implement such
> optimizations.
--
This message was sent by Atlassian JIRA
(v6.2#6252)