mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
108045: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud) 107732: Merged 5.0.2 (5.0.2) to 5.0.N (5.0.3) 107703: MNT-13820 "Model can be deactivated with a node referencing the model is in trashcan" Fix up hanging test Tidy up imports git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@108076 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -31,6 +31,7 @@ import java.util.Set;
|
|||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.content.EmptyContentReader;
|
import org.alfresco.repo.content.EmptyContentReader;
|
||||||
|
import org.alfresco.repo.dictionary.DynamicModelPolicies.OnLoadDynamicModel;
|
||||||
import org.alfresco.repo.i18n.MessageDeployer;
|
import org.alfresco.repo.i18n.MessageDeployer;
|
||||||
import org.alfresco.repo.i18n.MessageService;
|
import org.alfresco.repo.i18n.MessageService;
|
||||||
import org.alfresco.repo.policy.ClassPolicyDelegate;
|
import org.alfresco.repo.policy.ClassPolicyDelegate;
|
||||||
@@ -52,14 +53,12 @@ import org.alfresco.service.namespace.NamespaceService;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.Pair;
|
|
||||||
import org.alfresco.util.PropertyCheck;
|
import org.alfresco.util.PropertyCheck;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
||||||
import org.alfresco.repo.dictionary.DynamicModelPolicies.OnLoadDynamicModel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bootstrap the dictionary from specified locations within the repository
|
* Bootstrap the dictionary from specified locations within the repository
|
||||||
|
@@ -36,6 +36,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.security.permissions.AccessDeniedException;
|
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||||
import org.alfresco.repo.security.permissions.PermissionServiceSPI;
|
import org.alfresco.repo.security.permissions.PermissionServiceSPI;
|
||||||
@@ -138,6 +139,7 @@ public class ScriptNodeTest
|
|||||||
private static TenantAdminService TENANT_ADMIN_SERVICE;
|
private static TenantAdminService TENANT_ADMIN_SERVICE;
|
||||||
private static MessageService MESSAGE_SERVICE;
|
private static MessageService MESSAGE_SERVICE;
|
||||||
private static TransactionService TRANSACTION_SERVICE;
|
private static TransactionService TRANSACTION_SERVICE;
|
||||||
|
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;
|
||||||
@@ -175,6 +177,7 @@ public class ScriptNodeTest
|
|||||||
TENANT_ADMIN_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("tenantAdminService", TenantAdminService.class);
|
TENANT_ADMIN_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("tenantAdminService", TenantAdminService.class);
|
||||||
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);
|
||||||
|
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);
|
||||||
@@ -216,6 +219,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);
|
||||||
|
|
||||||
RepositoryLocation location = new RepositoryLocation();
|
RepositoryLocation location = new RepositoryLocation();
|
||||||
location.setStoreProtocol(storeRef.getProtocol());
|
location.setStoreProtocol(storeRef.getProtocol());
|
||||||
|
Reference in New Issue
Block a user