Refactored the code, addded google translator, and fixed some bugs
This commit is contained in:
parent
36cee77790
commit
ed1505254d
20 changed files with 844 additions and 370 deletions
44
src/zall/action/ZalleryAction.java
Normal file
44
src/zall/action/ZalleryAction.java
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
package zall.action;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import zall.bean.User;
|
||||
import zall.util.msg.UserMessage;
|
||||
import zutil.db.DBConnection;
|
||||
|
||||
public abstract class ZalleryAction {
|
||||
|
||||
private final String actionId;
|
||||
private final boolean requireUser;
|
||||
|
||||
public ZalleryAction(String actionId){
|
||||
this(actionId, false);
|
||||
}
|
||||
|
||||
public ZalleryAction(String actionId, boolean requireUser){
|
||||
this.actionId = actionId;
|
||||
this.requireUser = requireUser;
|
||||
}
|
||||
|
||||
public abstract void handleRequest(
|
||||
DBConnection db,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
HttpSession session,
|
||||
PrintWriter out,
|
||||
User user,
|
||||
UserMessage msgs) throws Exception;
|
||||
|
||||
|
||||
public String getActionId(){
|
||||
return actionId;
|
||||
}
|
||||
|
||||
public boolean requireUser(){
|
||||
return requireUser;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue