Class 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.apache.struts.validator.ValidatorForm

        page, validatorResults
      • Fields inherited from class org.apache.struts.action.ActionForm

        multipartRequestHandler, servlet
    • 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.apache.struts.validator.ValidatorForm

        getPage, getResultValueMap, getValidationKey, getValidatorResults, setPage, setValidatorResults
      • Methods inherited from class org.apache.struts.action.ActionForm

        getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
      • Methods inherited from class java.lang.Object

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

      • TemplatesImportForm

        public TemplatesImportForm()
    • 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 class ImportXMLForm
      • 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 class org.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