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.WriteExcelNested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails -
Field Summary
Fields inherited from class org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript
dictionaryService, filenameBase, MODEL_CSV, MODEL_EXCEL, PARAM_REQ_DELIMITER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected booleanWe don't have a HTML versionbuildPropertiesForHeader(Object resource, String format, org.springframework.extensions.webscripts.WebScriptRequest req) Fetch the properties, in the requested order, from the data list definitionprotected ObjectidentifyResource(String format, org.springframework.extensions.webscripts.WebScriptRequest req) Identify the datalistprotected voidpopulateBody(Object resource, org.apache.commons.csv.CSVPrinter csv, List<org.alfresco.service.namespace.QName> properties) protected voidpopulateBody(Object resource, org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.Sheet sheet, List<org.alfresco.service.namespace.QName> properties) voidsetModelOrder(Map<String, String> rawModelOrder) voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) voidsetSiteService(org.alfresco.service.cmr.site.SiteService siteService) Methods inherited from class org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript
createTemplateParameters, executeImpl, generateSpreadsheet, getCsvFormat, setCsvFormat, setDictionaryServiceMethods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplateMethods 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
-
Constructor Details
-
DataListDownloadWebScript
public DataListDownloadWebScript()
-
-
Method Details
-
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
-
setModelOrder
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
identifyResource
protected Object identifyResource(String format, org.springframework.extensions.webscripts.WebScriptRequest req) Identify the datalist- Specified by:
identifyResourcein classDeclarativeSpreadsheetWebScript
-
allowHtmlFallback
protected boolean allowHtmlFallback()We don't have a HTML version- Specified by:
allowHtmlFallbackin 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:
buildPropertiesForHeaderin classDeclarativeSpreadsheetWebScript
-
populateBody
protected void populateBody(Object resource, org.apache.commons.csv.CSVPrinter csv, List<org.alfresco.service.namespace.QName> properties) throws IOException - Specified by:
populateBodyin 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:
populateBodyin classDeclarativeSpreadsheetWebScript- Throws:
IOException
-