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

78429: Merged EOL (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      75801: ACE-2149: EOL AVM / WCM
       - Thorough sweep of 'avm' and 'wcm' references
       - Picked up on many 'deployment' and related classes and configuration
       - Repo starts


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82558 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2014-09-03 12:13:50 +00:00
parent 63678f2980
commit e94f8f8351
93 changed files with 62 additions and 4426 deletions

View File

@@ -248,28 +248,19 @@ public class FTPServerTest extends TestCase
reply = ftp.getReplyCode();
assertTrue(FTPReply.isPositiveCompletion(reply));
// expect /Alfresco directory
// /AVM directory - avm removed
assertTrue(files.length == 1);
boolean foundAVM=false;
boolean foundAlfresco=false;
for(FTPFile file : files)
{
logger.debug("file name=" + file.getName());
assertTrue(file.isDirectory());
if(file.getName().equalsIgnoreCase("AVM"))
{
foundAVM=true;
}
if(file.getName().equalsIgnoreCase("Alfresco"))
{
foundAlfresco=true;
}
}
// AVM mount point removed
//assertTrue(foundAVM);
assertTrue(foundAlfresco);
// Change to Alfresco Dir that we know exists
@@ -568,8 +559,6 @@ public class FTPServerTest extends TestCase
final String TEST_DIR="/Alfresco/User Homes/" + USER_ONE;
final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper();
FTPClient ftpOne = connectClient();
FTPClient ftpTwo = connectClient();
try
@@ -666,8 +655,6 @@ public class FTPServerTest extends TestCase
final String TEST_DIR="/Alfresco/User Homes/" + USER_THREE;
final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper();
FTPClient ftpOne = connectClient();
try
{

View File

@@ -137,7 +137,6 @@ public class RepoDictionaryDAOTest extends TestCase
bootstrapModels.add("alfresco/model/dictionaryModel.xml");
bootstrapModels.add("alfresco/model/systemModel.xml");
bootstrapModels.add("alfresco/model/contentModel.xml");
bootstrapModels.add("alfresco/model/wcmModel.xml");
bootstrapModels.add("alfresco/model/applicationModel.xml");
bootstrapModels.add("org/alfresco/repo/security/authentication/userModel.xml");
@@ -423,7 +422,6 @@ public class RepoDictionaryDAOTest extends TestCase
models.add("alfresco/model/dictionaryModel.xml");
models.add("alfresco/model/systemModel.xml");
models.add("alfresco/model/contentModel.xml");
models.add("alfresco/model/wcmModel.xml");
models.add("alfresco/model/applicationModel.xml");
models.add("org/alfresco/repo/security/authentication/userModel.xml");
models.add("org/alfresco/repo/action/actionModel.xml");

View File

@@ -1,89 +0,0 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.domain;
import java.util.Locale;
import junit.framework.TestCase;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.repository.MLText;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
/**
* @see PropertyValue
*
* @author Derek Hulley
*/
@Category(OwnJVMTestsCategory.class)
public class PropertyValueTest extends TestCase
{
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
public void testMLText()
{
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
TransactionService txnService = serviceRegistry.getTransactionService();
RetryingTransactionCallback<Object> doTestCallback = new RetryingTransactionCallback<Object>()
{
public Object execute() throws Throwable
{
// single language
MLText mlText = new MLText(Locale.FRENCH, "bonjour");
PropertyValue propertyValue = new PropertyValue(DataTypeDefinition.MLTEXT, mlText);
assertEquals("MLText not persisted as a string", "bonjour", propertyValue.getStringValue());
try
{
// multiple languages
mlText = new MLText(Locale.GERMAN, "hallo");
mlText.addValue(Locale.ITALIAN, "ciao");
propertyValue = new PropertyValue(DataTypeDefinition.MLTEXT, mlText);
fail();
}
catch (UnsupportedOperationException uoe)
{
// expected
// NOTE: since 2.2.1, PropertyValue is only used by AVM (which does not natively support MLText, other than single/default string)
}
// single language - empty string
mlText = new MLText(Locale.FRENCH, "");
propertyValue = new PropertyValue(DataTypeDefinition.MLTEXT, mlText);
assertEquals("MLText not persisted as an empty string", "", propertyValue.getStringValue());
// single language - null string
mlText = new MLText(Locale.GERMAN, null);
propertyValue = new PropertyValue(DataTypeDefinition.MLTEXT, mlText);
assertNull("MLText not persisted as a null string", propertyValue.getStringValue());
return null;
}
};
txnService.getRetryingTransactionHelper().doInTransaction(doTestCallback, false);
}
}

View File

@@ -320,7 +320,6 @@ public class ScriptAuthorityServiceTest extends TestCase
Set<String> zones = new HashSet<String>();
zones.add(AuthorityService.ZONE_APP_SHARE);
pubAuthorityService.addAuthorityToZones(GROUP_A_FULL, zones);
zones.add(AuthorityService.ZONE_APP_WCM);
pubAuthorityService.addAuthorityToZones(GROUP_B_FULL, zones);
groups = service.searchGroupsInZone(
@@ -331,14 +330,6 @@ public class ScriptAuthorityServiceTest extends TestCase
assertEquals(GROUP_A, groups[0].getShortName());
assertEquals(GROUP_B, groups[1].getShortName());
groups = service.searchGroupsInZone(
GROUP_A.substring(0, GROUP_A.length()-1), AuthorityService.ZONE_APP_WCM,
new ScriptPagingDetails(10,0), "default");
assertEquals(1, groups.length);
assertEquals(GROUP_B, groups[0].getShortName());
// And root groups in zones
groups = service.searchRootGroupsInZone(
GROUP_A.substring(0, GROUP_A.length()-1)+"*", AuthorityService.ZONE_APP_SHARE,
@@ -346,15 +337,6 @@ public class ScriptAuthorityServiceTest extends TestCase
assertEquals(1, groups.length);
assertEquals(GROUP_A, groups[0].getShortName());
groups = service.searchRootGroupsInZone(
GROUP_A.substring(0, GROUP_A.length()-1)+"*", AuthorityService.ZONE_APP_WCM,
new ScriptPagingDetails(10,0), "default");
// B apparently counts as a root group in the WCM zone as it's
// parent group A isn't in that zone too
assertEquals(1, groups.length);
assertEquals(GROUP_B, groups[0].getShortName());
}
public void testGroupUsers()

View File

@@ -87,8 +87,7 @@ public class PermissionModelTest extends AbstractPermissionTest
Set<PermissionReference> grantees = permissionModelDAO.getGranteePermissions(SimplePermissionReference.getPermissionReference(QName.createQName("cm", "cmobject",
namespacePrefixResolver), "Coordinator"));
// NB This has gone from 59 to 63, I believe, because of the for new WCM roles.
// 63-97 from AVM permission fix up
// TODO: readjust due to permission removal
assertEquals(103, grantees.size());
}
@@ -104,13 +103,13 @@ public class PermissionModelTest extends AbstractPermissionTest
{
Set<PermissionReference> granters = permissionModelDAO.getGrantingPermissions(SimplePermissionReference.getPermissionReference(QName.createQName("sys", "base",
namespacePrefixResolver), "ReadProperties"));
// NB This has gone from 10 to 14 because of the new WCM roles, I believe.
// TODO: readjust due to permission removal
// 14-18 -> 4 site base roles added
assertEquals(18, granters.size());
granters = permissionModelDAO.getGrantingPermissions(SimplePermissionReference.getPermissionReference(QName.createQName("sys", "base", namespacePrefixResolver),
"_ReadProperties"));
// NB 11 to 15 as above.
// TODO: readjust due to permission removal
// 5-19 site based roles added
assertEquals(19, granters.size());
}