mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
OpenCMIS server: performance improvments
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29257 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2702,7 +2702,7 @@ public class AlfrescoCmisService extends AbstractCmisService
|
|||||||
|
|
||||||
private void checkRepositoryId(String repositoryId)
|
private void checkRepositoryId(String repositoryId)
|
||||||
{
|
{
|
||||||
if (!connector.getRepositoryInfo().getId().equals(repositoryId))
|
if (!connector.getRepositoryId().equals(repositoryId))
|
||||||
{
|
{
|
||||||
throw new CmisObjectNotFoundException("Unknown repository '" + repositoryId + "'!");
|
throw new CmisObjectNotFoundException("Unknown repository '" + repositoryId + "'!");
|
||||||
}
|
}
|
||||||
|
@@ -1872,7 +1872,7 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
|||||||
// relationships from and to versions are not preserved
|
// relationships from and to versions are not preserved
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get relationships
|
// get relationships
|
||||||
List<AssociationRef> assocs = new ArrayList<AssociationRef>();
|
List<AssociationRef> assocs = new ArrayList<AssociationRef>();
|
||||||
if (relationshipDirection == RelationshipDirection.SOURCE
|
if (relationshipDirection == RelationshipDirection.SOURCE
|
||||||
@@ -2876,6 +2876,14 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
|||||||
return createRepositoryInfo();
|
return createRepositoryInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the repository id.
|
||||||
|
*/
|
||||||
|
public String getRepositoryId()
|
||||||
|
{
|
||||||
|
return descriptorService.getCurrentRepositoryDescriptor().getId();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the repository info object.
|
* Creates the repository info object.
|
||||||
*/
|
*/
|
||||||
@@ -2884,14 +2892,19 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
|||||||
Descriptor currentDescriptor = descriptorService.getCurrentRepositoryDescriptor();
|
Descriptor currentDescriptor = descriptorService.getCurrentRepositoryDescriptor();
|
||||||
|
|
||||||
// get change token
|
// get change token
|
||||||
|
boolean auditEnabled = auditService.isAuditEnabled(CMIS_CHANGELOG_AUDIT_APPLICATION, "/"
|
||||||
|
+ CMIS_CHANGELOG_AUDIT_APPLICATION);
|
||||||
String latestChangeLogToken = null;
|
String latestChangeLogToken = null;
|
||||||
|
|
||||||
EntryIdCallback auditQueryCallback = new EntryIdCallback(false);
|
if (auditEnabled)
|
||||||
AuditQueryParameters params = new AuditQueryParameters();
|
{
|
||||||
params.setApplicationName(CMIS_CHANGELOG_AUDIT_APPLICATION);
|
EntryIdCallback auditQueryCallback = new EntryIdCallback(false);
|
||||||
params.setForward(false);
|
AuditQueryParameters params = new AuditQueryParameters();
|
||||||
auditService.auditQuery(auditQueryCallback, params, 1);
|
params.setApplicationName(CMIS_CHANGELOG_AUDIT_APPLICATION);
|
||||||
latestChangeLogToken = auditQueryCallback.getEntryId();
|
params.setForward(false);
|
||||||
|
auditService.auditQuery(auditQueryCallback, params, 1);
|
||||||
|
latestChangeLogToken = auditQueryCallback.getEntryId();
|
||||||
|
}
|
||||||
|
|
||||||
if (repositoryPermissions == null)
|
if (repositoryPermissions == null)
|
||||||
{
|
{
|
||||||
@@ -2926,8 +2939,7 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
|||||||
|
|
||||||
repCap.setAllVersionsSearchable(false);
|
repCap.setAllVersionsSearchable(false);
|
||||||
repCap.setCapabilityAcl(CapabilityAcl.MANAGE);
|
repCap.setCapabilityAcl(CapabilityAcl.MANAGE);
|
||||||
repCap.setCapabilityChanges(auditService.isAuditEnabled(CMIS_CHANGELOG_AUDIT_APPLICATION, "/"
|
repCap.setCapabilityChanges(auditEnabled ? CapabilityChanges.OBJECTIDSONLY : CapabilityChanges.NONE);
|
||||||
+ CMIS_CHANGELOG_AUDIT_APPLICATION) ? CapabilityChanges.OBJECTIDSONLY : CapabilityChanges.NONE);
|
|
||||||
repCap.setCapabilityContentStreamUpdates(CapabilityContentStreamUpdates.ANYTIME);
|
repCap.setCapabilityContentStreamUpdates(CapabilityContentStreamUpdates.ANYTIME);
|
||||||
repCap.setCapabilityJoin(CapabilityJoin.NONE);
|
repCap.setCapabilityJoin(CapabilityJoin.NONE);
|
||||||
repCap.setCapabilityQuery(CapabilityQuery.BOTHCOMBINED);
|
repCap.setCapabilityQuery(CapabilityQuery.BOTHCOMBINED);
|
||||||
|
Reference in New Issue
Block a user