@Controller @RequestMapping(value="/export") public class UifExportController extends UifControllerBase
Modifier and Type | Field and Description |
---|---|
protected javax.servlet.http.HttpServletRequest |
request |
Constructor and Description |
---|
UifExportController() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
applyCustomExport(List<Object> dataObjectCollection,
String dataObjectClassName,
String formatType,
javax.servlet.http.HttpServletResponse response)
Applies custom export if an exporter class is defined.
|
protected boolean |
canApplyCustomExport(DataObjectEntry dataObjectEntry)
Checks if a custom exporter can be applied.
|
protected UifFormBase |
createInitialForm()
Retrieves the session form for the form key request parameter so we can initialize a form instance of the
same type the view was rendered with.
|
protected String |
getContentType(String formatType)
Reviews and returns a valid content type, defaults to text/csv.
|
protected String |
getValidatedFormatType(String formatType)
Reviews and returns a valid format type, defaults to csv.
|
org.springframework.web.servlet.ModelAndView |
inquiryXmlRetrieval(UifFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles exporting the dataObject for this Inquiry to XML if it has a custom XML exporter available.
|
protected String |
retrieveTableData(UifFormBase form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Generates exportable table data based on the rich table selected.
|
protected void |
setAttachmentResponseHeader(javax.servlet.http.HttpServletResponse response,
String filename,
String contentType)
Creates consistent setup of attachment response header.
|
String |
tableCsvRetrieval(UifFormBase form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Generates exportable table data as CSV based on the rich table selected.
|
String |
tableXlsRetrieval(UifFormBase form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Generates exportable table data in xsl based on the rich table selected.
|
String |
tableXmlRetrieval(UifFormBase form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Generates exportable table data based on the rich table selected.
|
addBlankLine, addFileUploadLine, addLine, back, cancel, checkForm, closeEditLineDialog, defaultMapping, deleteFileUploadLine, deleteLine, editLine, getCollectionControllerService, getControllerService, getFileControllerService, getFileFromLine, getMessageView, getModelAndView, getModelAndView, getModelAndView, getModelAndViewService, getModelAndViewWithInit, getModelAndViewWithInit, getNavigationControllerService, getQueryControllerService, getRefreshControllerService, getSaveControllerService, initForm, navigate, performFieldQuery, performFieldSuggest, performLookup, performRedirect, performRedirect, refresh, retrieveCollectionPage, retrieveEditLineDialog, returnToHub, returnToPrevious, save, saveField, saveLine, sessionTimeout, setCollectionControllerService, setControllerService, setFileControllerService, setModelAndViewService, setNavigationControllerService, setQueryControllerService, setRefreshControllerService, setSaveControllerService, showDialog, start, tableJsonRetrieval
@Autowired protected javax.servlet.http.HttpServletRequest request
public UifExportController()
protected UifFormBase createInitialForm()
createInitialForm
in class UifControllerBase
@MethodAccessible @RequestMapping(method=GET, params="methodToCall=tableCsvRetrieval", produces="text/csv") @ResponseBody public String tableCsvRetrieval(@ModelAttribute(value="KualiForm") UifFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
@MethodAccessible @RequestMapping(method=GET, params="methodToCall=tableXlsRetrieval", produces="application/vnd.ms-excel") @ResponseBody public String tableXlsRetrieval(@ModelAttribute(value="KualiForm") UifFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
@MethodAccessible @RequestMapping(method=GET, params="methodToCall=tableXmlRetrieval", produces="application/xml") @ResponseBody public String tableXmlRetrieval(@ModelAttribute(value="KualiForm") UifFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
@RequestMapping(method=GET, params="methodToCall=inquiryXmlRetrieval", produces="application/xml") @ResponseBody public org.springframework.web.servlet.ModelAndView inquiryXmlRetrieval(@ModelAttribute(value="KualiForm") UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
form
- KualiFormresult
- interface that represents binding resultsrequest
- the http request that was maderesponse
- the http response objectException
protected String retrieveTableData(@ModelAttribute(value="KualiForm") UifFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
First the lifecycle process is run to rebuild the collection group, then
TableExporter
is invoked to build the export data from
the collection.
protected boolean canApplyCustomExport(DataObjectEntry dataObjectEntry)
dataObjectEntry
- the data dictionary entry for the data objectprotected boolean applyCustomExport(List<Object> dataObjectCollection, String dataObjectClassName, String formatType, javax.servlet.http.HttpServletResponse response)
dataObjectCollection
- dataObjectClassName
- formatType
- response
- true if custom exporter applied else return false.protected void setAttachmentResponseHeader(javax.servlet.http.HttpServletResponse response, String filename, String contentType)
response
- http response objectfilename
- name of the return filecontentType
- return content typeprotected String getValidatedFormatType(String formatType)
formatType
- format type to validateprotected String getContentType(String formatType)
formatType
- format type to return content type forCopyright © 2005–2016 The Kuali Foundation. All rights reserved.