Clover Coverage Report - KS Common 1.2.1-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Nov 2 2011 04:55:08 EST
../../../../../../../img/srcFileCovDistChart0.png 29% of files have more coverage
13   98   14   0.93
0   54   1.08   14
14     1  
1    
 
  SaveActionEvent       Line # 27 13 0% 14 27 0% 0.0
 
No Tests
 
1    /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10    * software distributed under the License is distributed on an "AS IS"
11    * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12    * or implied. See the License for the specific language governing
13    * permissions and limitations under the License.
14    */
15   
16    package org.kuali.student.common.ui.client.event;
17   
18    import org.kuali.student.common.ui.client.mvc.HasActionState;
19   
20    /**
21    * A save event with user defined save types. This allows a single widget to handle
22    * different types of save events without having to create new events and handlers.
23    *
24    * @author Kuali Student Team
25    *
26    */
 
27    public class SaveActionEvent extends ActionEvent<SaveActionHandler> implements HasActionState{
28    public static final Type<SaveActionHandler> TYPE = new Type<SaveActionHandler>();
29   
30    private ActionState actionState;
31    private String message = "Saving";
32    private boolean acknowledgeRequired = true;
33    private boolean gotoNextView = false;
34    private boolean saveSuccessful = false;
35   
 
36  0 toggle public SaveActionEvent(){
37    }
38   
 
39  0 toggle public SaveActionEvent(boolean gotoNextView){
40  0 this.gotoNextView = gotoNextView;
41    }
42   
 
43  0 toggle public SaveActionEvent(String message){
44  0 this.message = message;
45    }
46   
 
47  0 toggle @Override
48    protected void dispatch(SaveActionHandler handler) {
49  0 handler.doSave(this);
50    }
51   
 
52  0 toggle @Override
53    public Type<SaveActionHandler> getAssociatedType() {
54  0 return TYPE;
55    }
56   
57   
 
58  0 toggle public void setActionState(ActionState state){
59  0 this.actionState = state;
60    }
61   
62    /**
63    * @see org.kuali.student.common.ui.client.mvc.HasActionState#getActionState()
64    */
 
65  0 toggle @Override
66    public ActionState getActionState() {
67  0 return this.actionState;
68    }
69   
 
70  0 toggle public String getMessage(){
71  0 return message;
72    }
73   
 
74  0 toggle public boolean isAcknowledgeRequired() {
75  0 return acknowledgeRequired;
76    }
77   
 
78  0 toggle public void setAcknowledgeRequired(boolean acknowledgeRequired) {
79  0 this.acknowledgeRequired = acknowledgeRequired;
80    }
81   
 
82  0 toggle public boolean gotoNextView(){
83  0 return gotoNextView;
84    }
85   
 
86  0 toggle public void setGotoNextView(boolean gotoNextView) {
87  0 this.gotoNextView = gotoNextView;
88    }
89   
 
90  0 toggle public void setSaveSuccessful(boolean saveSuccessful) {
91  0 this.saveSuccessful = saveSuccessful;
92    }
93   
 
94  0 toggle public boolean isSaveSuccessful() {
95  0 return saveSuccessful;
96    }
97   
98    }