Class UserCSVUploadGet
java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.DeclarativeWebScript
org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript
org.alfresco.repo.web.scripts.person.UserCSVUploadGet
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
Webscript implementation for giving information on uploading
users via a CSV.
- Author:
- Nick Burch
-
Nested Class Summary
Nested classes/interfaces inherited from class org.alfresco.repo.web.scripts.DeclarativeSpreadsheetWebScript
DeclarativeSpreadsheetWebScript.WriteExcel
Nested 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 TypeMethodDescriptionprotected boolean
We have a HTML versionbuildPropertiesForHeader
(Object resource, 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 notprotected Object
identifyResource
(String format, org.springframework.extensions.webscripts.WebScriptRequest req) We don't have a resourceprotected void
populateBody
(Object resource, org.apache.commons.csv.CSVPrinter csv, List<org.alfresco.service.namespace.QName> properties) Populates the body of the CSV file, once the header has been output.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) Populates the body of the Excel Workbook, once the header has been output.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
-
Constructor Details
-
UserCSVUploadGet
public UserCSVUploadGet()
-
-
Method Details
-
allowHtmlFallback
protected boolean allowHtmlFallback()We have a HTML version- Specified by:
allowHtmlFallback
in classDeclarativeSpreadsheetWebScript
-
identifyResource
protected Object identifyResource(String format, org.springframework.extensions.webscripts.WebScriptRequest req) We don't have a resource- Specified by:
identifyResource
in classDeclarativeSpreadsheetWebScript
-
buildPropertiesForHeader
protected List<Pair<org.alfresco.service.namespace.QName,Boolean>> buildPropertiesForHeader(Object resource, String format, org.springframework.extensions.webscripts.WebScriptRequest req) Description copied from class:DeclarativeSpreadsheetWebScript
Returns the QNames of the model properties to be output in the header, and if they're required or not- 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 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 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 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 classDeclarativeSpreadsheetWebScript
- Throws:
IOException
-