addbugform.java

来自「1 系统简介 1.1 系统名称:bugtrail 1.2 适用范围:大型或小」· Java 代码 · 共 218 行

JAVA
218
字号
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package bugtrail.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;
import org.apache.struts.upload.MultipartRequestHandler;

/** 
 * MyEclipse Struts
 * Creation date: 12-31-2006
 * 
 * XDoclet definition:
 * @struts.form name="addBugForm"
 */
public class AddBugForm extends ActionForm {
	/*
	 * Generated fields
	 */
	/** project property */
	private String project;

	/** title property */
	private String title;

	/** establishTime property */
	private String establishTime;

	/** description property */
	private String description;

	/** priority property */
	private String priority;

	/** state property */
	private String state;

	/** finder property */
	private String finder;

	private String owner;

	private FormFile theFile ;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		Boolean maxLengthExceeded = (Boolean)
		request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
		if(getTitle().length()<1)
			errors.add("title",new ActionError("bug.title.null"));
		if(getDescription().length()<1)
			errors.add("description", new ActionError("bug.description.null"));

		if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue()))
		{
			errors.add("theFile", new ActionError("maxLengthExceeded"));
		}
		return errors;
	}

	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
	}

	/** 
	 * Returns the project.
	 * @return String
	 */
	public String getProject() {
		return project;
	}

	/** 
	 * Set the project.
	 * @param project The project to set
	 */
	public void setProject(String project) {
		this.project = project;
	}

	/** 
	 * Returns the title.
	 * @return String
	 */
	public String getTitle() {
		return title;
	}

	/** 
	 * Set the title.
	 * @param title The title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/** 
	 * Returns the establishTime.
	 * @return String
	 */
	public String getEstablishTime() {
		return establishTime;
	}

	/** 
	 * Set the establishTime.
	 * @param establishTime The establishTime to set
	 */
	public void setEstablishTime(String establishTime) {
		this.establishTime = establishTime;
	}

	/** 
	 * Returns the description.
	 * @return String
	 */
	public String getDescription() {
		return description;
	}

	/** 
	 * Set the description.
	 * @param description The description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/** 
	 * Returns the priority.
	 * @return String
	 */
	public String getPriority() {
		return priority;
	}

	/** 
	 * Set the priority.
	 * @param priority The priority to set
	 */
	public void setPriority(String priority) {
		this.priority = priority;
	}

	/** 
	 * Returns the state.
	 * @return String
	 */
	public String getState() {
		return state;
	}

	/** 
	 * Set the state.
	 * @param state The state to set
	 */
	public void setState(String state) {
		this.state = state;
	}

	/** 
	 * Returns the finder.
	 * @return String
	 */
	public String getFinder() {
		return finder;
	}

	/** 
	 * Set the finder.
	 * @param finder The finder to set
	 */
	public void setFinder(String finder) {
		this.finder = finder;
	}

	public String getOwner() {
		return owner;
	}

	/** 
	 * Set the finder.
	 * @param finder The finder to set
	 */
	public void setOwner(String owner) {
		this.owner = owner;
	}

	public FormFile getTheFile() {
		return theFile;
	}
	public void setTheFile(FormFile theFile) {
		this.theFile = theFile;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?