mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Tagging Service: tag scope refresh added. Async action execution policy added.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10288 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -80,6 +80,7 @@ public class StreamContent extends AbstractWebScript
|
|||||||
// Logger
|
// Logger
|
||||||
private static final Log logger = LogFactory.getLog(StreamContent.class);
|
private static final Log logger = LogFactory.getLog(StreamContent.class);
|
||||||
|
|
||||||
|
/** Services */
|
||||||
protected PermissionService permissionService;
|
protected PermissionService permissionService;
|
||||||
protected NodeService nodeService;
|
protected NodeService nodeService;
|
||||||
protected ContentService contentService;
|
protected ContentService contentService;
|
||||||
@@ -89,6 +90,9 @@ public class StreamContent extends AbstractWebScript
|
|||||||
private String basePath;
|
private String basePath;
|
||||||
private ScriptContent executeScript;
|
private ScriptContent executeScript;
|
||||||
|
|
||||||
|
/** Cached file modified date */
|
||||||
|
private Date resouceFileModifiedDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mimetypeService
|
* @param mimetypeService
|
||||||
*/
|
*/
|
||||||
@@ -402,9 +406,12 @@ public class StreamContent extends AbstractWebScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a date in the past
|
// Create a date in the past
|
||||||
|
if (this.resouceFileModifiedDate == null)
|
||||||
|
{
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
calendar.set(1975, 3, 26);
|
calendar.set(1975, 3, 26);
|
||||||
|
this.resouceFileModifiedDate = calendar.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
File file = TempFileProvider.createTempFile("streamContent-", ext);
|
File file = TempFileProvider.createTempFile("streamContent-", ext);
|
||||||
InputStream is = this.getClass().getClassLoader().getResourceAsStream(resourcePath);
|
InputStream is = this.getClass().getClassLoader().getResourceAsStream(resourcePath);
|
||||||
@@ -415,7 +422,7 @@ public class StreamContent extends AbstractWebScript
|
|||||||
reader.setMimetype(mimetype);
|
reader.setMimetype(mimetype);
|
||||||
reader.setEncoding("UTF-8");
|
reader.setEncoding("UTF-8");
|
||||||
|
|
||||||
streamContentImpl(req, res, reader, attach, calendar.getTime());
|
streamContentImpl(req, res, reader, attach, this.resouceFileModifiedDate);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user