Coverage Report - org.kuali.student.r2.common.messages.dto.MessageInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
MessageInfo
0%
0/22
0%
0/4
1.2
 
 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.r2.common.messages.dto;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.Date;
 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.dto.LocaleInfo;
 29  
 import org.kuali.student.r2.common.messages.infc.Message;
 30  
 import org.w3c.dom.Element;
 31  
 
 32  
 /**
 33  
  *
 34  
  * Refer to interface javadoc
 35  
  *
 36  
  * @Version 2.0
 37  
  * @Author Sri komandur@uw.edu
 38  
  *
 39  
  */
 40  
 
 41  0
 @XmlAccessorType(XmlAccessType.FIELD)
 42  
 @XmlType(name = "MessageInfo", propOrder = { 
 43  
                 "key", "locale", "groupName", "value", 
 44  
                 "_futureElements" })
 45  
 
 46  
 public class MessageInfo 
 47  
     implements Message, Serializable {
 48  
 
 49  
     private static final long serialVersionUID = 1L;
 50  
 
 51  
     @XmlElement
 52  
     private String key;
 53  
 
 54  
     @XmlElement
 55  
     private LocaleInfo locale;
 56  
 
 57  
     @XmlElement
 58  
     private String groupName;
 59  
 
 60  
     @XmlElement
 61  
     private String value;
 62  
 
 63  
     @XmlAnyElement
 64  
     private List<Element> _futureElements;
 65  
 
 66  
 
 67  
     /**
 68  
      * Constructs a new MessageInfo.
 69  
      */
 70  0
     public MessageInfo() {
 71  0
     }
 72  
 
 73  
     /**
 74  
      * Constructs a new MessageInfo from a Message.
 75  
      *
 76  
      * @param message the Message to copy
 77  
      */
 78  0
     public MessageInfo(Message message) {
 79  0
         if(message != null) {
 80  0
             if (message.getLocale() != null) {
 81  0
                 this.locale = new LocaleInfo(message.getLocale());
 82  
             }
 83  
 
 84  0
             this.groupName = message.getGroupName();
 85  0
             this.value = message.getValue();
 86  
         }
 87  0
     }
 88  
 
 89  
     @Override
 90  
     public String getKey() {
 91  0
         return this.key;
 92  
     }
 93  
 
 94  
     public void setKey(String key) {
 95  0
         this.key = key;
 96  0
     }
 97  
 
 98  
     @Override
 99  
     public LocaleInfo getLocale() {
 100  0
         return this.locale;
 101  
     }
 102  
 
 103  
     public void setLocale(LocaleInfo locale) {
 104  0
         this.locale = locale;
 105  0
     }
 106  
 
 107  
     @Override
 108  
     public String getGroupName() {
 109  0
         return this.groupName;
 110  
     }
 111  
 
 112  
     public void setGroupName(String groupName) {
 113  0
         this.groupName = groupName;
 114  0
     }
 115  
 
 116  
     @Override
 117  
     public String getValue() {
 118  0
         return this.value;
 119  
     }
 120  
 
 121  
     public void setValue(String value) {
 122  0
         this.value = value;
 123  0
     }
 124  
 }