Coverage Report - org.kuali.student.enrollment.courseregistration.dto.RegistrationResponseInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
RegistrationResponseInfo
0%
0/23
0%
0/8
1.5
 
 1  
 /*
 2  
  * Copyright 2011 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.enrollment.courseregistration.dto;
 18  
 
 19  
 import java.io.Serializable;
 20  
 import java.util.ArrayList;
 21  
 import java.util.List;
 22  
 
 23  
 import javax.xml.bind.annotation.XmlAccessType;
 24  
 import javax.xml.bind.annotation.XmlAccessorType;
 25  
 import javax.xml.bind.annotation.XmlAnyElement;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 
 29  
 import org.kuali.student.enrollment.courseregistration.infc.RegistrationResponse;
 30  
 import org.kuali.student.enrollment.courseregistration.infc.RegistrationResponseItem;
 31  
 import org.kuali.student.r2.common.dto.OperationStatusInfo;
 32  
 import org.w3c.dom.Element;
 33  
 
 34  0
 @XmlAccessorType(XmlAccessType.FIELD)
 35  
 @XmlType(name = "RegistrationResponseInfo", propOrder = {
 36  
                 "registrationRequestId", "operationStatus",
 37  
                 "registrationResponseItems", "_futureElements"})
 38  
 
 39  
 public class RegistrationResponseInfo 
 40  
     implements RegistrationResponse, Serializable {
 41  
 
 42  
     private static final long serialVersionUID = 1L;
 43  
 
 44  
     @XmlElement
 45  
     private String registrationRequestId;
 46  
 
 47  
     @XmlElement
 48  
     private OperationStatusInfo operationStatus;
 49  
 
 50  
     @XmlElement
 51  
     private List<RegistrationResponseItemInfo> registrationResponseItems;
 52  
 
 53  
     @XmlAnyElement
 54  
     private List<Element> _futureElements;
 55  
 
 56  
     /**
 57  
      *  Constructs a new RegistrationResponseInfo.
 58  
      */
 59  0
     public RegistrationResponseInfo() {
 60  0
     }
 61  
 
 62  
     /**
 63  
      * Constructs a new RegistrationResponseInfo from another
 64  
      * RegistrationResponse.
 65  
      *
 66  
      * @param registrationResponse the RegistrationResponse to copy
 67  
      */
 68  0
     public RegistrationResponseInfo(RegistrationResponse registrationResponse) {
 69  
         
 70  0
         if (registrationResponse != null) {
 71  0
             this.registrationRequestId = registrationResponse.getRegistrationRequestId();
 72  0
             if (registrationResponse.getOperationStatus() != null) {
 73  0
                 this.operationStatus = new OperationStatusInfo(registrationResponse.getOperationStatus());
 74  
             }
 75  
 
 76  0
             this.registrationResponseItems = new ArrayList<RegistrationResponseItemInfo>();
 77  
             
 78  0
             for (RegistrationResponseItem registrationResponseItem : registrationResponse.getRegistrationResponseItems()) {
 79  0
                 this.registrationResponseItems.add(new RegistrationResponseItemInfo(registrationResponseItem));
 80  
             }
 81  
         }
 82  0
     }
 83  
 
 84  
     @Override
 85  
     public String getRegistrationRequestId() {
 86  0
         return registrationRequestId;
 87  
     }
 88  
 
 89  
     public void setRegistrationRequestId(String registrationRequestId) {
 90  0
         this.registrationRequestId = registrationRequestId;
 91  0
     }
 92  
 
 93  
     @Override
 94  
     public OperationStatusInfo getOperationStatus() {
 95  0
         return operationStatus;
 96  
     }
 97  
 
 98  
     public void setOperationStatus(OperationStatusInfo operationStatus) {
 99  0
         this.operationStatus = operationStatus;
 100  0
     }
 101  
 
 102  
     @Override
 103  
     public List<RegistrationResponseItemInfo> getRegistrationResponseItems() {
 104  0
         if (registrationResponseItems == null) {
 105  0
             registrationResponseItems = new ArrayList<RegistrationResponseItemInfo>();
 106  
         }
 107  
 
 108  0
         return registrationResponseItems;
 109  
     }
 110  
 
 111  
     public void setRegistrationResponseItems(List<RegistrationResponseItemInfo> registrationResponseItems) {
 112  0
         this.registrationResponseItems = registrationResponseItems;
 113  0
     }
 114  
 }