Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

77099: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      73031: ACE-956 - fixes to other unit tests affected by the change of interface.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@77950 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-23 15:13:26 +00:00
parent f989d6fa2d
commit 90712bd712
3 changed files with 14 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap; import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.i18n.MessageService; import org.alfresco.repo.i18n.MessageService;
import org.alfresco.repo.policy.PolicyComponent;
import org.alfresco.repo.tenant.TenantAdminService; import org.alfresco.repo.tenant.TenantAdminService;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.coci.CheckOutCheckInService; import org.alfresco.service.cmr.coci.CheckOutCheckInService;
@@ -350,6 +351,7 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
private NamespaceService namespaceService; private NamespaceService namespaceService;
private CheckOutCheckInService cociService; private CheckOutCheckInService cociService;
private DictionaryDAO dictionaryDAO; private DictionaryDAO dictionaryDAO;
private PolicyComponent policyComponent;
/** /**
* On setup in transaction override * On setup in transaction override
@@ -366,6 +368,7 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
this.cociService = (CheckOutCheckInService)this.applicationContext.getBean("checkOutCheckInService"); this.cociService = (CheckOutCheckInService)this.applicationContext.getBean("checkOutCheckInService");
this.dictionaryDAO = (DictionaryDAO)this.applicationContext.getBean("dictionaryDAO"); this.dictionaryDAO = (DictionaryDAO)this.applicationContext.getBean("dictionaryDAO");
this.nodeService = (NodeService)this.applicationContext.getBean("NodeService"); this.nodeService = (NodeService)this.applicationContext.getBean("NodeService");
this.policyComponent = (PolicyComponent)this.applicationContext.getBean("policyComponent");
TenantAdminService tenantAdminService = (TenantAdminService)this.applicationContext.getBean("tenantAdminService"); TenantAdminService tenantAdminService = (TenantAdminService)this.applicationContext.getBean("tenantAdminService");
MessageService messageService = (MessageService)this.applicationContext.getBean("messageService"); MessageService messageService = (MessageService)this.applicationContext.getBean("messageService");
@@ -383,6 +386,7 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
bootstrap.setNodeService(this.nodeService); bootstrap.setNodeService(this.nodeService);
bootstrap.setNamespaceService(this.namespaceService); bootstrap.setNamespaceService(this.namespaceService);
bootstrap.setMessageService(messageService); bootstrap.setMessageService(messageService);
bootstrap.setPolicyComponent(policyComponent);
RepositoryLocation location = new RepositoryLocation(); RepositoryLocation location = new RepositoryLocation();
location.setStoreProtocol(this.storeRef.getProtocol()); location.setStoreProtocol(this.storeRef.getProtocol());

View File

@@ -26,6 +26,7 @@ import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap; import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.i18n.MessageService; import org.alfresco.repo.i18n.MessageService;
import org.alfresco.repo.policy.BehaviourFilter; import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.repo.policy.PolicyComponent;
import org.alfresco.repo.tenant.TenantAdminService; import org.alfresco.repo.tenant.TenantAdminService;
import org.alfresco.service.cmr.dictionary.DictionaryException; import org.alfresco.service.cmr.dictionary.DictionaryException;
import org.alfresco.service.cmr.dictionary.ModelDefinition; import org.alfresco.service.cmr.dictionary.ModelDefinition;
@@ -96,6 +97,8 @@ public class DictionaryRepositoryBootstrapTest extends BaseAlfrescoSpringTest
/** The message service */ /** The message service */
private MessageService messageService; private MessageService messageService;
private PolicyComponent policyComponent;
/** /**
* @see org.springframework.test.AbstractTransactionalSpringContextTests#onSetUpInTransaction() * @see org.springframework.test.AbstractTransactionalSpringContextTests#onSetUpInTransaction()
*/ */
@@ -113,6 +116,8 @@ public class DictionaryRepositoryBootstrapTest extends BaseAlfrescoSpringTest
this.tenantAdminService = (TenantAdminService)this.applicationContext.getBean("tenantAdminService"); this.tenantAdminService = (TenantAdminService)this.applicationContext.getBean("tenantAdminService");
this.namespaceService = (NamespaceService)this.applicationContext.getBean("namespaceService"); this.namespaceService = (NamespaceService)this.applicationContext.getBean("namespaceService");
this.messageService = (MessageService)this.applicationContext.getBean("messageService"); this.messageService = (MessageService)this.applicationContext.getBean("messageService");
this.policyComponent = (PolicyComponent)this.applicationContext.getBean("policyComponent");
this.bootstrap = new DictionaryRepositoryBootstrap(); this.bootstrap = new DictionaryRepositoryBootstrap();
this.bootstrap.setContentService(this.contentService); this.bootstrap.setContentService(this.contentService);
@@ -122,6 +127,7 @@ public class DictionaryRepositoryBootstrapTest extends BaseAlfrescoSpringTest
this.bootstrap.setNodeService(this.nodeService); this.bootstrap.setNodeService(this.nodeService);
this.bootstrap.setNamespaceService(this.namespaceService); this.bootstrap.setNamespaceService(this.namespaceService);
this.bootstrap.setMessageService(this.messageService); this.bootstrap.setMessageService(this.messageService);
this.bootstrap.setPolicyComponent(this.policyComponent);
RepositoryLocation location = new RepositoryLocation(); RepositoryLocation location = new RepositoryLocation();
location.setStoreProtocol(this.storeRef.getProtocol()); location.setStoreProtocol(this.storeRef.getProtocol());

View File

@@ -37,6 +37,7 @@ import org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap;
import org.alfresco.repo.dictionary.RepositoryLocation; import org.alfresco.repo.dictionary.RepositoryLocation;
import org.alfresco.repo.i18n.MessageService; import org.alfresco.repo.i18n.MessageService;
import org.alfresco.repo.model.Repository; import org.alfresco.repo.model.Repository;
import org.alfresco.repo.policy.PolicyComponent;
import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.tenant.TenantAdminService; import org.alfresco.repo.tenant.TenantAdminService;
import org.alfresco.repo.security.permissions.AccessDeniedException; import org.alfresco.repo.security.permissions.AccessDeniedException;
@@ -141,6 +142,7 @@ public class ScriptNodeTest
private static MessageService MESSAGE_SERVICE; private static MessageService MESSAGE_SERVICE;
private static TransactionService TRANSACTION_SERVICE; private static TransactionService TRANSACTION_SERVICE;
private static DictionaryModelType DICTIONARY_MODEL_TYPE; private static DictionaryModelType DICTIONARY_MODEL_TYPE;
private static PolicyComponent POLICY_COMPONENT;
private static TestSiteAndMemberInfo USER_ONES_TEST_SITE; private static TestSiteAndMemberInfo USER_ONES_TEST_SITE;
private static NodeRef USER_ONES_TEST_FILE; private static NodeRef USER_ONES_TEST_FILE;
@@ -179,6 +181,7 @@ public class ScriptNodeTest
MESSAGE_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("messageService", MessageService.class); MESSAGE_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("messageService", MessageService.class);
TRANSACTION_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("transactionComponent", TransactionService.class); TRANSACTION_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("transactionComponent", TransactionService.class);
DICTIONARY_MODEL_TYPE = APP_CONTEXT_INIT.getApplicationContext().getBean("dictionaryModelType", DictionaryModelType.class); DICTIONARY_MODEL_TYPE = APP_CONTEXT_INIT.getApplicationContext().getBean("dictionaryModelType", DictionaryModelType.class);
POLICY_COMPONENT = APP_CONTEXT_INIT.getApplicationContext().getBean("policyComponent", PolicyComponent.class);
USER_ONES_TEST_SITE = STATIC_TEST_SITES.createTestSiteWithUserPerRole(GUID.generate(), "sitePreset", SiteVisibility.PRIVATE, USER_ONE_NAME); USER_ONES_TEST_SITE = STATIC_TEST_SITES.createTestSiteWithUserPerRole(GUID.generate(), "sitePreset", SiteVisibility.PRIVATE, USER_ONE_NAME);
USER_ONES_TEST_FILE = STATIC_TEST_NODES.createQuickFile(MimetypeMap.MIMETYPE_TEXT_PLAIN, USER_ONES_TEST_SITE.doclib, "test.txt", USER_ONE_NAME); USER_ONES_TEST_FILE = STATIC_TEST_NODES.createQuickFile(MimetypeMap.MIMETYPE_TEXT_PLAIN, USER_ONES_TEST_SITE.doclib, "test.txt", USER_ONE_NAME);
@@ -220,6 +223,7 @@ public class ScriptNodeTest
bootstrap.setNodeService(NODE_SERVICE); bootstrap.setNodeService(NODE_SERVICE);
bootstrap.setNamespaceService(NAMESPACE_SERVICE); bootstrap.setNamespaceService(NAMESPACE_SERVICE);
bootstrap.setMessageService(MESSAGE_SERVICE); bootstrap.setMessageService(MESSAGE_SERVICE);
bootstrap.setPolicyComponent(POLICY_COMPONENT);
List<String> storeUrlsToValidate = new ArrayList<String>(1); List<String> storeUrlsToValidate = new ArrayList<String>(1);
storeUrlsToValidate.add(this.storeRef.toString()); storeUrlsToValidate.add(this.storeRef.toString());