From 3ccf71dc7b0e941687852b341c593e6947196acf Mon Sep 17 00:00:00 2001 From: Erik Winlof Date: Wed, 3 Sep 2014 12:32:55 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud) 78551: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 77501: Merged DEV to V4.2-BUG-FIX (4.2.4) 76291 : MNT-11511 : All tags are not displayed in repository when the number of nodes taggable is over 1000 - Using tagscope api at search for tags quantity in repository git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82595 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/bootstrap/spaces.xml | 3 ++ .../messages/patch-service.properties | 5 ++- .../alfresco/patch/patch-services-context.xml | 27 +++++++++++ .../admin/patch/impl/AddTagScopeAspect.java | 45 +++++++++++++++++++ 4 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 source/java/org/alfresco/repo/admin/patch/impl/AddTagScopeAspect.java diff --git a/config/alfresco/bootstrap/spaces.xml b/config/alfresco/bootstrap/spaces.xml index ed90644478..77c6bb8d08 100644 --- a/config/alfresco/bootstrap/spaces.xml +++ b/config/alfresco/bootstrap/spaces.xml @@ -17,6 +17,9 @@ space-icon-default ${spaces.company_home.name} ${spaces.company_home.description} + + + diff --git a/config/alfresco/messages/patch-service.properties b/config/alfresco/messages/patch-service.properties index f412fafc56..b9acfe9751 100644 --- a/config/alfresco/messages/patch-service.properties +++ b/config/alfresco/messages/patch-service.properties @@ -456,4 +456,7 @@ patch.genericBootstrap.result.deferred=The patch has been deferred patch.asynchrounse.checking=Checking for the asynchronous patch ... patch.renameSiteAuthorityDisplayName.description=Update authority display name for sites -patch.renameSiteAuthorityDisplayName.result=Updating of display names was completed \ No newline at end of file +patch.renameSiteAuthorityDisplayName.result=Updating of display names was completed + +patch.addTagScopeAspect.description=Add tagscode aspect to the Company Home folder +patch.addTagScopeAspect.result=tagscope aspect added to the Company Home folder successfully \ No newline at end of file diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml index 71782e7793..083ee2997f 100644 --- a/config/alfresco/patch/patch-services-context.xml +++ b/config/alfresco/patch/patch-services-context.xml @@ -3205,6 +3205,32 @@ + + + patch.addTagScopeAspect + + + patch.addTagScopeAspect.description + + + 0 + + + 6065 + + + 6066 + + + + + + + + + patch.siteAdministrators patch.siteAdministrators.description @@ -3295,6 +3321,7 @@ ${system.patch.surfConfigFolder.deferred} + diff --git a/source/java/org/alfresco/repo/admin/patch/impl/AddTagScopeAspect.java b/source/java/org/alfresco/repo/admin/patch/impl/AddTagScopeAspect.java new file mode 100644 index 0000000000..5ad83de9ff --- /dev/null +++ b/source/java/org/alfresco/repo/admin/patch/impl/AddTagScopeAspect.java @@ -0,0 +1,45 @@ +package org.alfresco.repo.admin.patch.impl; + +import org.alfresco.repo.admin.patch.AbstractPatch; +import org.alfresco.repo.model.Repository; +import org.alfresco.service.cmr.tagging.TaggingService; +import org.springframework.extensions.surf.util.I18NUtil; + +public class AddTagScopeAspect extends AbstractPatch +{ + /** The title we give to the batch process in progress messages / JMX. */ + private static final String SUCCESS_MSG = "patch.addTagScopeAspect.result"; + + /** Services */ + private TaggingService taggingService; + + /** Repository object */ + private Repository repository; + + + /** + * Sets the tagging service. + * + * @param taggingService + * the tagging service + */ + public void setTaggingService(TaggingService taggingService) + { + this.taggingService = taggingService; + } + + /** + * @param repository repository object + */ + public void setRepository(Repository repository) + { + this.repository = repository; + } + + @Override + protected String applyInternal() throws Exception + { + taggingService.addTagScope(repository.getCompanyHome()); + return I18NUtil.getMessage(SUCCESS_MSG); + } +} \ No newline at end of file