Class DataListDownloadWebScript
- java.lang.Object
-
- org.springframework.extensions.webscripts.AbstractWebScript
-
- org.springframework.extensions.webscripts.DeclarativeWebScript
-
- org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript
-
- org.alfresco.repo.web.scripts.datalist.DataListDownloadWebScript
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,org.springframework.extensions.webscripts.WebScript
public class DataListDownloadWebScript extends DeclarativeSpreadsheetWebScript implements org.springframework.beans.factory.InitializingBean
Data List Download Exports the contents of a Data List as an Excel file- Author:
- Nick Burch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript
DeclarativeSpreadsheetWebScript.WriteExcel
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript
dictionaryService, filenameBase, MODEL_CSV, MODEL_EXCEL, PARAM_REQ_DELIMITER
-
-
Constructor Summary
Constructors Constructor Description DataListDownloadWebScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
protected boolean
allowHtmlFallback()
We don't have a HTML versionprotected List<Pair<org.alfresco.service.namespace.QName,Boolean>>
buildPropertiesForHeader(Object resource, String format, org.springframework.extensions.webscripts.WebScriptRequest req)
Fetch the properties, in the requested order, from the data list definitionprotected Object
identifyResource(String format, org.springframework.extensions.webscripts.WebScriptRequest req)
Identify the datalistprotected void
populateBody(Object resource, org.apache.commons.csv.CSVPrinter csv, List<org.alfresco.service.namespace.QName> properties)
protected void
populateBody(Object resource, org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.Sheet sheet, List<org.alfresco.service.namespace.QName> properties)
void
setModelOrder(Map<String,String> rawModelOrder)
void
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
void
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
void
setSiteService(org.alfresco.service.cmr.site.SiteService siteService)
-
Methods inherited from class org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript
createTemplateParameters, executeImpl, generateSpreadsheet, getCsvFormat, setCsvFormat, setDictionaryService
-
Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
-
Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
-
-
-
-
Method Detail
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
- Parameters:
nodeService
- NodeService
-
setSiteService
public void setSiteService(org.alfresco.service.cmr.site.SiteService siteService)
- Parameters:
siteService
- SiteService
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
- Parameters:
namespaceService
- NamespaceService
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
identifyResource
protected Object identifyResource(String format, org.springframework.extensions.webscripts.WebScriptRequest req)
Identify the datalist- Specified by:
identifyResource
in classDeclarativeSpreadsheetWebScript
-
allowHtmlFallback
protected boolean allowHtmlFallback()
We don't have a HTML version- Specified by:
allowHtmlFallback
in classDeclarativeSpreadsheetWebScript
-
buildPropertiesForHeader
protected List<Pair<org.alfresco.service.namespace.QName,Boolean>> buildPropertiesForHeader(Object resource, String format, org.springframework.extensions.webscripts.WebScriptRequest req)
Fetch the properties, in the requested order, from the data list definition- Specified by:
buildPropertiesForHeader
in classDeclarativeSpreadsheetWebScript
-
populateBody
protected void populateBody(Object resource, org.apache.commons.csv.CSVPrinter csv, List<org.alfresco.service.namespace.QName> properties) throws IOException
- Specified by:
populateBody
in classDeclarativeSpreadsheetWebScript
- Throws:
IOException
-
populateBody
protected void populateBody(Object resource, org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.Sheet sheet, List<org.alfresco.service.namespace.QName> properties) throws IOException
- Specified by:
populateBody
in classDeclarativeSpreadsheetWebScript
- Throws:
IOException
-
-