From 0345c11341a245e529a90c2d586d5a17c1f717dd Mon Sep 17 00:00:00 2001 From: bdwiwedi Date: Thu, 5 Jan 2023 18:05:16 +0530 Subject: [PATCH] APPS-1833 Patch for updating missing disposition properties in moved folder --- .../patch/rm-patch-v35-context.xml | 7 +++ .../org_alfresco_module_rm/version.properties | 2 +- ...RMv35UpdateDispositionPropertiesPatch.java | 59 +++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/patch/v35/RMv35UpdateDispositionPropertiesPatch.java diff --git a/amps/ags/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v35-context.xml b/amps/ags/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v35-context.xml index c29851a583..92cf47c596 100644 --- a/amps/ags/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v35-context.xml +++ b/amps/ags/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/patch/rm-patch-v35-context.xml @@ -19,4 +19,11 @@ + + + + diff --git a/amps/ags/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/version.properties b/amps/ags/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/version.properties index a8d3e2c6b3..83e3f50ac2 100644 --- a/amps/ags/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/version.properties +++ b/amps/ags/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/version.properties @@ -1,3 +1,3 @@ # RM Schema number -version.rm.schema=3500 +version.rm.schema=3501 diff --git a/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/patch/v35/RMv35UpdateDispositionPropertiesPatch.java b/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/patch/v35/RMv35UpdateDispositionPropertiesPatch.java new file mode 100644 index 0000000000..83a46e10dd --- /dev/null +++ b/amps/ags/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/patch/v35/RMv35UpdateDispositionPropertiesPatch.java @@ -0,0 +1,59 @@ +/* + * #%L + * Alfresco Records Management Module + * %% + * Copyright (C) 2005 - 2023 Alfresco Software Limited + * %% + * This file is part of the Alfresco software. + * - + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * - + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * - + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * - + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + * #L% + */ +package org.alfresco.module.org_alfresco_module_rm.patch.v35; + +import org.alfresco.module.org_alfresco_module_rm.patch.AbstractModulePatch; + +/** + * Patch to update disposition properties in all those folders which are moved from one category to another category + * and missing disposition properties + * + * @author Ross Gale + * @since 3.2 + */ +public class RMv35UpdateDispositionPropertiesPatch extends AbstractModulePatch +{ + /** The batch size for processing frozen nodes. */ + private int batchSize = 1000; + + /** + * Setter for maximum batch size + * + * @param batchSize + * The max amount of associations to be created between the frozen nodes and the hold in a transaction + */ + public void setBatchSize(int batchSize) + { + this.batchSize = batchSize; + } + + @Override + public void applyInternal() + { + + } +}