Coverage Report - org.kuali.student.r2.common.dto.StatusInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
StatusInfo
0%
0/14
N/A
1
 
 1  
 /*
 2  
  * Copyright 2010 The Kuali Foundation 
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the
 5  
  * "License"); you may not use this file except in compliance with the
 6  
  * License. You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.osedu.org/licenses/ECL-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, either express or
 13  
  * implied. See the License for the specific language governing
 14  
  * permissions and limitations under the License.
 15  
  */
 16  
 
 17  
 package org.kuali.student.r2.common.dto;
 18  
 
 19  
 import java.io.Serializable;
 20  
 import java.util.List;
 21  
 
 22  
 import javax.xml.bind.annotation.XmlAccessType;
 23  
 import javax.xml.bind.annotation.XmlAccessorType;
 24  
 import javax.xml.bind.annotation.XmlAnyElement;
 25  
 import javax.xml.bind.annotation.XmlElement;
 26  
 import javax.xml.bind.annotation.XmlType;
 27  
 
 28  
 import org.kuali.student.r2.common.infc.Status;
 29  
 import org.w3c.dom.Element;
 30  
 
 31  
 /**
 32  
  * Information about the state of an object
 33  
  * 
 34  
  * @author nwright
 35  
  */
 36  
 
 37  
 @XmlAccessorType(XmlAccessType.FIELD)
 38  
 @XmlType(name = "StatusInfo", propOrder = {"isSuccess", "message", "_futureElements"})
 39  
 
 40  
 public class StatusInfo 
 41  
     implements Status, Serializable {
 42  
 
 43  
     private static final long serialVersionUID = 1L;
 44  
         
 45  
     @XmlElement
 46  
     private Boolean isSuccess;
 47  
     
 48  
     @XmlElement
 49  
     private String message;
 50  
     
 51  
     @XmlAnyElement
 52  
     private List<Element> _futureElements;        
 53  
 
 54  
     
 55  
     /**
 56  
      * Constructs a new StatusInfo.
 57  
      */
 58  0
     public StatusInfo() {
 59  0
         isSuccess = Boolean.valueOf(true);
 60  0
         message = "";
 61  0
     }
 62  
         
 63  
     /**
 64  
      * Constructs a new StatusInfo from another Status.
 65  
      *
 66  
      * @param status the Status to copy
 67  
      */
 68  0
     public StatusInfo(Status status) {
 69  0
         this.isSuccess = status.getIsSuccess();
 70  0
         this.message = status.getMessage();
 71  0
     }
 72  
 
 73  
     @Override
 74  
     public Boolean getIsSuccess(){
 75  0
         return isSuccess;
 76  
     }
 77  
     
 78  
     public void setSuccess(Boolean success) {
 79  0
         this.isSuccess = success;
 80  0
     }
 81  
     
 82  
     @Override
 83  
     public String getMessage() {
 84  0
         return message;
 85  
     }
 86  
     
 87  
     public void setMessage(String message) {
 88  0
         this.message = message;
 89  0
     }
 90  
 }