Class UserCSVUploadGet

  • All Implemented Interfaces:
    org.springframework.extensions.webscripts.WebScript

    public class UserCSVUploadGet
    extends DeclarativeSpreadsheetWebScript
    Webscript implementation for giving information on uploading users via a CSV.
    Author:
    Nick Burch
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean allowHtmlFallback()
      We have a HTML version
      protected java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.Boolean>> 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.lang.Object identifyResource​(java.lang.String format, org.springframework.extensions.webscripts.WebScriptRequest req)
      We don't have a resource
      protected void populateBody​(java.lang.Object resource, org.apache.commons.csv.CSVPrinter csv, java.util.List<org.alfresco.service.namespace.QName> 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<org.alfresco.service.namespace.QName> properties)
      Populates the body of the Excel Workbook, once the header has been output.
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UserCSVUploadGet

        public UserCSVUploadGet()
    • Method Detail

      • identifyResource

        protected java.lang.Object identifyResource​(java.lang.String format,
                                                    org.springframework.extensions.webscripts.WebScriptRequest req)
        We don't have a resource
        Specified by:
        identifyResource in class DeclarativeSpreadsheetWebScript
      • buildPropertiesForHeader

        protected java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.Boolean>> buildPropertiesForHeader​(java.lang.Object resource,
                                                                                                                                                java.lang.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 class DeclarativeSpreadsheetWebScript
      • populateBody

        protected void populateBody​(java.lang.Object resource,
                                    org.apache.commons.csv.CSVPrinter csv,
                                    java.util.List<org.alfresco.service.namespace.QName> 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<org.alfresco.service.namespace.QName> 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