@Controller @RequestMapping(value="/ingester") public class XmlIngesterController extends UifControllerBase
Displays the initial Ingester view page and processes file upload requests.
Constructor and Description |
---|
XmlIngesterController() |
Modifier and Type | Method and Description |
---|---|
org.springframework.web.servlet.ModelAndView |
close(XmlIngesterForm ingesterForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected int |
collectIngestionMessages(List<XmlDocCollection> collections,
boolean txFailed)
loop through the results, returns the number of successfully processed files
|
protected List<XmlDocCollection> |
copyInputFiles(List<org.springframework.web.multipart.MultipartFile> fileList,
List<File> tempFiles)
Copies the MultipartFiles into an XmlDocCollection list
|
protected XmlIngesterForm |
createInitialForm()
Invoked to create a new form instance for the request before it is passed to the Binder/BeanWrapper.
|
protected int |
ingestFiles(List<XmlDocCollection> collections)
Ingests the list of files into the system
|
org.springframework.web.servlet.ModelAndView |
start(UifFormBase form) |
org.springframework.web.servlet.ModelAndView |
upload(XmlIngesterForm ingesterForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
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, tableJsonRetrieval
public XmlIngesterController()
protected XmlIngesterForm createInitialForm()
UifControllerBase
createInitialForm
in class UifControllerBase
org.kuali.rice.krad.web.controller.UifControllerBase#createInitialForm(javax.servlet.http.HttpServletRequest)
@RequestMapping(params="methodToCall=start") public org.springframework.web.servlet.ModelAndView start(UifFormBase form)
start
in class UifControllerBase
ControllerService.start(org.kuali.rice.krad.web.form.UifFormBase)
@RequestMapping(method=POST, params="methodToCall=upload") public org.springframework.web.servlet.ModelAndView upload(@ModelAttribute(value="KualiForm") XmlIngesterForm ingesterForm, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected List<XmlDocCollection> copyInputFiles(List<org.springframework.web.multipart.MultipartFile> fileList, List<File> tempFiles)
Reads each of the input files into temporary files to get File reference needed to create FileXmlDocCollection objects. Also verifies that only .xml or .zip files are to be processed.
fileList
- list of MultipartFiles selected for ingestiontempFiles
- temporary files used to get File referenceprotected int ingestFiles(List<XmlDocCollection> collections)
collections
- xml documents to be ingestedprotected int collectIngestionMessages(List<XmlDocCollection> collections, boolean txFailed)
Also collects the error messages for each doc
collections
- the list of processed documentstxFailed
- flag whether upload contained errors@RequestMapping(method=POST, params="methodToCall=close") public org.springframework.web.servlet.ModelAndView close(@ModelAttribute(value="KualiForm") XmlIngesterForm ingesterForm, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.