From b7f2afb0dea9f41ed8064b2b85ca35a9edc1b595 Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Thu, 16 Aug 2018 19:11:57 +0300 Subject: [PATCH 1/8] remove custom record search converter --- .../RecordsManagementSearchParameters.java | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/search/RecordsManagementSearchParameters.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/search/RecordsManagementSearchParameters.java index bd897c9d9a..fcd2cbf173 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/search/RecordsManagementSearchParameters.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/search/RecordsManagementSearchParameters.java @@ -36,10 +36,6 @@ import java.util.Map; import org.alfresco.api.AlfrescoPublicApi; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.model.ContentModel; -import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter; -import org.alfresco.service.cmr.repository.datatype.TypeConversionException; -import org.alfresco.service.cmr.repository.datatype.TypeConverter; -import org.alfresco.service.cmr.search.SearchParameters; import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.QName; import org.json.JSONArray; @@ -381,20 +377,5 @@ public class RecordsManagementSearchParameters { return includedContainerTypes; } - - // This code needs to be removed once MNT-14795 (Search does not work when RM is installed) has been fixed. - static - { - DefaultTypeConverter.INSTANCE.addConverter( - SearchParameters.class, - String.class, - new TypeConverter.Converter() - { - public String convert(SearchParameters source) - { - throw new TypeConversionException("Dummy converter! Should throw a TypeConversionException"); - } - } - ); - } + } From 2a330bdf68e3ff653193f2566e1dc14c5bb4008f Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Thu, 14 Jun 2018 08:27:55 +0300 Subject: [PATCH 2/8] rename the extended bean simpleMappingExceptionResolverParent (core change) (cherry picked from commit 1dd650d5eb93258044daaa699c18036661bf6818) --- .../module/org_alfresco_module_rm/rm-public-rest-context.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml index 8d16ade1a0..1dee4ef341 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-public-rest-context.xml @@ -202,7 +202,7 @@ - + @@ -212,7 +212,7 @@ - + \ No newline at end of file From 81e81451fea92bf09ab9145edd493a9c1469047b Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Mon, 20 Aug 2018 12:20:30 +0300 Subject: [PATCH 3/8] update the community version dependencies to 5.2.4 as the changes for renaming the bean simpleMappingExceptionResolver into simpleMappingExceptionResolverParent is not in any 5.2 community version --- rm-community/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rm-community/pom.xml b/rm-community/pom.xml index 42d661a990..0b40f8c997 100644 --- a/rm-community/pom.xml +++ b/rm-community/pom.xml @@ -43,7 +43,7 @@ - 5.2.g - 5.2.f + 5.2.4 + 5.2.4 From df280e176d4a685cef05ff069ca6a772a02cd0b7 Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Mon, 20 Aug 2018 12:21:44 +0300 Subject: [PATCH 4/8] update the ElementInfo() according to REPO-2983 --- .../rm/rest/api/impl/FilePlanComponentsApiUtils.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/FilePlanComponentsApiUtils.java b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/FilePlanComponentsApiUtils.java index b423c709b0..7f5acbac6d 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/FilePlanComponentsApiUtils.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/rm/rest/api/impl/FilePlanComponentsApiUtils.java @@ -38,12 +38,14 @@ import java.io.Serializable; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; +import net.sf.acegisecurity.vote.AccessDecisionVoter; import org.alfresco.model.ContentModel; import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; @@ -109,8 +111,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.social.InternalServerErrorException; -import net.sf.acegisecurity.vote.AccessDecisionVoter; - /** * Utility class that handles common api endpoint tasks * @@ -914,7 +914,11 @@ public class FilePlanComponentsApiUtils if (permissionService.hasPermission(childNodeRef, PermissionService.READ) == AccessStatus.ALLOWED) { Serializable nameProp = nodeService.getProperty(childNodeRef, ContentModel.PROP_NAME); - pathElements.add(0, new ElementInfo(childNodeRef.getId(), nameProp.toString())); + String type = nodeService.getType(childNodeRef).toPrefixString(); + Set aspects = nodeService.getAspects(childNodeRef); + List aspectNames = nodes.mapFromNodeAspects(aspects, Collections.emptyList(), Collections.emptyList()); + pathElements.add(0, new ElementInfo(childNodeRef.getId(), nameProp.toString(), type, aspectNames)); + } else { From f269e7a20987e35d5ce0b9c57356d5e7a3da0599 Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Mon, 20 Aug 2018 12:22:42 +0300 Subject: [PATCH 5/8] update the alfresco api explorer to the latest version of 5.2.N --- rm-community/rm-community-rest-api-explorer/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rm-community/rm-community-rest-api-explorer/pom.xml b/rm-community/rm-community-rest-api-explorer/pom.xml index d825cfe71f..4752dc043e 100644 --- a/rm-community/rm-community-rest-api-explorer/pom.xml +++ b/rm-community/rm-community-rest-api-explorer/pom.xml @@ -11,7 +11,7 @@ - 5.2.0.1 + 5.2.2 1.8 1.8 UTF-8 From e7aca2a772b8b7ab7c81bf27947bec52ac922012 Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Tue, 21 Aug 2018 09:43:15 +0300 Subject: [PATCH 6/8] change the amps copied when using the apply-rm-community profile as no ACS 5.2.N community version is compatible with the RM 2.6.1 community --- rm-automation/pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index b9793b8d93..7001be3277 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -145,6 +145,7 @@ + + + org.alfresco + alfresco-rm-enterprise-share + ${project.version} + amp + + + org.alfresco + alfresco-rm-enterprise-repo + ${project.version} + amp + ${project.build.directory}/amps true From 75e3f55c3ef2c6e30d226dd0e836a8251486e999 Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Tue, 21 Aug 2018 10:23:12 +0300 Subject: [PATCH 7/8] change the amps name installed for the apply-rm-community profile as there is no compatible version of ACS 5.2.N community with RM 2.6.1 community --- rm-automation/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index 7001be3277..977e677828 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -192,7 +192,7 @@ true - ${project.build.directory}/amps/alfresco-rm-community-repo-${project.version}.amp + ${project.build.directory}/amps/alfresco-rm-enterprise-repo-${project.version}.amp ${project.build.directory}/alf-installation/tomcat/webapps/alfresco.war @@ -207,7 +207,7 @@ true - ${project.build.directory}/amps/alfresco-rm-community-share-${project.version}.amp + ${project.build.directory}/amps/alfresco-rm-enterprise-share-${project.version}.amp ${project.build.directory}/alf-installation/tomcat/webapps/share.war From 0fa2d7d4201a47e0c0ea18145b7c3d93f2f9b04c Mon Sep 17 00:00:00 2001 From: cagache Date: Tue, 21 Aug 2018 14:23:38 +0300 Subject: [PATCH 8/8] added aspectNames and nodeType properties --- .../rest/rm/community/model/common/IdNamePair.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/common/IdNamePair.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/common/IdNamePair.java index 6110395dc3..c8f1bdedda 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/common/IdNamePair.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/model/common/IdNamePair.java @@ -26,6 +26,8 @@ */ package org.alfresco.rest.rm.community.model.common; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; @@ -50,4 +52,10 @@ public class IdNamePair @JsonProperty (required = true) private String name; + + @JsonProperty (required = true) + private List aspectNames; + + @JsonProperty (required = true) + private String nodeType; }