public class StreamContent
extends org.springframework.extensions.webscripts.AbstractWebScript
| Modifier and Type | Field and Description |
|---|---|
protected ContentStreamer |
delegate |
protected MimetypeService |
mimetypeService |
protected NodeService |
nodeService |
protected PermissionService |
permissionService
Services
|
| Constructor and Description |
|---|
StreamContent() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res) |
protected Map<String,Object> |
executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status)
Deprecated.
|
protected Map<String,Object> |
executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache)
Execute custom Java logic
|
protected Map<String,Object> |
executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptStatus status)
Deprecated.
|
protected void |
renderFormatTemplate(String format,
Map<String,Object> model,
Writer writer)
Render a template (of given format) to the Web Script Response
|
protected void |
setAttachment(org.springframework.extensions.webscripts.WebScriptResponse res,
boolean attach,
String attachFileName)
Set attachment header
|
void |
setDelegate(ContentStreamer delegate) |
void |
setMimetypeService(MimetypeService mimetypeService) |
void |
setNodeService(NodeService nodeService) |
void |
setPermissionService(PermissionService permissionService) |
protected void |
streamContent(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
File file)
Streams content back to client from a given File.
|
protected void |
streamContent(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
File file,
boolean attach,
String attachFileName,
Map<String,Object> model)
Streams content back to client from a given File.
|
protected void |
streamContent(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName,
boolean attach,
String attachFileName,
Map<String,Object> model)
Streams the content on a given node's content property to the response of the web script.
|
protected void |
streamContentImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
ContentReader reader,
NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName,
boolean attach,
Date modified,
String eTag,
String attachFileName,
Map<String,Object> model)
Stream content implementation
|
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toStringprotected PermissionService permissionService
protected NodeService nodeService
protected MimetypeService mimetypeService
protected ContentStreamer delegate
public void setMimetypeService(MimetypeService mimetypeService)
mimetypeService - public void setPermissionService(PermissionService permissionService)
permissionService - public void setNodeService(NodeService nodeService)
nodeService - public void setDelegate(ContentStreamer delegate)
delegate - public void execute(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res)
throws IOException
IOExceptionorg.alfresco.web.scripts.WebScript#execute(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.WebScriptResponse)protected void setAttachment(org.springframework.extensions.webscripts.WebScriptResponse res,
boolean attach,
String attachFileName)
res - attach - attachFileName - protected void streamContent(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
File file)
throws IOException
req - The requestres - The responsefile - The file whose content is to be streamed.IOExceptionprotected void streamContent(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
File file,
boolean attach,
String attachFileName,
Map<String,Object> model)
throws IOException
req - The requestres - The responsefile - The file whose content is to be streamed.attach - Indicates whether the content should be streamed as an attachment or notattachFileName - Optional file name to use when attach is trueIOExceptionprotected void streamContent(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName,
boolean attach,
String attachFileName,
Map<String,Object> model)
throws IOException
req - Requestres - ResponsenodeRef - The node referencepropertyQName - The content property nameattach - Indicates whether the content should be streamed as an attachment or notattachFileName - Optional file name to use when attach is trueIOExceptionprotected void streamContentImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
ContentReader reader,
NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName,
boolean attach,
Date modified,
String eTag,
String attachFileName,
Map<String,Object> model)
throws IOException
req - The requestres - The responsereader - The readernodeRef - The content nodeRef if applicablepropertyQName - The content property if applicableattach - Indicates whether the content should be streamed as an attachment or notmodified - Modified date of contenteTag - ETag to useattachFileName - Optional file name to use when attach is trueIOExceptionprotected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptStatus status)
req - Web Script requeststatus - Web Script statusprotected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status)
req - Web Script requeststatus - Web Script statusprotected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
req - Web Script requeststatus - Web Script statuscache - Web Script cacheCopyright © 2005–2014 Alfresco Software. All rights reserved.