mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged HEAD (5.1) to 5.1.N (5.1.1)
119450 mcozma: Merged BRANCHES/DEV/VF_REP_INT_51 to HEAD ACE-4716 Can't rename a document in a virtual context from CMIS ACE-4752 Type virtualization method does not work ACE-4717 Document name is renamed when making "Check in" for a document edited in Google Docs ACE-4700 Can't upload to a virtual folder when filename starts with a number and includes dashes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@119613 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -34,16 +34,16 @@ public class VirtualizationConfigTestBootstrap
|
||||
private NodeRefExpression downloadAssocaiationsFolder;
|
||||
|
||||
|
||||
private String typeTemplatesQNameFilterRegexp;
|
||||
private String typeTemplatesQNameFilter;
|
||||
|
||||
public void setTypeTemplatesQNameFilterRegexp(String typeTemplatesQNameFilterRegexp)
|
||||
public void setTypeTemplatesQNameFilter(String typeTemplatesQNameFilterRegexp)
|
||||
{
|
||||
this.typeTemplatesQNameFilterRegexp = typeTemplatesQNameFilterRegexp;
|
||||
this.typeTemplatesQNameFilter = typeTemplatesQNameFilterRegexp;
|
||||
}
|
||||
|
||||
public String getTypeTemplatesQNameFilterRegexp()
|
||||
public String getTypeTemplatesQNameFilter()
|
||||
{
|
||||
return this.typeTemplatesQNameFilterRegexp;
|
||||
return this.typeTemplatesQNameFilter;
|
||||
}
|
||||
|
||||
public void setTypeTemplatesPath(NodeRefExpression typeTemplatesPath)
|
||||
|
@@ -38,7 +38,6 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.forms.FormData;
|
||||
import org.alfresco.repo.forms.Item;
|
||||
import org.alfresco.repo.model.Repository;
|
||||
import org.alfresco.repo.node.integrity.IntegrityChecker;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
@@ -53,6 +52,7 @@ import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -129,45 +129,73 @@ public abstract class VirtualizationIntegrationTest extends TestCase implements
|
||||
|
||||
protected static final ApplicationContext ctx = ApplicationContextHelper.getApplicationContext(CONFIG_LOCATIONS);
|
||||
|
||||
protected ContentService contentService;
|
||||
|
||||
private TransactionService transactionService;
|
||||
|
||||
protected FileInfo testRootFolder;
|
||||
|
||||
protected FileFolderService fileAndFolderService;
|
||||
|
||||
protected ActualEnvironment environment;
|
||||
protected ContentService contentService;
|
||||
|
||||
protected NodeRef virtualFolder1NodeRef;
|
||||
protected TransactionService transactionService;
|
||||
|
||||
protected NodeService nodeService;
|
||||
|
||||
protected PermissionService permissionService;
|
||||
|
||||
protected SearchService searchService;
|
||||
|
||||
protected RetryingTransactionHelper retryingTransactionHelper;
|
||||
|
||||
protected FileInfo testRootFolder;
|
||||
|
||||
protected NodeRef virtualFolder1NodeRef;
|
||||
|
||||
protected NodeRef rootNodeRef;
|
||||
|
||||
protected ActualEnvironment environment;
|
||||
|
||||
protected TypeAndAspectsFormProcessor typeAndAspectsFormProcessor;
|
||||
|
||||
private UserTransaction txn;
|
||||
|
||||
protected AuthenticationComponent authenticationComponent;
|
||||
|
||||
protected PermissionService permissionService;
|
||||
|
||||
/** The root node reference */
|
||||
protected NodeRef rootNodeRef;
|
||||
|
||||
protected VirtualizationConfigTestBootstrap virtualizationConfigTestBootstrap;
|
||||
|
||||
protected String configuredTemplatesClassPath = null;
|
||||
|
||||
protected SystemTemplateLocationsConstraint constraints;
|
||||
|
||||
/** when set to a not-null value will be restored up[on {@link #tearDown()} */
|
||||
protected String configuredTemplatesClassPath = null;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
{
|
||||
virtualizationConfigTestBootstrap = ctx.getBean(VIRTUALIZATION_CONFIG_TEST_BOOTSTRAP_BEAN_ID,
|
||||
VirtualizationConfigTestBootstrap.class);
|
||||
|
||||
// Get the required services
|
||||
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean("ServiceRegistry");
|
||||
|
||||
transactionService = serviceRegistry.getTransactionService();
|
||||
retryingTransactionHelper = serviceRegistry.getRetryingTransactionHelper();
|
||||
nodeService = serviceRegistry.getNodeService();
|
||||
contentService = serviceRegistry.getContentService();
|
||||
fileAndFolderService = serviceRegistry.getFileFolderService();
|
||||
permissionService = serviceRegistry.getPermissionService();
|
||||
searchService=serviceRegistry.getSearchService();
|
||||
|
||||
authenticationComponent = ctx.getBean("authenticationComponent",
|
||||
AuthenticationComponent.class);
|
||||
|
||||
environment = ctx.getBean("actualEnvironment",
|
||||
ActualEnvironment.class);
|
||||
|
||||
typeAndAspectsFormProcessor = ctx.getBean("typeAndAspectsFormProcessor",
|
||||
TypeAndAspectsFormProcessor.class);
|
||||
|
||||
constraints = ctx.getBean("systemTemplateLocations",
|
||||
SystemTemplateLocationsConstraint.class);
|
||||
|
||||
Repository repository = ctx.getBean("repositoryHelper",
|
||||
Repository.class);
|
||||
|
||||
if (!virtualizationConfigTestBootstrap.areVirtualFoldersEnabled())
|
||||
{
|
||||
// "use the force" and enable virtual folders
|
||||
@@ -180,23 +208,7 @@ public abstract class VirtualizationIntegrationTest extends TestCase implements
|
||||
logger.info("Virtual folders are spring-enabled.");
|
||||
}
|
||||
|
||||
// Get the required services
|
||||
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean("ServiceRegistry");
|
||||
transactionService = serviceRegistry.getTransactionService();
|
||||
authenticationComponent = (AuthenticationComponent) ctx.getBean("authenticationComponent");
|
||||
retryingTransactionHelper = (RetryingTransactionHelper) ctx.getBean("retryingTransactionHelper");
|
||||
this.authenticationComponent.setSystemUserAsCurrentUser();
|
||||
permissionService = (PermissionService) ctx.getBean("PermissionService");
|
||||
|
||||
contentService = ctx.getBean("contentService",
|
||||
ContentService.class);
|
||||
environment = ctx.getBean("actualEnvironment",
|
||||
ActualEnvironment.class);
|
||||
|
||||
fileAndFolderService = serviceRegistry.getFileFolderService();
|
||||
|
||||
Repository repository = ctx.getBean("repositoryHelper",
|
||||
Repository.class);
|
||||
|
||||
// start the transaction
|
||||
txn = transactionService.getUserTransaction();
|
||||
@@ -207,12 +219,6 @@ public abstract class VirtualizationIntegrationTest extends TestCase implements
|
||||
testRootFolder = fileAndFolderService.create(root,
|
||||
TEST_ROOT_FOLDER_NAME,
|
||||
ContentModel.TYPE_FOLDER);
|
||||
nodeService = ctx.getBean("nodeService",
|
||||
NodeService.class);
|
||||
typeAndAspectsFormProcessor = ctx.getBean("typeAndAspectsFormProcessor",
|
||||
TypeAndAspectsFormProcessor.class);
|
||||
constraints = ctx.getBean("systemTemplateLocations",
|
||||
SystemTemplateLocationsConstraint.class);
|
||||
|
||||
virtualFolder1NodeRef = createVirtualizedFolder(testRootFolder.getNodeRef(),
|
||||
VIRTUAL_FOLDER_1_NAME,
|
||||
|
@@ -38,15 +38,12 @@ import org.alfresco.repo.virtual.store.VirtualStoreImplTest;
|
||||
import org.alfresco.repo.virtual.template.ApplyTemplateMethodTest;
|
||||
import org.alfresco.repo.virtual.template.TemplateFilingRuleTest;
|
||||
import org.alfresco.repo.virtual.template.TemplateResourceProcessorTest;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
* @author Bogdan Horje
|
||||
*/
|
||||
public class VirtualizationIntegrationTestSuite extends TestSuite implements VirtualizationTest
|
||||
{
|
||||
protected static final ApplicationContext ctx = ApplicationContextHelper.getApplicationContext(CONFIG_LOCATIONS);
|
||||
|
||||
public static Test suite()
|
||||
{
|
||||
@@ -62,7 +59,7 @@ public class VirtualizationIntegrationTestSuite extends TestSuite implements Vir
|
||||
suite.addTest(new JUnit4TestAdapter(ApplyTemplateMethodTest.class));
|
||||
suite.addTest(new JUnit4TestAdapter(SystemTemplateLocationsConstraintTest.class));
|
||||
suite.addTest(new JUnit4TestAdapter(SystemVirtualizationMethodTest.class));
|
||||
suite.addTest(new JUnit4TestAdapter(TypeVirtualizationMethodTest.class));
|
||||
suite.addTest(new JUnit4TestAdapter(TypeVirtualizationMethodTest.Integration.class));
|
||||
suite.addTest(new JUnit4TestAdapter(TemplateResourceProcessorTest.class));
|
||||
suite.addTest(new JUnit4TestAdapter(VirtualStoreImplTest.class));
|
||||
suite.addTest(new JUnit4TestAdapter(NodeRefPathExpressionTest.class));
|
||||
|
@@ -43,5 +43,6 @@ public class VirtualizationUnitTestSuite
|
||||
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.StoredPathHasherTest.class));
|
||||
|
||||
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.template.VirtualQueryImplTest.class));
|
||||
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.store.TypeVirtualizationMethodTest.Unit.class));
|
||||
}
|
||||
}
|
||||
|
@@ -29,11 +29,14 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.query.CannedQueryPageDetails;
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.virtual.VirtualizationIntegrationTest;
|
||||
import org.alfresco.service.cmr.coci.CheckOutCheckInService;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.alfresco.service.cmr.repository.MimetypeService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -45,6 +48,7 @@ public class VirtualFileFolderServiceExtensionTest extends VirtualizationIntegra
|
||||
{
|
||||
|
||||
private static final String NEW_FILE_NAME_2 = "RenameTest2";
|
||||
|
||||
private static final String NEW_FILE_NAME_1 = "RenamedTest";
|
||||
|
||||
@Test
|
||||
@@ -126,22 +130,9 @@ public class VirtualFileFolderServiceExtensionTest extends VirtualizationIntegra
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"Node2");
|
||||
|
||||
HashMap<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
||||
properties.put(ContentModel.PROP_NAME,
|
||||
"testfile.txt");
|
||||
QName assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName("testfile.txt"));
|
||||
|
||||
nodeService.createNode(node1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties);
|
||||
nodeService.createNode(node2,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties);
|
||||
String fileName="testfile.txt";
|
||||
fileAndFolderService.create(node1, fileName, ContentModel.TYPE_CONTENT);
|
||||
fileAndFolderService.create(node2, fileName, ContentModel.TYPE_CONTENT);
|
||||
|
||||
List<FileInfo> search = fileAndFolderService.search(virtualFolder1NodeRef,
|
||||
"testfile.txt",
|
||||
@@ -298,14 +289,14 @@ public class VirtualFileFolderServiceExtensionTest extends VirtualizationIntegra
|
||||
contentName);
|
||||
|
||||
{
|
||||
PagingResults<FileInfo> folderChildren = fileAndFolderService
|
||||
.list(node2,
|
||||
false,
|
||||
true,
|
||||
"*",
|
||||
Collections.<QName> emptySet(),
|
||||
Collections.<Pair<QName, Boolean>> emptyList(),
|
||||
new PagingRequest(100));
|
||||
PagingResults<FileInfo> folderChildren = fileAndFolderService.list(node2,
|
||||
false,
|
||||
true,
|
||||
"*",
|
||||
Collections.<QName> emptySet(),
|
||||
Collections
|
||||
.<Pair<QName, Boolean>> emptyList(),
|
||||
new PagingRequest(100));
|
||||
List<FileInfo> page = folderChildren.getPage();
|
||||
assertContainsNames(page,
|
||||
folderName);
|
||||
@@ -314,14 +305,14 @@ public class VirtualFileFolderServiceExtensionTest extends VirtualizationIntegra
|
||||
}
|
||||
|
||||
{
|
||||
PagingResults<FileInfo> contentChildren = fileAndFolderService
|
||||
.list(node2,
|
||||
true,
|
||||
false,
|
||||
"*",
|
||||
Collections.<QName> emptySet(),
|
||||
Collections.<Pair<QName, Boolean>> emptyList(),
|
||||
new PagingRequest(100));
|
||||
PagingResults<FileInfo> contentChildren = fileAndFolderService.list(node2,
|
||||
true,
|
||||
false,
|
||||
"*",
|
||||
Collections.<QName> emptySet(),
|
||||
Collections
|
||||
.<Pair<QName, Boolean>> emptyList(),
|
||||
new PagingRequest(100));
|
||||
List<FileInfo> page = contentChildren.getPage();
|
||||
assertMissesNames(page,
|
||||
folderName);
|
||||
@@ -403,7 +394,7 @@ public class VirtualFileFolderServiceExtensionTest extends VirtualizationIntegra
|
||||
NodeRef childByName = nodeService.getChildByName(node2,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
contentName);
|
||||
//rename file in virtual context
|
||||
// rename file in virtual context
|
||||
FileInfo renamedFileInfo = fileAndFolderService.rename(childByName,
|
||||
NEW_FILE_NAME_1);
|
||||
assertNotNull(renamedFileInfo);
|
||||
@@ -417,13 +408,13 @@ public class VirtualFileFolderServiceExtensionTest extends VirtualizationIntegra
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
contentName));
|
||||
assertNotNull(nodeService.getChildByName(node2,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
NEW_FILE_NAME_1));
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
NEW_FILE_NAME_1));
|
||||
assertNotNull(nodeService.getChildByName(vf,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
NEW_FILE_NAME_1));
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
NEW_FILE_NAME_1));
|
||||
|
||||
//rename physical file
|
||||
// rename physical file
|
||||
childByName = nodeService.getChildByName(vf,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
NEW_FILE_NAME_1);
|
||||
@@ -447,4 +438,181 @@ public class VirtualFileFolderServiceExtensionTest extends VirtualizationIntegra
|
||||
NEW_FILE_NAME_2));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListNamePattern() throws Exception
|
||||
{
|
||||
List<Pair<QName, Boolean>> sortProps = new ArrayList<Pair<QName, Boolean>>(1);
|
||||
sortProps.add(new Pair<QName, Boolean>(ContentModel.PROP_NAME,
|
||||
false));
|
||||
String name = "A N.&ame.txt";
|
||||
String name1 = "A N.&ame-1.txt";
|
||||
String nameAfter = "XXName.txt";
|
||||
|
||||
NodeRef vf = createVirtualizedFolder(testRootFolder.getNodeRef(),
|
||||
"TestVirtualFileFolderService_testVirtualFolderVirtualChild",
|
||||
TEST_TEMPLATE_3_JSON_SYS_PATH);
|
||||
NodeRef node1 = nodeService.getChildByName(vf,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"Node1");
|
||||
createContent(node1,
|
||||
name,
|
||||
"0",
|
||||
MimetypeMap.MIMETYPE_TEXT_PLAIN,
|
||||
"UTF-8");
|
||||
|
||||
createContent(node1,
|
||||
name1,
|
||||
"01",
|
||||
MimetypeMap.MIMETYPE_TEXT_PLAIN,
|
||||
"UTF-8");
|
||||
|
||||
createContent(node1,
|
||||
nameAfter,
|
||||
"1",
|
||||
MimetypeMap.MIMETYPE_TEXT_PLAIN,
|
||||
"UTF-8");
|
||||
|
||||
String namePattern = "A N.&ame*.txt";
|
||||
PagingResults<FileInfo> results = fileAndFolderService.list(node1,
|
||||
true,
|
||||
false,
|
||||
namePattern,
|
||||
null,
|
||||
sortProps,
|
||||
new PagingRequest(CannedQueryPageDetails.DEFAULT_PAGE_SIZE));
|
||||
|
||||
List<FileInfo> page = results.getPage();
|
||||
assertEquals(2,
|
||||
page.size());
|
||||
assertEquals(page.get(0).getName(),
|
||||
name1);
|
||||
assertEquals(page.get(1).getName(),
|
||||
name);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLastDuplicate() throws Exception
|
||||
{
|
||||
NodeRef lastDup = null;
|
||||
List<Pair<QName, Boolean>> sortProps = new ArrayList<Pair<QName, Boolean>>(1);
|
||||
sortProps.add(new Pair<QName, Boolean>(ContentModel.PROP_NAME,
|
||||
false));
|
||||
String name = "AName.txt";
|
||||
String nameAfter = "XXName.txt";
|
||||
|
||||
NodeRef vf = createVirtualizedFolder(testRootFolder.getNodeRef(),
|
||||
"TestVirtualFileFolderService_testVirtualFolderVirtualChild",
|
||||
TEST_TEMPLATE_3_JSON_SYS_PATH);
|
||||
NodeRef node1 = nodeService.getChildByName(vf,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"Node1");
|
||||
createContent(node1,
|
||||
name,
|
||||
"0",
|
||||
MimetypeMap.MIMETYPE_TEXT_PLAIN,
|
||||
"UTF-8");
|
||||
NodeRef aNameNodeRef = nodeService.getChildByName(node1,
|
||||
ContentModel.ASSOC_CHILDREN,
|
||||
name);
|
||||
|
||||
createContent(node1,
|
||||
nameAfter,
|
||||
"1",
|
||||
MimetypeMap.MIMETYPE_TEXT_PLAIN,
|
||||
"UTF-8");
|
||||
NodeRef nameAfterNodeRef = nodeService.getChildByName(node1,
|
||||
ContentModel.ASSOC_CHILDREN,
|
||||
nameAfter);
|
||||
|
||||
String namePattern = addWildCardInName(name,
|
||||
fileAndFolderService
|
||||
.getFileInfo(aNameNodeRef)
|
||||
.getContentData()
|
||||
.getMimetype());
|
||||
PagingResults<FileInfo> results = fileAndFolderService
|
||||
.list(nodeService.getPrimaryParent(aNameNodeRef).getParentRef(),
|
||||
true,
|
||||
false,
|
||||
namePattern,
|
||||
null,
|
||||
sortProps,
|
||||
new PagingRequest(CannedQueryPageDetails.DEFAULT_PAGE_SIZE));
|
||||
|
||||
List<FileInfo> page = results.getPage();
|
||||
FileInfo fileInfo = null;
|
||||
if (page.size() > 0)
|
||||
{
|
||||
fileInfo = page.get(0);
|
||||
lastDup = fileInfo.getNodeRef();
|
||||
}
|
||||
assertFalse(lastDup.equals(nameAfterNodeRef));
|
||||
}
|
||||
|
||||
private String addWildCardInName(String name, String mimetype)
|
||||
{
|
||||
MimetypeService mimetypeService = ctx.getBean("mimetypeService",
|
||||
MimetypeService.class);
|
||||
String extension = mimetypeService.getExtension(mimetype);
|
||||
return name.substring(0,
|
||||
name.length() - (extension.length() + 1))
|
||||
.concat("*." + extension);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListUsedWithCMIS() throws Exception
|
||||
{
|
||||
NodeRef vf = createVirtualizedFolder(testRootFolder.getNodeRef(),
|
||||
"TestVirtualFileFolderService_testVirtualFolderVirtualChild",
|
||||
TEST_TEMPLATE_3_JSON_SYS_PATH);
|
||||
NodeRef node2 = nodeService.getChildByName(vf,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"Node2");
|
||||
String contentName = "ContentVirtualChild";
|
||||
createContent(node2,
|
||||
contentName);
|
||||
|
||||
NodeRef childByName = nodeService.getChildByName(node2,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
contentName);
|
||||
|
||||
FileInfo renamedFileInfo = fileAndFolderService.rename(childByName,
|
||||
NEW_FILE_NAME_1);
|
||||
assertNotNull(renamedFileInfo);
|
||||
assertEquals(NEW_FILE_NAME_1,
|
||||
nodeService.getProperty(childByName,
|
||||
ContentModel.PROP_NAME));
|
||||
|
||||
List<Pair<QName, Boolean>> sortProps = Collections.<Pair<QName, Boolean>> emptyList();
|
||||
PagingRequest pagingRequest = new PagingRequest(100);
|
||||
|
||||
PagingResults<FileInfo> results = fileAndFolderService.list(vf,
|
||||
true,
|
||||
true,
|
||||
null,
|
||||
sortProps,
|
||||
pagingRequest);
|
||||
|
||||
assertNotNull(results);
|
||||
|
||||
assertEquals(3,
|
||||
results.getPage().size());
|
||||
|
||||
String contentName1 = "ContentVirtualChild";
|
||||
createContent(node2,
|
||||
contentName1);
|
||||
|
||||
results = fileAndFolderService.list(vf,
|
||||
true,
|
||||
true,
|
||||
null,
|
||||
sortProps,
|
||||
pagingRequest);
|
||||
|
||||
assertNotNull(results);
|
||||
|
||||
assertEquals(4,
|
||||
results.getPage().size());
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -19,8 +19,6 @@
|
||||
|
||||
package org.alfresco.repo.virtual.bundle;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@@ -36,6 +34,7 @@ import org.alfresco.repo.download.DownloadModel;
|
||||
import org.alfresco.repo.download.DownloadStorage;
|
||||
import org.alfresco.repo.node.integrity.IntegrityChecker;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.repo.virtual.VirtualContentModel;
|
||||
import org.alfresco.repo.virtual.VirtualizationIntegrationTest;
|
||||
import org.alfresco.repo.virtual.config.NodeRefExpression;
|
||||
@@ -49,7 +48,6 @@ import org.alfresco.repo.virtual.store.VirtualStore;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.CopyService;
|
||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
@@ -127,9 +125,9 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
"shouldNotBeCreated");
|
||||
fail("Should not be able to create node in a readonly context.");
|
||||
}
|
||||
catch (InvalidNodeRefException e)
|
||||
catch (AccessDeniedException e)
|
||||
{
|
||||
logger.info("Succesfully denied creation in readonl",
|
||||
logger.info("Succesfully denied creation in readonly",
|
||||
e);
|
||||
}
|
||||
}
|
||||
@@ -210,37 +208,29 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
"Node2");
|
||||
assertNotNull(secondChild);
|
||||
|
||||
HashMap<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
||||
properties.put(ContentModel.PROP_NAME,
|
||||
"testfile.txt");
|
||||
QName assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName("testfile.txt"));
|
||||
authenticationComponent.setCurrentUser(AuthenticationUtil.getAdminUserName());
|
||||
// add testfile.txt to first virtual child
|
||||
|
||||
createNode(firstChild,
|
||||
assocQName,
|
||||
properties);
|
||||
String fileName="testfile.txt";
|
||||
uploadNode(firstChild,
|
||||
fileName);
|
||||
assertNotNull(nodeService.getChildByName(firstChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile.txt"));
|
||||
createNode(firstChild,
|
||||
assocQName,
|
||||
properties);
|
||||
uploadNode(firstChild,
|
||||
fileName);
|
||||
assertNotNull(nodeService.getChildByName(firstChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile-1.txt"));
|
||||
|
||||
// add testfile.txt to second virtual child
|
||||
createNode(secondChild,
|
||||
assocQName,
|
||||
properties);
|
||||
uploadNode(secondChild,
|
||||
fileName);
|
||||
assertNotNull(nodeService.getChildByName(secondChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile-2.txt"));
|
||||
createNode(secondChild,
|
||||
assocQName,
|
||||
properties);
|
||||
uploadNode(secondChild,
|
||||
fileName);
|
||||
assertNotNull(nodeService.getChildByName(secondChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile-3.txt"));
|
||||
@@ -248,13 +238,9 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
// add again to first virtual child starting from the last index found
|
||||
// (this is the index that comes from
|
||||
// upload-post.js)
|
||||
properties.put(ContentModel.PROP_NAME,
|
||||
"testfile-2.txt");
|
||||
assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName("testfile-2.txt"));
|
||||
createNode(firstChild,
|
||||
assocQName,
|
||||
properties);
|
||||
fileName="testfile-2.txt";
|
||||
uploadNode(firstChild,
|
||||
fileName);
|
||||
assertNotNull(nodeService.getChildByName(firstChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile-4.txt"));
|
||||
@@ -262,28 +248,14 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
// test create node for actual node starting from the last index found
|
||||
// (this is the index that comes from
|
||||
// upload-post.js)
|
||||
properties.put(ContentModel.PROP_NAME,
|
||||
"testfile-5.txt");
|
||||
assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName("testfile-5.txt"));
|
||||
nodeService.createNode(virtualFolder1NodeRef,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties).getChildRef();
|
||||
fileName="testfile-5.txt";
|
||||
fileAndFolderService.create(virtualFolder1NodeRef, fileName, ContentModel.TYPE_CONTENT);
|
||||
assertNotNull(nodeService.getChildByName(virtualFolder1NodeRef,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile-5.txt"));
|
||||
|
||||
properties.put(ContentModel.PROP_NAME,
|
||||
"testfile-6.txt");
|
||||
assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName("testfile-6.txt"));
|
||||
nodeService.createNode(virtualFolder1NodeRef,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties).getChildRef();
|
||||
fileName="testfile-6.txt";
|
||||
fileAndFolderService.create(virtualFolder1NodeRef, fileName, ContentModel.TYPE_CONTENT);
|
||||
assertNotNull(nodeService.getChildByName(virtualFolder1NodeRef,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile-6.txt"));
|
||||
@@ -291,38 +263,20 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
// add again to second child starting from the last index found (this is
|
||||
// the index that comes from
|
||||
// upload-post.js)
|
||||
properties.put(ContentModel.PROP_NAME,
|
||||
"testfile-4.txt");
|
||||
assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName("testfile-4.txt"));
|
||||
nodeService.createNode(secondChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties).getChildRef();
|
||||
fileName="testfile-4.txt";
|
||||
uploadNode(secondChild,
|
||||
fileName);
|
||||
assertNotNull(nodeService.getChildByName(secondChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile-7.txt"));
|
||||
|
||||
// test situation when file name is of form testfile1-1.txt
|
||||
properties.put(ContentModel.PROP_NAME,
|
||||
"testfile1-1.txt");
|
||||
assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName("testfile1-1.txt"));
|
||||
nodeService.createNode(secondChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties).getChildRef();
|
||||
fileName="testfile1-1.txt";
|
||||
fileAndFolderService.create(secondChild.toNodeRef(), fileName, ContentModel.TYPE_CONTENT);
|
||||
assertNotNull(nodeService.getChildByName(secondChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile1-1.txt"));
|
||||
|
||||
nodeService.createNode(secondChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties).getChildRef();
|
||||
fileAndFolderService.create(secondChild.toNodeRef(), fileName, ContentModel.TYPE_CONTENT);
|
||||
assertNotNull(nodeService.getChildByName(secondChild.toNodeRef(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testfile1-1-1.txt"));
|
||||
@@ -393,6 +347,13 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
childAssocsRef);
|
||||
}
|
||||
|
||||
private void uploadNode(Reference reference, String name)
|
||||
{
|
||||
fileAndFolderService.create(reference.toNodeRef(),
|
||||
name,
|
||||
ContentModel.TYPE_CONTENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assets that the given {@link ChildAssociationRef} was created within the
|
||||
* given virtualizable nodeRef container reference.
|
||||
@@ -452,18 +413,10 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"Node2");
|
||||
|
||||
HashMap<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
||||
properties.put(ContentModel.PROP_NAME,
|
||||
"testfile.txt");
|
||||
QName assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName("testfile.txt"));
|
||||
String fileName="testfile.txt";
|
||||
|
||||
// add testfile.txt to first virtual child
|
||||
nodeService.createNode(node2,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties);
|
||||
fileAndFolderService.create(node2, fileName, ContentModel.TYPE_CONTENT);
|
||||
|
||||
NodeRef childRef = nodeService.getChildByName(node2,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
@@ -487,11 +440,7 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
"Node2_1");
|
||||
assertNotNull(node2_1);
|
||||
|
||||
nodeService.createNode(node2_1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
assocQName,
|
||||
ContentModel.TYPE_CONTENT,
|
||||
properties);
|
||||
fileAndFolderService.create(node2_1, fileName, ContentModel.TYPE_CONTENT);
|
||||
|
||||
NodeRef childRef_1 = nodeService.getChildByName(node2_1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
@@ -1200,6 +1149,110 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
|
||||
assertNotNull(childFolderNodeRef);
|
||||
}
|
||||
|
||||
public void testChildByName_ACE_4700() throws Exception
|
||||
{
|
||||
NodeRef node1 = nodeService.getChildByName(virtualFolder1NodeRef,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"Node1");
|
||||
assertNotNull(node1);
|
||||
String filename = "2015-11_11_1557_folder_empty_space.txt";
|
||||
fileAndFolderService.create(node1,
|
||||
filename,
|
||||
ContentModel.TYPE_CONTENT);
|
||||
fileAndFolderService.create(node1,
|
||||
filename,
|
||||
ContentModel.TYPE_CONTENT);
|
||||
assertNotNull(nodeService.getChildByName(node1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"2015-11_11_1557_folder_empty_space.txt"));
|
||||
assertNotNull(nodeService.getChildByName(node1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"2015-11_11_1557_folder_empty_space-1.txt"));
|
||||
assertNull(nodeService.getChildByName(node1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"2015-11_11_1557_folder_empty_space-2.txt"));
|
||||
|
||||
String suportedCharsFileName = "file~!@#$%^&-=+][';.,.txt";
|
||||
String suportedCharsFileName1 = "file~!@#$%^&-=+][';.,-1.txt";
|
||||
String suportedCharsFileName2 = "file~!@#$%^&-=+][';.,-2.txt";
|
||||
fileAndFolderService.create(node1,
|
||||
suportedCharsFileName,
|
||||
ContentModel.TYPE_CONTENT);
|
||||
fileAndFolderService.create(node1,
|
||||
suportedCharsFileName,
|
||||
ContentModel.TYPE_CONTENT);
|
||||
assertNotNull(nodeService.getChildByName(node1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
suportedCharsFileName));
|
||||
assertNotNull(nodeService.getChildByName(node1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
suportedCharsFileName1));
|
||||
assertNull(nodeService.getChildByName(node1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
suportedCharsFileName2));
|
||||
}
|
||||
|
||||
public void testHasAspect() throws Exception
|
||||
{
|
||||
// test for virtual folder
|
||||
NodeRef node1 = nodeService.getChildByName(virtualFolder1NodeRef,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"Node1");
|
||||
assertNotNull(node1);
|
||||
assertTrue(nodeService.hasAspect(node1,
|
||||
VirtualContentModel.ASPECT_VIRTUAL));
|
||||
assertFalse(nodeService.hasAspect(node1,
|
||||
VirtualContentModel.ASPECT_VIRTUAL_DOCUMENT));
|
||||
|
||||
// test for document in virtual context
|
||||
String filename = "testName.txt";
|
||||
NodeRef fileNodeRef = fileAndFolderService.create(node1,
|
||||
filename,
|
||||
ContentModel.TYPE_CONTENT).getNodeRef();
|
||||
assertFalse(nodeService.hasAspect(fileNodeRef,
|
||||
VirtualContentModel.ASPECT_VIRTUAL));
|
||||
assertTrue(nodeService.hasAspect(fileNodeRef,
|
||||
VirtualContentModel.ASPECT_VIRTUAL_DOCUMENT));
|
||||
|
||||
// test for folder in virtual context
|
||||
createFolder(testRootFolder.getNodeRef(),
|
||||
"FOLDER").getChildRef();
|
||||
NodeRef virtualFolder = createVirtualizedFolder(testRootFolder.getNodeRef(),
|
||||
VIRTUAL_FOLDER_2_NAME,
|
||||
TEST_TEMPLATE_6_JSON_SYS_PATH);
|
||||
NodeRef node1_1 = nodeService.getChildByName(virtualFolder,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"Node1");
|
||||
assertNotNull(node1_1);
|
||||
|
||||
NodeRef physicalFolderInVirtualContext = nodeService.getChildByName(node1_1,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"FOLDER");
|
||||
assertNotNull(physicalFolderInVirtualContext);
|
||||
|
||||
assertFalse(nodeService.hasAspect(physicalFolderInVirtualContext,
|
||||
VirtualContentModel.ASPECT_VIRTUAL));
|
||||
assertTrue(nodeService.hasAspect(physicalFolderInVirtualContext,
|
||||
VirtualContentModel.ASPECT_VIRTUAL_DOCUMENT));
|
||||
|
||||
//test the document created in a folder in virtual context
|
||||
createContent(physicalFolderInVirtualContext,
|
||||
"testFile1",
|
||||
"0",
|
||||
MimetypeMap.MIMETYPE_TEXT_PLAIN,
|
||||
"UTF-8");
|
||||
|
||||
NodeRef childFileNodeRef = nodeService.getChildByName(physicalFolderInVirtualContext,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
"testFile1");
|
||||
assertNotNull(childFileNodeRef);
|
||||
assertFalse(nodeService.hasAspect(childFileNodeRef,
|
||||
VirtualContentModel.ASPECT_VIRTUAL));
|
||||
assertFalse(nodeService.hasAspect(childFileNodeRef,
|
||||
VirtualContentModel.ASPECT_VIRTUAL_DOCUMENT));
|
||||
|
||||
}
|
||||
|
||||
private NodeRef createDownloadNode()
|
||||
{
|
||||
NodeRef createDownloadNode = downloadStorage.createDownloadNode(true);
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2015 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.virtual.store;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.JUnit4TestAdapter;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.site.SiteModel;
|
||||
import org.alfresco.repo.virtual.VirtualizationIntegrationTest;
|
||||
@@ -23,218 +47,348 @@ import org.alfresco.repo.virtual.ref.ResourceProcessor;
|
||||
import org.alfresco.repo.virtual.ref.VanillaProtocol;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.NamespaceException;
|
||||
import org.alfresco.service.namespace.NamespacePrefixResolver;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.junit.Test;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.internal.stubbing.answers.ThrowsException;
|
||||
|
||||
public class TypeVirtualizationMethodTest extends VirtualizationIntegrationTest
|
||||
public class TypeVirtualizationMethodTest extends TestSuite
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(TypeVirtualizationMethodTest.class);
|
||||
|
||||
private static final QName TEST_FOLDER_TYPE = SiteModel.TYPE_SITE;
|
||||
|
||||
private static final QName TEST_ASPECT = SiteModel.ASPECT_SITE_CONTAINER;
|
||||
|
||||
private TypeVirtualizationMethod typeVirtualizationMethod;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
public static class Integration extends VirtualizationIntegrationTest
|
||||
{
|
||||
super.setUp();
|
||||
typeVirtualizationMethod = ctx.getBean("typeVirtualizationMethod",
|
||||
TypeVirtualizationMethod.class);
|
||||
}
|
||||
private TypeVirtualizationMethod typeVirtualizationMethod;
|
||||
|
||||
@Override
|
||||
public void tearDown() throws Exception
|
||||
{
|
||||
super.tearDown();
|
||||
typeVirtualizationMethod.setQnameFilterRegexp(virtualizationConfigTestBootstrap
|
||||
.getTypeTemplatesQNameFilterRegexp());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRegExpFiltering() throws Exception
|
||||
{
|
||||
typeVirtualizationMethod.setQnameFilterRegexp("\\{.*site/1\\.0\\}site");
|
||||
|
||||
ChildAssociationRef typedNodeAssocRef = createTypedNode(testRootFolder.getNodeRef(),
|
||||
"TypeVirtualized",
|
||||
TEST_FOLDER_TYPE);
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typedNodeAssocRef.getChildRef()));
|
||||
|
||||
addTypeTemplate(TEST_FOLDER_TYPE,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typedNodeAssocRef.getChildRef()));
|
||||
|
||||
|
||||
typeVirtualizationMethod.setQnameFilterRegexp("\\{.*site/2\\.0\\}site");
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typedNodeAssocRef.getChildRef()));
|
||||
|
||||
//invalid regexp
|
||||
typeVirtualizationMethod.setQnameFilterRegexp("{.*site/1\\.0\\}site");
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typedNodeAssocRef.getChildRef()));
|
||||
|
||||
}
|
||||
|
||||
public void testVirtualizeCmFolder_recusive() throws Exception
|
||||
{
|
||||
ChildAssociationRef templateContentChildRef = addTypeTemplate(ContentModel.TYPE_FOLDER,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
virtualize(templateContentChildRef.getChildRef(),
|
||||
ContentModel.TYPE_FOLDER);
|
||||
}
|
||||
|
||||
public void testCanVirtualize() throws Exception
|
||||
{
|
||||
ChildAssociationRef typedNodeAssocRef = createTypedNode(testRootFolder.getNodeRef(),
|
||||
"TypeVirtualized",
|
||||
TEST_FOLDER_TYPE);
|
||||
NodeRef typeNode = typedNodeAssocRef.getChildRef();
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typeNode));
|
||||
|
||||
addTypeTemplate(TEST_FOLDER_TYPE,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typeNode));
|
||||
|
||||
}
|
||||
|
||||
public void testCanVirtualizeAspect() throws Exception
|
||||
{
|
||||
ChildAssociationRef aspectNodeAssocRef = createTypedNode(testRootFolder.getNodeRef(),
|
||||
"TypeVirtualized",
|
||||
ContentModel.TYPE_FOLDER);
|
||||
NodeRef aspectNode = aspectNodeAssocRef.getChildRef();
|
||||
|
||||
nodeService.addAspect(aspectNode,
|
||||
TEST_ASPECT,
|
||||
Collections.<QName, Serializable> emptyMap());
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
aspectNode));
|
||||
|
||||
addTypeTemplate(TEST_ASPECT,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
aspectNode));
|
||||
|
||||
}
|
||||
|
||||
public void testVirtualizeAspect() throws Exception
|
||||
{
|
||||
ChildAssociationRef templateContentChildRef = addTypeTemplate(TEST_ASPECT,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
virtualize(templateContentChildRef.getChildRef(),
|
||||
ContentModel.TYPE_FOLDER,
|
||||
TEST_ASPECT);
|
||||
}
|
||||
|
||||
public void testVirtualizeType() throws Exception
|
||||
{
|
||||
ChildAssociationRef templateContentChildRef = addTypeTemplate(TEST_FOLDER_TYPE,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
|
||||
virtualize(templateContentChildRef.getChildRef(),
|
||||
TEST_FOLDER_TYPE);
|
||||
}
|
||||
|
||||
private void virtualize(NodeRef expectedTemplateNodeRef, QName fodlerType, QName... aspects) throws Exception
|
||||
{
|
||||
|
||||
ChildAssociationRef typedNodeAssocRef = createTypedNode(testRootFolder.getNodeRef(),
|
||||
"TypeVirtualized",
|
||||
fodlerType);
|
||||
NodeRef typeNode = typedNodeAssocRef.getChildRef();
|
||||
|
||||
for (QName aspect : aspects)
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
{
|
||||
nodeService.addAspect(typeNode,
|
||||
aspect,
|
||||
Collections.<QName, Serializable> emptyMap());
|
||||
super.setUp();
|
||||
typeVirtualizationMethod = ctx.getBean("typeVirtualizationMethod",
|
||||
TypeVirtualizationMethod.class);
|
||||
}
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typeNode));
|
||||
@Override
|
||||
public void tearDown() throws Exception
|
||||
{
|
||||
super.tearDown();
|
||||
typeVirtualizationMethod.setQnameFilters(virtualizationConfigTestBootstrap.getTypeTemplatesQNameFilter());
|
||||
}
|
||||
|
||||
Reference theVirtualizedNode = typeVirtualizationMethod.virtualize(environment,
|
||||
typeNode);
|
||||
assertEquals(Protocols.VANILLA.protocol,
|
||||
theVirtualizedNode.getProtocol());
|
||||
public void testFiltering() throws Exception
|
||||
{
|
||||
typeVirtualizationMethod.setQnameFilters("st:site");
|
||||
|
||||
List<Parameter> parameters = theVirtualizedNode.getParameters();
|
||||
ResourceParameter vanillaResourceParameter = (ResourceParameter) parameters
|
||||
.get(VanillaProtocol.VANILLA_TEMPLATE_PARAM_INDEX);
|
||||
Resource vanillaResource = vanillaResourceParameter.getValue();
|
||||
ChildAssociationRef typedNodeAssocRef = createTypedNode(testRootFolder.getNodeRef(),
|
||||
"TypeVirtualized",
|
||||
TEST_FOLDER_TYPE);
|
||||
NodeRef virtuaChildRef = typedNodeAssocRef.getChildRef();
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
virtuaChildRef));
|
||||
|
||||
NodeRef resourceNodeRef = vanillaResource.processWith(new ResourceProcessor<NodeRef>()
|
||||
addTypeTemplate(TEST_FOLDER_TYPE,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
virtuaChildRef));
|
||||
|
||||
try
|
||||
{
|
||||
// invalid prefix
|
||||
typeVirtualizationMethod.setQnameFilters("invalid:site");
|
||||
fail("Should not be able to se invalib filters.");
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
// as expected
|
||||
}
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
virtuaChildRef));
|
||||
|
||||
typeVirtualizationMethod.setQnameFilters("alf:site");
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
virtuaChildRef));
|
||||
|
||||
typeVirtualizationMethod.setQnameFilters("st:*");
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
virtuaChildRef));
|
||||
|
||||
typeVirtualizationMethod.setQnameFilters("alf:site");
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
virtuaChildRef));
|
||||
|
||||
typeVirtualizationMethod.setQnameFilters("*");
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
virtuaChildRef));
|
||||
|
||||
typeVirtualizationMethod.setQnameFilters("none");
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
virtuaChildRef));
|
||||
|
||||
}
|
||||
|
||||
public void testVirtualizeCmFolder_recusive() throws Exception
|
||||
{
|
||||
ChildAssociationRef templateContentChildRef = addTypeTemplate(ContentModel.TYPE_FOLDER,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
virtualize(templateContentChildRef.getChildRef(),
|
||||
ContentModel.TYPE_FOLDER);
|
||||
}
|
||||
|
||||
public void testCanVirtualize() throws Exception
|
||||
{
|
||||
ChildAssociationRef typedNodeAssocRef = createTypedNode(testRootFolder.getNodeRef(),
|
||||
"TypeVirtualized",
|
||||
TEST_FOLDER_TYPE);
|
||||
NodeRef typeNode = typedNodeAssocRef.getChildRef();
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typeNode));
|
||||
|
||||
addTypeTemplate(TEST_FOLDER_TYPE,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typeNode));
|
||||
|
||||
}
|
||||
|
||||
public void testCanVirtualizeAspect() throws Exception
|
||||
{
|
||||
ChildAssociationRef aspectNodeAssocRef = createTypedNode(testRootFolder.getNodeRef(),
|
||||
"TypeVirtualized",
|
||||
ContentModel.TYPE_FOLDER);
|
||||
NodeRef aspectNode = aspectNodeAssocRef.getChildRef();
|
||||
|
||||
nodeService.addAspect(aspectNode,
|
||||
TEST_ASPECT,
|
||||
Collections.<QName, Serializable> emptyMap());
|
||||
|
||||
assertFalse(typeVirtualizationMethod.canVirtualize(environment,
|
||||
aspectNode));
|
||||
|
||||
addTypeTemplate(TEST_ASPECT,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
aspectNode));
|
||||
|
||||
}
|
||||
|
||||
public void testVirtualizeAspect() throws Exception
|
||||
{
|
||||
ChildAssociationRef templateContentChildRef = addTypeTemplate(TEST_ASPECT,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
virtualize(templateContentChildRef.getChildRef(),
|
||||
ContentModel.TYPE_FOLDER,
|
||||
TEST_ASPECT);
|
||||
}
|
||||
|
||||
public void testVirtualizeType() throws Exception
|
||||
{
|
||||
ChildAssociationRef templateContentChildRef = addTypeTemplate(TEST_FOLDER_TYPE,
|
||||
TEST_TEMPLATE_1_JS_CLASSPATH);
|
||||
|
||||
virtualize(templateContentChildRef.getChildRef(),
|
||||
TEST_FOLDER_TYPE);
|
||||
}
|
||||
|
||||
private void virtualize(NodeRef expectedTemplateNodeRef, QName fodlerType, QName... aspects) throws Exception
|
||||
{
|
||||
|
||||
@Override
|
||||
public NodeRef process(Resource resource) throws ResourceProcessingError
|
||||
ChildAssociationRef typedNodeAssocRef = createTypedNode(testRootFolder.getNodeRef(),
|
||||
"TypeVirtualized",
|
||||
fodlerType);
|
||||
NodeRef typeNode = typedNodeAssocRef.getChildRef();
|
||||
|
||||
for (QName aspect : aspects)
|
||||
{
|
||||
fail("Inavlid resource type");
|
||||
return null;
|
||||
nodeService.addAspect(typeNode,
|
||||
aspect,
|
||||
Collections.<QName, Serializable> emptyMap());
|
||||
}
|
||||
|
||||
@Override
|
||||
public NodeRef process(ClasspathResource classpath) throws ResourceProcessingError
|
||||
{
|
||||
fail("Inavlid resource type");
|
||||
return null;
|
||||
}
|
||||
assertTrue(typeVirtualizationMethod.canVirtualize(environment,
|
||||
typeNode));
|
||||
|
||||
@Override
|
||||
public NodeRef process(RepositoryResource repository) throws ResourceProcessingError
|
||||
{
|
||||
RepositoryLocation location = repository.getLocation();
|
||||
return location.asNodeRef(environment);
|
||||
}
|
||||
});
|
||||
Reference theVirtualizedNode = typeVirtualizationMethod.virtualize(environment,
|
||||
typeNode);
|
||||
assertEquals(Protocols.VANILLA.protocol,
|
||||
theVirtualizedNode.getProtocol());
|
||||
|
||||
assertEquals(expectedTemplateNodeRef,
|
||||
resourceNodeRef);
|
||||
List<Parameter> parameters = theVirtualizedNode.getParameters();
|
||||
ResourceParameter vanillaResourceParameter = (ResourceParameter) parameters
|
||||
.get(VanillaProtocol.VANILLA_TEMPLATE_PARAM_INDEX);
|
||||
Resource vanillaResource = vanillaResourceParameter.getValue();
|
||||
|
||||
NodeRef resourceNodeRef = vanillaResource.processWith(new ResourceProcessor<NodeRef>()
|
||||
{
|
||||
|
||||
@Override
|
||||
public NodeRef process(Resource resource) throws ResourceProcessingError
|
||||
{
|
||||
fail("Inavlid resource type");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NodeRef process(ClasspathResource classpath) throws ResourceProcessingError
|
||||
{
|
||||
fail("Inavlid resource type");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NodeRef process(RepositoryResource repository) throws ResourceProcessingError
|
||||
{
|
||||
RepositoryLocation location = repository.getLocation();
|
||||
return location.asNodeRef(environment);
|
||||
}
|
||||
});
|
||||
|
||||
assertEquals(expectedTemplateNodeRef,
|
||||
resourceNodeRef);
|
||||
}
|
||||
|
||||
private synchronized ChildAssociationRef addTypeTemplate(QName theType, String cp)
|
||||
{
|
||||
NodeRefExpression templatesLocationExpr = virtualizationConfigTestBootstrap.getTypeTemplatesPath();
|
||||
NodeRef templatesLocation = templatesLocationExpr.resolve();
|
||||
|
||||
assertNotNull(templatesLocation);
|
||||
|
||||
final String prefixedType = theType.toPrefixString(environment.getNamespacePrefixResolver());
|
||||
String contentName = prefixedType;
|
||||
contentName = contentName.replaceAll(":",
|
||||
"_")
|
||||
+ ".json";
|
||||
|
||||
InputStream testTemplsteJsonIS = getClass().getResourceAsStream(cp);
|
||||
ChildAssociationRef templateContentChildRef = createContent(templatesLocation,
|
||||
contentName,
|
||||
testTemplsteJsonIS,
|
||||
"application/json",
|
||||
"UTF-8",
|
||||
ContentModel.TYPE_CONTENT);
|
||||
|
||||
typeVirtualizationMethod.setQnameFilters(prefixedType);
|
||||
|
||||
return templateContentChildRef;
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized ChildAssociationRef addTypeTemplate(QName theType, String cp)
|
||||
public static class Unit extends TestCase
|
||||
{
|
||||
NodeRefExpression templatesLocationExpr = virtualizationConfigTestBootstrap.getTypeTemplatesPath();
|
||||
NodeRef templatesLocation = templatesLocationExpr.resolve();
|
||||
public void testQNameFiltersSetter_invalidFilters() throws Exception
|
||||
{
|
||||
assertIllegalQNameFilters(null,
|
||||
this);
|
||||
assertIllegalQNameFilters("",
|
||||
this);
|
||||
assertIllegalQNameFilters(":",
|
||||
this);
|
||||
assertIllegalQNameFilters("vm:",
|
||||
this);
|
||||
assertIllegalQNameFilters(":vm",
|
||||
this);
|
||||
assertIllegalQNameFilters("vm:fooBar,vm:",
|
||||
this);
|
||||
// undefined prefix
|
||||
assertIllegalQNameFilters("vm:anAspect",
|
||||
this);
|
||||
}
|
||||
|
||||
assertNotNull(templatesLocation);
|
||||
public void testQNameFiltersSetter_validFilters() throws Exception
|
||||
{
|
||||
assertQNameFilters("st:site",
|
||||
this);
|
||||
assertQNameFilters("st:site,cm:folder",
|
||||
this);
|
||||
assertQNameFilters("st:site,cm:test-folder",
|
||||
this);
|
||||
assertQNameFilters("st:*",
|
||||
this);
|
||||
assertQNameFilters("st:*,cm:*",
|
||||
this);
|
||||
|
||||
final String prefixedType = theType.toPrefixString(environment.getNamespacePrefixResolver());
|
||||
String contentName = prefixedType;
|
||||
contentName = contentName.replaceAll(":",
|
||||
"_") + ".json";
|
||||
assertQNameFilters("*",
|
||||
this);
|
||||
|
||||
InputStream testTemplsteJsonIS = getClass().getResourceAsStream(cp);
|
||||
ChildAssociationRef templateContentChildRef = createContent(templatesLocation,
|
||||
contentName,
|
||||
testTemplsteJsonIS,
|
||||
"application/json",
|
||||
"UTF-8",
|
||||
ContentModel.TYPE_CONTENT);
|
||||
assertQNameFilters("none",
|
||||
this);
|
||||
|
||||
String regexp = theType.toString();
|
||||
regexp = regexp.replaceAll("\\{",
|
||||
"\\\\{");
|
||||
regexp = regexp.replaceAll("\\}",
|
||||
"\\\\}");
|
||||
regexp = regexp.replaceAll("\\:",
|
||||
"\\\\:");
|
||||
regexp = regexp.replaceAll("\\.",
|
||||
"\\\\.");
|
||||
typeVirtualizationMethod.setQnameFilterRegexp(regexp);
|
||||
}
|
||||
}
|
||||
|
||||
return templateContentChildRef;
|
||||
private static NamespacePrefixResolver mockNamespacePrefixResolver()
|
||||
{
|
||||
NamespacePrefixResolver mockNamespacePrefixResolver = Mockito.mock(NamespacePrefixResolver.class,
|
||||
|
||||
new ThrowsException(new NamespaceException("Mock exception ")));
|
||||
|
||||
Mockito
|
||||
.doReturn(Arrays.<String> asList(SiteModel.SITE_MODEL_PREFIX))
|
||||
.when(mockNamespacePrefixResolver)
|
||||
.getPrefixes(SiteModel.SITE_MODEL_URL);
|
||||
Mockito.doReturn(SiteModel.SITE_MODEL_URL).when(mockNamespacePrefixResolver).getNamespaceURI(
|
||||
SiteModel.SITE_MODEL_PREFIX);
|
||||
|
||||
Mockito
|
||||
.doReturn(Arrays.<String> asList(NamespaceService.CONTENT_MODEL_PREFIX))
|
||||
.when(mockNamespacePrefixResolver)
|
||||
.getPrefixes(NamespaceService.CONTENT_MODEL_1_0_URI);
|
||||
Mockito.doReturn(NamespaceService.CONTENT_MODEL_1_0_URI).when(mockNamespacePrefixResolver).getNamespaceURI(
|
||||
NamespaceService.CONTENT_MODEL_PREFIX);
|
||||
|
||||
Mockito
|
||||
.doReturn("mock(NamespacePrefixResolver)@" + TypeVirtualizationMethod.class.toString())
|
||||
.when(mockNamespacePrefixResolver)
|
||||
.toString();
|
||||
return mockNamespacePrefixResolver;
|
||||
}
|
||||
|
||||
private static void assertIllegalQNameFilters(String filters, TestCase test)
|
||||
{
|
||||
TypeVirtualizationMethod tvm = new TypeVirtualizationMethod();
|
||||
try
|
||||
{
|
||||
tvm.setNamespacePrefixResolver(mockNamespacePrefixResolver());
|
||||
tvm.setQnameFilters(filters);
|
||||
TestCase.fail("Should not be able to set filters string " + filters);
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
// void as expected
|
||||
logger.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private static void assertQNameFilters(String filters, TestCase test)
|
||||
{
|
||||
TypeVirtualizationMethod tvm = new TypeVirtualizationMethod();
|
||||
tvm.setNamespacePrefixResolver(mockNamespacePrefixResolver());
|
||||
tvm.setQnameFilters(filters);
|
||||
}
|
||||
|
||||
public static Test suite()
|
||||
{
|
||||
TestSuite suite = new TestSuite();
|
||||
suite.addTest(new JUnit4TestAdapter(Integration.class));
|
||||
suite.addTest(new JUnit4TestAdapter(Unit.class));
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
@@ -22,19 +22,69 @@ package org.alfresco.repo.virtual.template;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.virtual.VirtualizationIntegrationTest;
|
||||
import org.alfresco.repo.virtual.ref.NewVirtualReferenceMethod;
|
||||
import org.alfresco.repo.virtual.ref.Protocols;
|
||||
import org.alfresco.repo.virtual.ref.Reference;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ApplyTemplateMethodTest extends VirtualizationIntegrationTest
|
||||
{
|
||||
@Test
|
||||
public void testExecute_vanillaISO9075ActualPath() throws Exception
|
||||
{
|
||||
ChildAssociationRef iso9075FolderAssoc = createFolder(testRootFolder.getNodeRef(),
|
||||
"Acutal ISO9075 Node");
|
||||
NodeRef iso9075Folder = iso9075FolderAssoc.getChildRef();
|
||||
|
||||
NewVirtualReferenceMethod newVirtualReferenceMethod = new NewVirtualReferenceMethod(TEST_TEMPLATE_5_JSON_SYS_PATH,
|
||||
"/",
|
||||
iso9075Folder,
|
||||
VANILLA_PROCESSOR_JS_CLASSPATH);
|
||||
|
||||
ApplyTemplateMethod applyTemplateMethod = new ApplyTemplateMethod(environment);
|
||||
|
||||
Reference ref = Protocols.VANILLA.protocol.dispatch(newVirtualReferenceMethod,
|
||||
null);
|
||||
VirtualFolderDefinition structure = ref.execute(applyTemplateMethod);
|
||||
|
||||
VirtualFolderDefinition sfp5 = structure.findChildByName("SpecialFilingPath5");
|
||||
VirtualQuery query = sfp5.getQuery();
|
||||
|
||||
assertEquals("(PATH:'/app:company_home/cm:TestFolder/cm:Acutal_x0020_ISO9075_x0020_Node/cm:Space_x0020_Sub_x0020_Folder/*') and =cm:description:'SpecialFilingPath_5'",
|
||||
query.getQueryString());
|
||||
|
||||
ChildAssociationRef iso9075SubFolderAssoc = createFolder(iso9075Folder,
|
||||
"Space Sub Folder");
|
||||
|
||||
ChildAssociationRef someContentAssoc = createContent(iso9075SubFolderAssoc.getChildRef(),
|
||||
"someContent");
|
||||
|
||||
nodeService.setProperty(someContentAssoc.getChildRef(),
|
||||
ContentModel.PROP_DESCRIPTION,
|
||||
"SpecialFilingPath_5");
|
||||
|
||||
// check query for validity
|
||||
SearchParameters searchParameters = new SearchParameters();
|
||||
|
||||
searchParameters.setQuery(query.getQueryString());
|
||||
searchParameters.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
||||
searchParameters.setLanguage(query.getLanguage());
|
||||
ResultSet qresult = searchService.query(searchParameters);
|
||||
assertEquals(1,
|
||||
qresult.getNumberFound());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExecuteSysClasspath() throws Exception
|
||||
public void testExecute_virtualSysClasspath() throws Exception
|
||||
{
|
||||
ApplyTemplateMethod applyTemplateMethod = new ApplyTemplateMethod(environment);
|
||||
|
||||
@@ -66,7 +116,7 @@ public class ApplyTemplateMethodTest extends VirtualizationIntegrationTest
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExecuteRepositoryJSON() throws Exception
|
||||
public void testExecute_vanillaRepositoryJSON() throws Exception
|
||||
{
|
||||
ChildAssociationRef templateAssoc = createContent(testRootFolder.getNodeRef(),
|
||||
"template1.json",
|
||||
|
@@ -28,7 +28,7 @@ import org.junit.Test;
|
||||
public class TemplateFilingRuleTest extends VirtualizationIntegrationTest
|
||||
{
|
||||
@Test
|
||||
public void testISO9075FilingSubPath() throws Exception
|
||||
public void testFilingSubPath_specialCharacters() throws Exception
|
||||
{
|
||||
NodeRef vfNodeRef = createVirtualizedFolder(testRootFolder.getNodeRef(),
|
||||
"Template 6 With Spaces",
|
||||
@@ -56,7 +56,7 @@ public class TemplateFilingRuleTest extends VirtualizationIntegrationTest
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testISO9075FilingPath() throws Exception
|
||||
public void testFilingPath_specialCharacters() throws Exception
|
||||
{
|
||||
NodeRef vfNodeRef = createVirtualizedFolder(testRootFolder.getNodeRef(),
|
||||
"Template 6 With Spaces",
|
||||
|
Reference in New Issue
Block a user