View Javadoc

1   /*
2    * Copyright 2004-2006 the Seasar Foundation and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.seasar.tuigwaa.logic;
17  
18  public class TgwEvent {
19  
20  	public static final String PAGE_VIEW = "pageView";
21  	
22  	public static final String BEFORE_DATA_SAVE = "beforeDataSave";
23  
24  	public static final String BEFORE_CUSTOMFORM_SAVE = "beforeCustomFormSave";
25  
26  	public static final String AFTER_DATA_SAVE = "afterDataSave";
27  
28  	public static final String AFTER_CUSTOMFORM_SAVE = "afterCustomFormSave";
29  	
30  	public static final String NOW = "now";
31  	
32  	public static final String TIMER = "timer";
33  	
34  	private String type;
35  	
36  	private String option;
37  	
38  	public TgwEvent(){
39   	}
40  		
41  	public TgwEvent(String type, String option){
42  		this.type = type;
43  		this.option = option;
44  	}
45  	
46  	public void setType(String type) {
47  		this.type = type;
48  	}
49  	
50  	public String getType() {
51  		return type;
52  	}
53  	
54  	public void setOption(String option) {
55  		this.option = option;
56  	}
57  	
58  	public String getOption() {
59  		return option;
60  	}
61  	
62  	public static TgwEvent createPageViewEvent(String pageName){
63  		return new TgwEvent(PAGE_VIEW, pageName);
64  	}
65  }