public abstract class DeclarativeSpreadsheetWebScript
extends org.springframework.extensions.webscripts.DeclarativeWebScript
| Modifier and Type | Class and Description |
|---|---|
static class |
DeclarativeSpreadsheetWebScript.WriteExcel |
| Modifier and Type | Field and Description |
|---|---|
protected org.alfresco.service.cmr.dictionary.DictionaryService |
dictionaryService |
protected java.lang.String |
filenameBase |
static java.lang.String |
MODEL_CSV |
static java.lang.String |
MODEL_EXCEL |
| Constructor and Description |
|---|
DeclarativeSpreadsheetWebScript() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
allowHtmlFallback()
If the format is requested as HTML, should an exception be raised,
or should an HTML version be called?
|
protected abstract java.util.List |
buildPropertiesForHeader(java.lang.Object resource,
java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req)
Returns the QNames of the model properties to be output in
the header, and if they're required or not
|
protected java.util.Map |
createTemplateParameters(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
java.util.Map customParams) |
protected java.util.Map |
executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status) |
void |
generateSpreadsheet(java.lang.Object resource,
java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status,
java.util.Map model)
Generates the spreadsheet, based on the properties in the header
and a callback for the body.
|
protected abstract java.lang.Object |
identifyResource(java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req)
Identifies the resource for the webscript.
|
protected abstract void |
populateBody(java.lang.Object resource,
org.apache.commons.csv.CSVPrinter csv,
java.util.List properties)
Populates the body of the CSV file, once the header has been
output.
|
protected abstract void |
populateBody(java.lang.Object resource,
org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
java.util.List properties)
Populates the body of the Excel Workbook, once the header has been
output.
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplateaddModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toStringpublic static final java.lang.String MODEL_CSV
public static final java.lang.String MODEL_EXCEL
protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
protected java.lang.String filenameBase
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService - the DictionaryService to setprotected abstract java.lang.Object identifyResource(java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req)
protected abstract boolean allowHtmlFallback()
protected abstract java.util.List buildPropertiesForHeader(java.lang.Object resource,
java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req)
protected abstract void populateBody(java.lang.Object resource,
org.apache.poi.ss.usermodel.Workbook workbook,
org.apache.poi.ss.usermodel.Sheet sheet,
java.util.List properties)
throws java.io.IOException
java.io.IOExceptionprotected abstract void populateBody(java.lang.Object resource,
org.apache.commons.csv.CSVPrinter csv,
java.util.List properties)
throws java.io.IOException
java.io.IOExceptionprotected java.util.Map executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status)
executeImpl in class org.springframework.extensions.webscripts.DeclarativeWebScriptorg.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status)public void generateSpreadsheet(java.lang.Object resource,
java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status,
java.util.Map model)
throws java.io.IOException
java.io.IOExceptionprotected java.util.Map createTemplateParameters(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.WebScriptResponse res,
java.util.Map customParams)
createTemplateParameters in class org.springframework.extensions.webscripts.AbstractWebScriptCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.