📄 manageform.java
字号:
package com.laoer.bbscs.web.form;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.laoer.comm.util.*;
/**
* <p>Title: TianYi BBS</p>
* <p>Description: TianYi BBS System</p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: LAOER.COM/TIANYISOFT.NET</p>
* @author laoer
* @version 6.0
*/
public class ManageForm
extends ActionForm {
private String action;
private String blackUserName;
private String bulletin;
private String canInUserName;
private int day;
private int month;
private String reason;
private int year;
private long bid;
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public String getBlackUserName() {
return blackUserName;
}
public void setBlackUserName(String blackUserName) {
this.blackUserName = blackUserName;
}
public String getBulletin() {
return bulletin;
}
public void setBulletin(String bulletin) {
this.bulletin = bulletin;
}
public String getCanInUserName() {
return canInUserName;
}
public void setCanInUserName(String canInUserName) {
this.canInUserName = canInUserName;
}
public int getDay() {
return day;
}
public void setDay(int day) {
this.day = day;
}
public int getMonth() {
return month;
}
public void setMonth(int month) {
this.month = month;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
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.length() == 0) {
errors.add("error.parametererror", new ActionError("error.parametererror"));
}
if (action.equals("add")) {
if (blackUserName == null || blackUserName.length() == 0) {
errors.add("error.nullerror", new ActionError("error.nullerror"));
}
if (Util.Date2Long(year, month, day) <= Util.getLongTime()) {
errors.add("error.bull.endtime", new ActionError("error.bull.endtime"));
}
}
if (action.equals("del")) {
if (blackUserName == null || blackUserName.length() == 0) {
errors.add("error.nullerror", new ActionError("error.nullerror"));
}
}
return errors;
}
public void reset(ActionMapping actionMapping,
HttpServletRequest httpServletRequest) {
}
public long getBid() {
return bid;
}
public void setBid(long bid) {
this.bid = bid;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -