mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added a raw download servlet at URL http://.../alfresco/dr?contentUrl=...?ticket=...
Added ContentService.getRawReader to get content directly using a content URL. To access this, you need to be admin. Fixed EHCacheAdapter to handle non-Serializable values. Added tests for above and for AbstractRoutingContentStore. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5841 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -269,6 +269,21 @@ public class RoutingContentServiceTest extends TestCase
|
||||
assertNull("Reader must be null if the content URL is null", reader);
|
||||
}
|
||||
|
||||
public void testGetRawReader() throws Exception
|
||||
{
|
||||
ContentReader reader = contentService.getRawReader("blah");
|
||||
assertNotNull("A reader is expected with content URL referencing no content", reader);
|
||||
assertFalse("Reader should not have any content", reader.exists());
|
||||
// Now write something
|
||||
ContentWriter writer = contentService.getWriter(contentNodeRef, ContentModel.PROP_CONTENT, false);
|
||||
writer.putContent("ABC from " + getName());
|
||||
// Try again
|
||||
String contentUrl = writer.getContentUrl();
|
||||
reader = contentService.getRawReader(contentUrl);
|
||||
assertNotNull("Expected reader for live, raw content", reader);
|
||||
assertEquals("Content sizes don't match", writer.getSize(), reader.getSize());
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks what happens when the physical content disappears
|
||||
*/
|
||||
|
Reference in New Issue
Block a user