⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 archivelistform.java

📁 一套完整的档案管理系统
💻 JAVA
字号:
/*
 *
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *
 */


package com.stsc.archive.backup;

import java.text.ParseException;
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 java.util.Date;

/**
 * Form bean for the archive page.  This form has the following fields,
 * @author Yushirui
 * @version $Revision: 1.0 $ $Date: 2003/04/14 10:42:08 $
 */

public final class ArchiveListForm extends ActionForm {

    private String serialno			= null;
	private String temp				= null; 
	private String action			= null;
	private String backupFilename = "";
	
	public void setBackupFilename(String backupFilename)
	{
		this.backupFilename = (backupFilename==null)?"":backupFilename;
	}
	public String getBackupFilename()
	{
		return this.backupFilename;
	}
   

    // ----------------------------------------------------------- Properties
    /**
     * Return the action.
     */
    public String getAction() {
		return (this.action);
    }

    /**
     * Set the action.
     *
     * @param action The new action
     */
    public void setAction(String action) {
        this.action = action;
    }

    /**
     * Return the serialno.
     */
    public String getSerialno() {
		return (this.serialno);
    }

    /**
     * Set the serialno.
     *
     * @param serialno The new serialno
     */
    public void setTemp(String temp) {
        this.temp = temp;
    }
	
	  public String getTemp() {
		return (this.temp);
    }

    /**
     * Set the serialno.
     *
     * @param serialno The new serialno
     */
    public void setSerialno(String serialno) {
        this.serialno = serialno;
    }
  
    public ActionErrors validate(ActionMapping mapping,
                                 HttpServletRequest request) 
    {

        ActionErrors errors = new ActionErrors();
		
		if((backupFilename == null) || (backupFilename.length() < 1))
		{
			errors.add("backupFilename", new ActionError("error.backup.backupFilename")); 
		}
		//简单验证,没考虑大小写问题
		else if(backupFilename.indexOf(".xml") == -1)
		{
			backupFilename += ".xml";
		}
		
		return errors;

    }


}

⌨️ 快捷键说明

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