Package org.intermine.web.struts
Class TemplatesImportForm
- java.lang.Object
-
- org.apache.struts.action.ActionForm
-
- org.apache.struts.validator.ValidatorForm
-
- org.intermine.web.struts.ImportXMLForm
-
- org.intermine.web.struts.TemplatesImportForm
-
- All Implemented Interfaces:
java.io.Serializable
public class TemplatesImportForm extends ImportXMLForm
Form bean representing template import form.- Author:
- Thomas Riley, Daniela Butano
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.intermine.web.struts.ImportXMLForm
formFile, xml
-
-
Constructor Summary
Constructors Constructor Description TemplatesImportForm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,TemplateQuery>
getQueryMap(BagManager bagManager, Profile profile)
Return a Map from template name to Template object.boolean
isDeleteTracks()
Get the deleteTracks flag.boolean
isOverwriting()
Get the overwrite flag.protected void
reset()
Reset the form.void
setDeleteTracks(boolean deleteTracks)
Set the deleteTracks flag.void
setOverwriting(boolean overwriting)
Set the overwriting flag.org.apache.struts.action.ActionErrors
validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
Call inherited method then check whether xml is valid.-
Methods inherited from class org.intermine.web.struts.ImportXMLForm
getFormFile, getXml, reset, setFormFile, setXml
-
Methods inherited from class org.apache.struts.validator.ValidatorForm
getPage, getResultValueMap, getValidationKey, getValidatorResults, setPage, setValidatorResults
-
-
-
-
Method Detail
-
isOverwriting
public boolean isOverwriting()
Get the overwrite flag.- Returns:
- true to overwrite existing template, false to add
-
setOverwriting
public void setOverwriting(boolean overwriting)
Set the overwriting flag.- Parameters:
overwriting
- true to overwrite existing templates, false to add
-
isDeleteTracks
public boolean isDeleteTracks()
Get the deleteTracks flag.- Returns:
- true true to delete tracks associated to the template, false to keep
-
setDeleteTracks
public void setDeleteTracks(boolean deleteTracks)
Set the deleteTracks flag.- Parameters:
deleteTracks
- true to delete tracks associated to the template, false to keep
-
reset
protected void reset()
Reset the form.- Overrides:
reset
in classImportXMLForm
-
validate
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
Call inherited method then check whether xml is valid.- Overrides:
validate
in classorg.apache.struts.validator.ValidatorForm
-
getQueryMap
public java.util.Map<java.lang.String,TemplateQuery> getQueryMap(BagManager bagManager, Profile profile) throws java.lang.Exception
Return a Map from template name to Template object.- Parameters:
bagManager
- An object capable of getting bags for a profile.profile
- The current user's profile.- Returns:
- a Map from template name to Template object.
- Throws:
java.lang.Exception
- if a problem parsing query XML
-
-