mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Allow other types of content URLs other than store://...
Enforce restriction that all content URLs must be of form protocol://identifier Allow for read-only stores. Improved tests so that it is easier, when writing a new store, to determine if the store is compliant or not. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5899 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -272,7 +272,16 @@ public class RoutingContentService implements ContentService
|
||||
/** {@inheritDoc} */
|
||||
public ContentReader getRawReader(String contentUrl)
|
||||
{
|
||||
ContentReader reader = store.getReader(contentUrl);
|
||||
ContentReader reader = null;
|
||||
try
|
||||
{
|
||||
reader = store.getReader(contentUrl);
|
||||
}
|
||||
catch (UnsupportedContentUrlException e)
|
||||
{
|
||||
// The URL is not supported, so we spoof it
|
||||
reader = new EmptyContentReader(contentUrl);
|
||||
}
|
||||
if (reader == null)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("ContentStore implementations may not return null ContentReaders");
|
||||
|
Reference in New Issue
Block a user