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

📄 bullform.java

📁 反ajax原代码
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   BullForm.java

package com.laoer.bbscs.web.form;

import com.laoer.bbscs.sys.Constant;
import com.laoer.bbscs.sys.SysUtil;
import com.laoer.comm.util.Util;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;
import org.apache.struts.validator.ValidatorForm;

public class BullForm extends ValidatorForm
{

    private String action;
    private String content;
    private int day;
    private long id;
    private int month;
    private short noend;
    private String title;
    private int year;

    public BullForm()
    {
    }

    public String getAction()
    {
        return action;
    }

    public void setAction(String action)
    {
        this.action = action;
    }

    public String getContent()
    {
        return content;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public int getDay()
    {
        return day;
    }

    public void setDay(int day)
    {
        this.day = day;
    }

    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }

    public int getMonth()
    {
        return month;
    }

    public void setMonth(int month)
    {
        this.month = month;
    }

    public short getNoend()
    {
        return noend;
    }

    public void setNoend(short noend)
    {
        this.noend = noend;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public int getYear()
    {
        return year;
    }

    public void setYear(int year)
    {
        this.year = year;
    }

    public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest)
    {
        ActionErrors errors = new ActionErrors();
        if(action == null)
            action = "list";
        if(page == 0)
            page = 1;
        if(action.equals("add") || action.equals("editdo"))
        {
            if(title == null || title.trim().length() == 0 || content == null || content.length() == 0)
                errors.add("error.nullerror", new ActionError("error.nullerror"));
            title = title.trim();
            if(SysUtil.getStrLength(title, Constant.CHARSET) > 150)
                errors.add("error.bull.titletoolong", new ActionError("error.bull.titletoolong"));
            if(SysUtil.getStrLength(content, Constant.CHARSET) > 3000)
                errors.add("error.bull.contenttoolong", new ActionError("error.bull.contenttoolong"));
            if(noend != 1 && Util.Date2Long(year, month, day) <= Util.getLongTime())
                errors.add("error.bull.endtime", new ActionError("error.bull.endtime"));
        }
        return errors;
    }

    public void reset(ActionMapping actionmapping, HttpServletRequest httpservletrequest)
    {
    }
}

⌨️ 快捷键说明

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