Clover Coverage Report - KS Contract Documentation Generator 0.0.1-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
16   109   12   1.33
0   69   0.75   6
12     1  
2    
 
  StatusInfo       Line # 38 8 0% 4 12 0% 0.0
  StatusInfo.Builder       Line # 72 8 0% 8 16 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.contract.model.test.source;
17   
18    import java.io.Serializable;
19    import java.util.List;
20   
21    import javax.xml.bind.annotation.XmlAccessType;
22    import javax.xml.bind.annotation.XmlAccessorType;
23    import javax.xml.bind.annotation.XmlAnyElement;
24    import javax.xml.bind.annotation.XmlElement;
25    import javax.xml.bind.annotation.XmlType;
26   
27    import org.kuali.student.contract.model.test.source.ModelBuilder;
28    import org.kuali.student.contract.model.test.source.Status;
29    import org.w3c.dom.Element;
30   
31    /**
32    * Information about the state of an object
33    *
34    * @author nwright
35    */
36    @XmlAccessorType(XmlAccessType.FIELD)
37    @XmlType(name = "StatusInfo", propOrder = {"success", "message", "_futureElements"})
 
38    public class StatusInfo implements Status, Serializable {
39    private static final long serialVersionUID = 1L;
40   
41    @XmlElement
42    private final Boolean success;
43   
44    @XmlElement
45    private final String message;
46   
47    @XmlAnyElement
48    private final List<Element> _futureElements;
49   
 
50  0 toggle private StatusInfo() {
51  0 success = true;
52  0 message = "";
53  0 _futureElements = null;
54    }
55   
 
56  0 toggle private StatusInfo(Status builder) {
57  0 this.success = new Boolean(builder.isSuccess().booleanValue());
58  0 this.message = builder.getMessage();
59  0 this._futureElements = null;
60    }
61   
 
62  0 toggle @Override
63    public Boolean isSuccess(){
64  0 return success;
65    }
66   
 
67  0 toggle @Override
68    public String getMessage() {
69  0 return message;
70    }
71   
 
72    public static class Builder implements ModelBuilder<StatusInfo>, Status {
73    private Boolean success;
74    private String message;
75   
 
76  0 toggle public Builder() {}
77   
 
78  0 toggle public Builder(Status status) {
79  0 this.success = status.isSuccess();
80  0 this.message = status.getMessage();
81    }
82   
 
83  0 toggle public StatusInfo build() {
84  0 return new StatusInfo(this);
85    }
86   
 
87  0 toggle @Override
88    public Boolean isSuccess() {
89  0 return success;
90    }
91   
 
92  0 toggle @Override
93    public String getMessage() {
94  0 return message;
95    }
96   
 
97  0 toggle public Boolean getSuccess() {
98  0 return success;
99    }
100   
 
101  0 toggle public void setSuccess(Boolean success) {
102  0 this.success = success;
103    }
104   
 
105  0 toggle public void setMessage(String message) {
106  0 this.message = message;
107    }
108    }
109    }