DisplayReportForm.java

  1. /*
  2.  * This software was designed and created by Jason Carroll.
  3.  * Copyright (c) 2002, 2003, 2004 Jason Carroll.
  4.  * The author can be reached at jcarroll@cowsultants.com
  5.  * ITracker website: http://www.cowsultants.com
  6.  * ITracker forums: http://www.cowsultants.com/phpBB/index.php
  7.  *
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it only under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 2 of the License, or
  11.  * (at your option) any later version.
  12.  *
  13.  * This program is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  * GNU General Public License for more details.
  17.  */

  18. package org.itracker.web.forms;

  19. import org.apache.struts.action.ActionErrors;
  20. import org.apache.struts.action.ActionMapping;
  21. import org.apache.struts.validator.ValidatorForm;

  22. import javax.servlet.http.HttpServletRequest;

  23. /**
  24.  * This is the LoginForm Struts Form. It is used by Login form.
  25.  *
  26.  * @author ready
  27.  */
  28. public class DisplayReportForm extends ValidatorForm {
  29.     /**
  30.      *
  31.      */
  32.     private static final long serialVersionUID = 1L;
  33.     private String type;
  34.     private Integer[] projectIds;
  35.     private Integer reportId;
  36.     private String reportOutput;

  37.     public void reset(ActionMapping mapping, HttpServletRequest request) {
  38.         type = null;
  39.         projectIds = null;
  40.         reportId = null;
  41.         reportOutput = null;

  42.     }

  43.     public ActionErrors validate(ActionMapping mapping,
  44.                                  HttpServletRequest request) {
  45.         ActionErrors errors = super.validate(mapping, request);

  46.         return errors;
  47.     }

  48.     public Integer[] getProjectIds() {
  49.         if (null == projectIds)
  50.             return null;
  51.         return projectIds.clone();
  52.     }

  53.     public void setProjectIds(Integer[] projectIds) {
  54.         if (null == projectIds)
  55.             this.projectIds = null;
  56.         else
  57.             this.projectIds = projectIds.clone();
  58.     }

  59.     public Integer getReportId() {
  60.         return reportId;
  61.     }

  62.     public void setReportId(Integer reportId) {
  63.         this.reportId = reportId;
  64.     }

  65.     public String getReportOutput() {
  66.         return reportOutput;
  67.     }

  68.     public void setReportOutput(String reportOutput) {
  69.         this.reportOutput = reportOutput;
  70.     }

  71.     public String getType() {
  72.         return type;
  73.     }

  74.     public void setType(String type) {
  75.         this.type = type;
  76.     }
  77. }