mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'feature/RM-4306_SomeCommentsForWhenUpgradingFrom5_2_a_EA' into 'master'
Feature/rm 4306 some comments for when upgrading from5 2 a ea See merge request !603
This commit is contained in:
@@ -79,6 +79,9 @@ public class RMSitesImpl extends SitesImpl implements RMSites
|
||||
return new RMSite(site, compliance);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO remove when upgrading to 5.2.N. We'll need to only extend the extended method createSite(Site) and use the siteService method that gets site type as parameter
|
||||
*/
|
||||
@Override
|
||||
public Site createSite(Site site, Parameters parameters)
|
||||
{
|
||||
@@ -125,6 +128,8 @@ public class RMSitesImpl extends SitesImpl implements RMSites
|
||||
/**
|
||||
* Copied from SitesImpl since we didn't had access to it.
|
||||
*
|
||||
* TODO to remove when upgrading to 5.2.N
|
||||
*
|
||||
* @param siteInfo
|
||||
* @param includeRole
|
||||
* @return
|
||||
@@ -142,7 +147,9 @@ public class RMSitesImpl extends SitesImpl implements RMSites
|
||||
}
|
||||
|
||||
/**
|
||||
* Copied from SitesImpl since we didn't had access to it
|
||||
* Copied from SitesImpl since we didn't had access to it.
|
||||
*
|
||||
* TODO to be removed when upgrading to 5.2.N
|
||||
*
|
||||
* @param siteId
|
||||
* @param siteNodeRef
|
||||
@@ -193,6 +200,8 @@ public class RMSitesImpl extends SitesImpl implements RMSites
|
||||
/**
|
||||
* This method is copied from SitesImpl since we could not access it since it is private.
|
||||
*
|
||||
* TODO change this to protected and override validate method from core when upgrading to 5.2.N
|
||||
*
|
||||
* Even if the method it will be protected in core, we still need to override since we don't need to check if the visibility is set since for RM site it is always PUBLIC.
|
||||
* We also don't need to generate the id from title, or to check the id, since the id is always rm.
|
||||
* @param site
|
||||
|
@@ -27,14 +27,13 @@
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.test.integration.issue;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import java.security.InvalidParameterException;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Unit test for RM-3341 .. can copy to hold and transfer folder
|
||||
@@ -43,9 +42,6 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
||||
*/
|
||||
public class RM3341Test extends BaseRMTestCase
|
||||
{
|
||||
|
||||
private final static String MSG_ERROR_ADD_CONTENT_CONTAINER = "rm.service.error-add-content-container";
|
||||
|
||||
public void testCopyingContentsInHoldandTransfer() throws Exception
|
||||
{
|
||||
doTestInTransaction(new Test<Void>()
|
||||
@@ -79,13 +75,12 @@ public class RM3341Test extends BaseRMTestCase
|
||||
|
||||
try
|
||||
{
|
||||
FileInfo copyInfo = fileFolderService.create(holdContainer, "test file", ContentModel.TYPE_CONTENT);
|
||||
fileFolderService.create(holdContainer, "test file", ContentModel.TYPE_CONTENT);
|
||||
fail("This should have thrown an exception");
|
||||
}
|
||||
catch (AlfrescoRuntimeException e)
|
||||
catch (InvalidParameterException e)
|
||||
{
|
||||
// ("Content can't be added to a record container. Use record folders to file content.")
|
||||
assertEquals(I18NUtil.getMessage(MSG_ERROR_ADD_CONTENT_CONTAINER), e.getMsgId());
|
||||
// ("Content can't be added to a hold container. Use record folders to file content.")
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -109,10 +104,9 @@ public class RM3341Test extends BaseRMTestCase
|
||||
fail("This should have thrown an exception");
|
||||
|
||||
}
|
||||
catch (AlfrescoRuntimeException e)
|
||||
catch (InvalidParameterException e)
|
||||
{
|
||||
// ("Content can't be added to a record container. Use record folders to file content.")
|
||||
assertEquals(I18NUtil.getMessage(MSG_ERROR_ADD_CONTENT_CONTAINER), e.getMsgId());
|
||||
// ("Content can't be added to a transfer container. Use record folders to file content.")
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@@ -26,7 +26,8 @@
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.test.integration.issue;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import java.security.InvalidParameterException;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.test.util.TestModel;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
@@ -49,7 +50,7 @@ public class RM3450Test extends BaseRMTestCase
|
||||
doTestInTransaction(new FailureTest
|
||||
(
|
||||
I18NUtil.getMessage(MSG_CANNOT_CAST_TO_RM_TYPE),
|
||||
AlfrescoRuntimeException.class
|
||||
InvalidParameterException.class
|
||||
)
|
||||
{
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user