From 9a8de7518b88f591b4948564b7e17aaae0e1570f Mon Sep 17 00:00:00 2001 From: Martin Muller Date: Mon, 27 Feb 2017 17:08:26 +0000 Subject: [PATCH] MNT-16236 changed the property to opencmis.maxContentSizeMB / opencmis.memoryThresholdKB and adjusted the test. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@135462 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/repository.properties | 6 ++---- .../opencmis/AlfrescoCmisServiceFactory.java | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/config/alfresco/repository.properties b/config/alfresco/repository.properties index 0e68e574b1..4c1a82b945 100644 --- a/config/alfresco/repository.properties +++ b/config/alfresco/repository.properties @@ -702,10 +702,8 @@ opencmis.activities.enabled=true opencmis.bulkUpdateProperties.maxItemsSize=1000 opencmis.bulkUpdateProperties.batchSize=20 opencmis.bulkUpdateProperties.workerThreads=2 -# max content size of a file in byte -opencmis.maxContentSize=4294967296 -# memory threshold in byte -opencmis.memoryThreshold=4194304 +opencmis.maxContentSizeMB=4096 +opencmis.memoryThresholdKB=4096 # URL generation overrides diff --git a/source/java/org/alfresco/opencmis/AlfrescoCmisServiceFactory.java b/source/java/org/alfresco/opencmis/AlfrescoCmisServiceFactory.java index a88ce2dfe4..53f6bb83ec 100644 --- a/source/java/org/alfresco/opencmis/AlfrescoCmisServiceFactory.java +++ b/source/java/org/alfresco/opencmis/AlfrescoCmisServiceFactory.java @@ -57,14 +57,22 @@ public class AlfrescoCmisServiceFactory extends AbstractServiceFactory private AlfrescoCmisStreamInterceptor cmisStreams; private AuthorityService authorityService; - public void setMemoryThreshold(int memoryThreshold) + /** + * + * @param memoryThreshold in KB + */ + public void setMemoryThreshold(double memoryThreshold) { - this.memoryThreshold = memoryThreshold; + this.memoryThreshold = ((int) memoryThreshold) * 1024; } - public void setMaxContentSize(long maxContentSize) + /** + * + * @param maxContentSize in MB + */ + public void setMaxContentSize(double maxContentSize) { - this.maxContentSize = maxContentSize; + this.maxContentSize = ((long) maxContentSize) * 1024 * 1024; } @Override