KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jdon > controller > events > Event


1 /**
2  * Copyright 2003-2006 the original author or authors.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6
7        http://www.apache.org/licenses/LICENSE-2.0
8
9   * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */

15
16 package com.jdon.controller.events;
17
18 import javax.servlet.http.HttpSession JavaDoc;
19 /**
20  *
21  * Event是Web层和Ejb层之间的传递者
22  * 包å?«actioName 是WEB层的actionå??称;
23  * actionType是action的具体类型。
24  * 例如:com.jdon.security.service.SaveSignUpAction是actionName
25  * 在这个Action中,å?¯èƒ½ä¼šå?‘生几个类型,如新增 创建 或修改。
26  * actionName是大类,actionType是å°?类,这样Eventå°±å?¯ä»¥åŒ…å?«æ‰€æœ‰çš„事件
27  *
28  * Errors是ä¿?存处ç?†ç»“果的出错信æ?¯ã€‚å?¯ä»¥å’Œå‰?å?°çš„strutsçš„Application.properies
29  * ä¿¡æ?¯è®¾ç½®ä¸€è‡´ã€‚
30  *
31  * @author banq
32  */

33 public interface Event extends java.io.Serializable JavaDoc{
34
35   public static final int VIEW = 1;
36   public static final int EDIT = 2;
37   public static final int CREATE = 3;
38   public static final int DELETE = 4;
39   public static final int ADD = 5;
40   public static final int REMOVE = 6;
41   public static final int UPDATE = 7;
42
43
44   //å“?应客户端的actionName
45
public void setActionName(String JavaDoc actionName);
46   public String JavaDoc getActionName();
47   //å“?应客户端的ActionType
48
public void setActionType(int actionType);
49   public int getActionType();
50   //Event处ç?†å‡ºé”™ä¿¡æ?¯
51
public void setErrors(String JavaDoc errors);
52   public String JavaDoc getErrors();
53
54   //å?¯èƒ½ä½¿ç”¨Session作为缓存,对于使用EJB Service是必须的,加快速度。
55
public void setSession(HttpSession JavaDoc session);
56   public HttpSession JavaDoc getSession();
57
58   public String JavaDoc getEventName();
59
60 }
61
Popular Tags