mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed WebDAV missing content handling
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2374 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -300,7 +300,7 @@ public class ContentNetworkFile extends NetworkFile
|
||||
// ensure that the content we are going to read is valid
|
||||
content = FileContentReader.getSafeContentReader(
|
||||
(ContentReader) content,
|
||||
I18NUtil.getMessage("content.content_missing"),
|
||||
I18NUtil.getMessage(FileContentReader.MSG_MISSING_CONTENT),
|
||||
nodeRef, content);
|
||||
|
||||
// Indicate that we only have a read-only channel to the data
|
||||
|
@@ -43,6 +43,15 @@ import org.apache.commons.logging.LogFactory;
|
||||
*/
|
||||
public class FileContentReader extends AbstractContentReader
|
||||
{
|
||||
/**
|
||||
* message key for missing content. Parameters are
|
||||
* <ul>
|
||||
* <li>{@link org.alfresco.service.cmr.repository.NodeRef NodeRef}</li>
|
||||
* <li>{@link ContentReader ContentReader}</li>
|
||||
* </ul>
|
||||
*/
|
||||
public static final String MSG_MISSING_CONTENT = "content.content_missing";
|
||||
|
||||
private static final Log logger = LogFactory.getLog(FileContentReader.class);
|
||||
|
||||
private File file;
|
||||
@@ -56,7 +65,7 @@ public class FileContentReader extends AbstractContentReader
|
||||
* It is a convenience method that clients can use to cheaply get a reader that
|
||||
* is valid, regardless of whether the initial reader is valid.
|
||||
*
|
||||
* @param existingReader a potentially valid reader
|
||||
* @param existingReader a potentially invalid reader or null
|
||||
* @param msgTemplate the template message that will used to format the final <i>fake</i> content
|
||||
* @param args arguments to put into the <i>fake</i> content
|
||||
* @return Returns a the existing reader or a new reader onto some generated text content
|
||||
|
Reference in New Issue
Block a user