mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-3114 - review comments
This commit is contained in:
@@ -247,8 +247,8 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that this application content listener must be executed with the highest
|
||||
* precedence.
|
||||
* Indicate that this application content listener must be executed with the lowest
|
||||
* precedence. (ie last)
|
||||
*
|
||||
* @see Ordered#getOrder()
|
||||
*/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2016 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -32,6 +32,7 @@ import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
|
||||
*/
|
||||
public class RM3314Test extends BaseRMTestCase
|
||||
{
|
||||
/** registry to record callback from test beans "test.rm3114.1" and "test.rm3114.2" */
|
||||
public static Map<String, Boolean> callback = new HashMap<String, Boolean>(2);
|
||||
|
||||
/**
|
||||
@@ -45,6 +46,14 @@ public class RM3314Test extends BaseRMTestCase
|
||||
*/
|
||||
public void testListenersExecutedInTheCorrectOrder()
|
||||
{
|
||||
/**
|
||||
* The related test beans will call back into the callback map showing
|
||||
* whether at the end of their execution whether the custom model has been
|
||||
* initialised or not. Given the order in which these test beans are executed
|
||||
* on spring context load, we would expect that .1 executes with the custom
|
||||
* map unloaded, and the .2 with it loaded.
|
||||
*/
|
||||
|
||||
assertFalse(callback.isEmpty());
|
||||
assertFalse(callback.get("test.rm3314.1"));
|
||||
assertTrue(callback.get("test.rm3314.2"));
|
||||
|
@@ -242,6 +242,8 @@
|
||||
|
||||
<!-- Test listeners -->
|
||||
|
||||
<!-- Executed with '0' order. This is default order and as such the application event will be executed relative to the other
|
||||
beans in the order in which they appear in the spring context -->
|
||||
<bean id="test.rm3314.1" class="org.alfresco.module.org_alfresco_module_rm.test.integration.issue.rm3314.RM3314TestListener">
|
||||
<property name="order" value="0"/>
|
||||
<property name="recordsManagementAdminService" ref="recordsManagementAdminService"/>
|
||||
@@ -250,6 +252,8 @@
|
||||
<property name="repository" ref="repositoryHelper" />
|
||||
</bean>
|
||||
|
||||
<!-- The default order has this bean executing its application event with the lowest precendence, ie after all the other
|
||||
beans set to '0' precendence by default -->
|
||||
<bean id="test.rm3314.2" class="org.alfresco.module.org_alfresco_module_rm.test.integration.issue.rm3314.RM3314TestListener">
|
||||
<property name="recordsManagementAdminService" ref="recordsManagementAdminService"/>
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
|
Reference in New Issue
Block a user