Search in sources :

Example 11 with VirtualizationException

use of org.alfresco.repo.virtual.VirtualizationException in project alfresco-repository by Alfresco.

the class SystemVirtualizationMethodTest method testDefaultSyspath.

@Test
public void testDefaultSyspath() throws Exception {
    NodeRef vf = createVirtualizedFolder(testRootFolder.getNodeRef(), "SystemVirtualizationMethodTest_testDefaultSyspath", null);
    assertFalse(systemVirtualizationMethod.canVirtualize(environment, vf));
    try {
        systemVirtualizationMethod.virtualize(environment, vf);
        fail("Should not be able to virtualize non-virtualizable nodes.");
    } catch (VirtualizationException e) {
        logger.info(e);
    }
}
Also used : NodeRef(org.alfresco.service.cmr.repository.NodeRef) VirtualizationException(org.alfresco.repo.virtual.VirtualizationException) Test(org.junit.Test) VirtualizationIntegrationTest(org.alfresco.repo.virtual.VirtualizationIntegrationTest)

Example 12 with VirtualizationException

use of org.alfresco.repo.virtual.VirtualizationException in project alfresco-repository by Alfresco.

the class VirtualStoreImplTest method testNonVirtualizable.

@Test
public void testNonVirtualizable() throws Exception {
    NodeRef aNodeRef = createVirtualizedFolder(testRootFolder.getNodeRef(), "TestVirtualStoreImpl_createVirtualizedFolder", null);
    assertFalse(smartStore.canVirtualize(aNodeRef));
    try {
        smartStore.virtualize(aNodeRef);
        fail("Should not be able to virtualize non-virtualizable nodes.");
    } catch (VirtualizationException e) {
        logger.info(e);
    }
}
Also used : NodeRef(org.alfresco.service.cmr.repository.NodeRef) VirtualizationException(org.alfresco.repo.virtual.VirtualizationException) ApplyTemplateMethodTest(org.alfresco.repo.virtual.template.ApplyTemplateMethodTest) Test(org.junit.Test) VirtualizationIntegrationTest(org.alfresco.repo.virtual.VirtualizationIntegrationTest)

Aggregations

VirtualizationException (org.alfresco.repo.virtual.VirtualizationException)12 NodeRef (org.alfresco.service.cmr.repository.NodeRef)9 Reference (org.alfresco.repo.virtual.ref.Reference)5 PagingRequest (org.alfresco.query.PagingRequest)3 PageCollationException (org.alfresco.repo.virtual.page.PageCollationException)3 PagingResultsSource (org.alfresco.repo.virtual.page.PageCollator.PagingResultsSource)3 ChildAssociationRef (org.alfresco.service.cmr.repository.ChildAssociationRef)3 QName (org.alfresco.service.namespace.QName)3 PermissionReference (org.alfresco.repo.security.permissions.PermissionReference)2 VirtualizationIntegrationTest (org.alfresco.repo.virtual.VirtualizationIntegrationTest)2 VirtualFolderDefinition (org.alfresco.repo.virtual.template.VirtualFolderDefinition)2 FileInfo (org.alfresco.service.cmr.model.FileInfo)2 Test (org.junit.Test)2 IOException (java.io.IOException)1 Serializable (java.io.Serializable)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 PatternSyntaxException (java.util.regex.PatternSyntaxException)1 ListBackedPagingResults (org.alfresco.query.ListBackedPagingResults)1