|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.web.controller.UifControllerBase org.kuali.rice.krad.labs.fileUploads.XmlIngesterController
@Controller @RequestMapping(value="/ingester") public class XmlIngesterController
Controller for the XML Ingester View
Displays the initial Ingester view page and processes file upload requests.
Constructor Summary | |
---|---|
XmlIngesterController()
|
Method Summary | |
---|---|
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(javax.servlet.http.HttpServletRequest request)
Called to create a new model(form) object when necessary. |
protected int |
ingestFiles(List<XmlDocCollection> collections)
Ingests the list of files into the system |
org.springframework.web.servlet.ModelAndView |
start(UifFormBase form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Initial method called when requesting a new view instance which checks authorization and forwards the view for rendering |
org.springframework.web.servlet.ModelAndView |
upload(XmlIngesterForm ingesterForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlIngesterController()
Method Detail |
---|
protected XmlIngesterForm createInitialForm(javax.servlet.http.HttpServletRequest request)
UifControllerBase
createInitialForm
in class UifControllerBase
request
- - the http request that was madeUifControllerBase.createInitialForm(javax.servlet.http.HttpServletRequest)
@RequestMapping(params="methodToCall=start") public org.springframework.web.servlet.ModelAndView start(@ModelAttribute(value="KualiForm") UifFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
UifControllerBase
start
in class UifControllerBase
@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 reference
protected int ingestFiles(List<XmlDocCollection> collections)
collections
- xml documents to be ingested
protected 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |