diff --git a/pom.xml b/pom.xml index a55c004395..b98b2ad3af 100644 --- a/pom.xml +++ b/pom.xml @@ -560,7 +560,7 @@ 2.9.9 2.9.9.3 - 0.25.0 + 0.31.0 1.10.19 42.2.6 5432 diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/hold-service.properties b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/hold-service.properties index 20aedc40af..d853522783 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/hold-service.properties +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/hold-service.properties @@ -1,6 +1,5 @@ rm.hold.not-hold={0} is not a hold. -rm.hold.add-to-hold-invalid-type={0} isn't a record, a record folder or active content. Only records, record \ - folders or active content can be added to a hold. +rm.hold.add-to-hold-invalid-type={0} isn't a record, a record folder or content. Only records, record folders or content can be added to a hold. rm.hold.add-to-hold-archived-node=Archived content can't be added to a hold. rm.hold.add-to-hold-locked-node=Locked content can't be added to a hold. rm.hold.delete-frozen-node=Frozen content can't be deleted. diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml index c2806a8516..a009fc60bc 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-webscript-context.xml @@ -630,7 +630,6 @@ - diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/hold/HoldServicePolicies.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/hold/HoldServicePolicies.java index f72f58389a..46fbc83151 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/hold/HoldServicePolicies.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/hold/HoldServicePolicies.java @@ -44,7 +44,7 @@ public interface HoldServicePolicies { interface BeforeCreateHoldPolicy extends ClassPolicy { - QName BEFORE_CREATE_HOLD = QName.createQName(NamespaceService.ALFRESCO_URI, "beforeCreateHold"); + public static final QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "beforeCreateHold"); /** * Called before a hold is created. * @@ -56,7 +56,7 @@ public interface HoldServicePolicies interface OnCreateHoldPolicy extends ClassPolicy { - QName ON_CREATE_HOLD = QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateHold"); + public static final QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateHold"); /** * Called when a hold is created. * @@ -67,9 +67,9 @@ public interface HoldServicePolicies interface BeforeDeleteHoldPolicy extends ClassPolicy { - QName BEFORE_DELETE_HOLD = QName.createQName(NamespaceService.ALFRESCO_URI, "beforeDeleteHold"); + public static final QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "beforeDeleteHold"); /** - * Called before a hold is created. + * Called before a hold is deleted. * * @param hold node reference */ @@ -78,7 +78,7 @@ public interface HoldServicePolicies interface OnDeleteHoldPolicy extends ClassPolicy { - QName ON_DELETE_HOLD = QName.createQName(NamespaceService.ALFRESCO_URI, "onDeleteHold"); + public static final QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "onDeleteHold"); /** * Called when a hold is deleted. @@ -95,7 +95,7 @@ public interface HoldServicePolicies /** * Called before adding content to hold. * - * @param hold the hold to be added into + * @param hold the hold to be added into * @param contentNodeRef the item to be added to hold */ void beforeAddToHold(NodeRef hold, NodeRef contentNodeRef); @@ -108,7 +108,7 @@ public interface HoldServicePolicies /** * Called when content is added to hold. * - * @param hold the hold to be added into + * @param hold the hold to be added into * @param contentNodeRef the item to be added to hold */ void onAddToHold(NodeRef hold, NodeRef contentNodeRef); @@ -121,7 +121,7 @@ public interface HoldServicePolicies /** * Called before removing content from hold. * - * @param hold the hold to be removed from + * @param hold the hold to be removed from * @param contentNodeRef the item to be removed from hold */ void beforeRemoveFromHold(NodeRef hold, NodeRef contentNodeRef); @@ -134,9 +134,10 @@ public interface HoldServicePolicies /** * Called when removing content from hold. * - * @param hold the hold to be removed from + * @param hold the hold to be removed from * @param contentNodeRef the item to be removed from hold */ void onRemoveFromHold(NodeRef hold, NodeRef contentNodeRef); } + } diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/hold/BaseHold.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/hold/BaseHold.java index d855cead9d..c6cbaa72f1 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/hold/BaseHold.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/script/hold/BaseHold.java @@ -35,7 +35,6 @@ import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.module.org_alfresco_module_rm.hold.HoldService; -import org.alfresco.module.org_alfresco_module_rm.record.RecordService; import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService; import org.alfresco.module.org_alfresco_module_rm.util.NodeTypeUtility; import org.alfresco.service.cmr.repository.NodeRef; @@ -61,9 +60,6 @@ public abstract class BaseHold extends DeclarativeWebScript /** Hold Service */ private HoldService holdService; - /** record service */ - private RecordService recordService; - /** record folder service */ private RecordFolderService recordFolderService; @@ -91,14 +87,6 @@ public abstract class BaseHold extends DeclarativeWebScript this.recordFolderService = recordFolderService; } - /** - * @param recordService record service - */ - public void setRecordService(RecordService recordService) - { - this.recordService = recordService; - } - /** * @param nodeService node service */ diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/CreateHoldTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/CreateHoldTest.java index e0821bbb40..5186d1a0eb 100644 --- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/CreateHoldTest.java +++ b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/CreateHoldTest.java @@ -155,11 +155,11 @@ public class CreateHoldTest extends BaseRMTestCase implements BeforeCreateHoldPo public void given() { - beforeCreateHoldBehaviour = policyComponent.bindClassBehaviour(HoldServicePolicies.BeforeCreateHoldPolicy.BEFORE_CREATE_HOLD, + beforeCreateHoldBehaviour = policyComponent.bindClassBehaviour(BeforeCreateHoldPolicy.QNAME, RecordsManagementModel.TYPE_HOLD_CONTAINER, new JavaBehaviour(CreateHoldTest.this, "beforeCreateHold", NotificationFrequency.EVERY_EVENT)); - onCreateHoldBehaviour = policyComponent.bindClassBehaviour(HoldServicePolicies.OnCreateHoldPolicy.ON_CREATE_HOLD, + onCreateHoldBehaviour = policyComponent.bindClassBehaviour(OnCreateHoldPolicy.QNAME, RecordsManagementModel.TYPE_HOLD, new JavaBehaviour(CreateHoldTest.this, "onCreateHold", NotificationFrequency.EVERY_EVENT)); diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/DeleteHoldTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/DeleteHoldTest.java index 7fc62fa4cb..fdf3c0367e 100644 --- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/DeleteHoldTest.java +++ b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/DeleteHoldTest.java @@ -257,11 +257,11 @@ public class DeleteHoldTest extends BaseRMTestCase implements BeforeDeleteHoldPo public void given() { - beforeDeleteHoldBehaviour = policyComponent.bindClassBehaviour(BeforeDeleteHoldPolicy.BEFORE_DELETE_HOLD, + beforeDeleteHoldBehaviour = policyComponent.bindClassBehaviour(BeforeDeleteHoldPolicy.QNAME, RecordsManagementModel.TYPE_HOLD, new JavaBehaviour(DeleteHoldTest.this, "beforeDeleteHold", NotificationFrequency.EVERY_EVENT)); - onDeleteHoldBehaviour = policyComponent.bindClassBehaviour(OnDeleteHoldPolicy.ON_DELETE_HOLD, RecordsManagementModel.TYPE_HOLD, + onDeleteHoldBehaviour = policyComponent.bindClassBehaviour(OnDeleteHoldPolicy.QNAME, RecordsManagementModel.TYPE_HOLD, new JavaBehaviour(DeleteHoldTest.this, "onDeleteHold", NotificationFrequency.EVERY_EVENT)); // Create a hold