mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.0.N (5.0.3) to HEAD (5.1)
110205: Merged V4.2-BUG-FIX (4.2.6) to 5.0.N (5.0.3) 110092: Merged V4.2.5 (4.2.5) to V4.2-BUG-FIX (4.2.6) 110055: Merged DEV to PATCHES/V4.2.5 (4.2.5) 109047 : MNT-12226 : Alfresco fails to version metadata after uploading new content version even when autoVersionOnUpdateProps=true - Reimplemented previous solution. Configuration properties for autoVersioning should not affect all nodes in repo. They should just provide default behavior. - Added ability to specify default values for model properties using standard alfresco GLOBAL_PROPERTIES file. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@110627 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -21,6 +21,7 @@ package org.alfresco.repo.version;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -52,6 +53,9 @@ import org.springframework.context.ApplicationContext;
|
||||
@Category(OwnJVMTestsCategory.class)
|
||||
public class VersionableAspectTest extends TestCase
|
||||
{
|
||||
public static final String AUTO_VERSION_KEY = "version.store.enableAutoVersioning";
|
||||
public static final String AUTO_VERSION_PROPS_KEY = "version.store.enableAutoVersionOnUpdateProps";
|
||||
|
||||
private static final String NAME_AND_EXT_DELIMETER = ".";
|
||||
|
||||
private static final String NAME_AND_EXT_DELIMETER_REGEXP = "\\" + NAME_AND_EXT_DELIMETER;
|
||||
@@ -78,7 +82,7 @@ public class VersionableAspectTest extends TestCase
|
||||
private TransactionService transactionService = (TransactionService) applicationContext.getBean("transactionService");
|
||||
private CheckOutCheckInService checkOutCheckInService = (CheckOutCheckInService) applicationContext.getBean("checkOutCheckInService");
|
||||
private AuthenticationService authenticationService = (AuthenticationService) applicationContext.getBean("authenticationService");
|
||||
private VersionableAspect versionableAspect = (VersionableAspect) applicationContext.getBean("versionableAspect");
|
||||
private Properties globalProperties = (Properties) applicationContext.getBean("global-properties");
|
||||
|
||||
private NodeRef document;
|
||||
private NodeRef parentFolder;
|
||||
@@ -86,8 +90,7 @@ public class VersionableAspectTest extends TestCase
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
{
|
||||
versionableAspect.setEnableAutoVersionOnUpdateProps(true);
|
||||
|
||||
globalProperties.setProperty(AUTO_VERSION_PROPS_KEY, "true");
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
@Override
|
||||
@@ -139,8 +142,7 @@ public class VersionableAspectTest extends TestCase
|
||||
@Override
|
||||
protected void tearDown() throws Exception
|
||||
{
|
||||
versionableAspect.setEnableAutoVersionOnUpdateProps(false);
|
||||
|
||||
globalProperties.setProperty(AUTO_VERSION_PROPS_KEY, "false");
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user