org.alfresco.repo.web.scripts.datalist
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
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript |
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails |
Method Summary |
void |
afterPropertiesSet()
|
protected boolean |
allowHtmlFallback()
We don't have a HTML version |
protected java.util.List |
buildPropertiesForHeader(java.lang.Object resource,
java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req)
Fetch the properties, in the requested order, from
the data list definition |
protected java.lang.Object |
identifyResource(java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req)
Identify the datalist |
protected 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 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 |
setModelOrder(java.util.Map 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.springframework.extensions.webscripts.DeclarativeWebScript |
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate |
Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript |
createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DataListDownloadWebScript
public DataListDownloadWebScript()
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
- Parameters:
nodeService
-
setSiteService
public void setSiteService(org.alfresco.service.cmr.site.SiteService siteService)
- Parameters:
nodeService
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
- Parameters:
namespaceService
-
setModelOrder
public void setModelOrder(java.util.Map rawModelOrder)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
identifyResource
protected java.lang.Object identifyResource(java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req)
- Identify the datalist
- Specified by:
identifyResource
in class DeclarativeSpreadsheetWebScript
allowHtmlFallback
protected boolean allowHtmlFallback()
- We don't have a HTML version
- Specified by:
allowHtmlFallback
in class DeclarativeSpreadsheetWebScript
buildPropertiesForHeader
protected java.util.List buildPropertiesForHeader(java.lang.Object resource,
java.lang.String format,
org.springframework.extensions.webscripts.WebScriptRequest req)
- Fetch the properties, in the requested order, from
the data list definition
- Specified by:
buildPropertiesForHeader
in class DeclarativeSpreadsheetWebScript
populateBody
protected void populateBody(java.lang.Object resource,
org.apache.commons.csv.CSVPrinter csv,
java.util.List properties)
throws java.io.IOException
- Description copied from class:
DeclarativeSpreadsheetWebScript
- Populates the body of the CSV file, once the header has been
output.
This is called if the format is .csv
- Specified by:
populateBody
in class DeclarativeSpreadsheetWebScript
- Throws:
java.io.IOException
populateBody
protected 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
- Description copied from class:
DeclarativeSpreadsheetWebScript
- Populates the body of the Excel Workbook, once the header has been
output.
This is called if the format is .xls or .xlsx
- Specified by:
populateBody
in class DeclarativeSpreadsheetWebScript
- Throws:
java.io.IOException
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.