Coverage Report - org.kuali.student.common.dto.RichTextInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
RichTextInfo
0%
0/14
N/A
1
RichTextInfo$1
N/A
N/A
1
RichTextInfo$Builder
0%
0/13
N/A
1
 
 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.dto;
 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.common.infc.ModelBuilder;
 28  
 import org.kuali.student.common.infc.RichText;
 29  
 import org.w3c.dom.Element;
 30  
 
 31  
 @XmlAccessorType(XmlAccessType.FIELD)
 32  
 @XmlType(name = "RichTextInfo", propOrder = {"plain", "formatted", "_futureElements"})
 33  0
 public class RichTextInfo implements RichText, Serializable {
 34  
 
 35  
     private static final long serialVersionUID = 1L;
 36  
 
 37  
     @XmlElement
 38  
     private final String plain;
 39  
 
 40  
     @XmlElement
 41  
     private final String formatted;
 42  
     
 43  
     @XmlAnyElement
 44  
     private final List<Element> _futureElements;    
 45  
 
 46  0
     private RichTextInfo() {
 47  0
             plain = null;
 48  0
             formatted = null;
 49  0
             _futureElements=null;
 50  0
     }
 51  
     
 52  0
     private RichTextInfo(RichText builder) {
 53  0
             this.plain = builder.getPlain();
 54  0
             this.formatted = builder.getFormatted();
 55  0
             this._futureElements=null;
 56  0
     }
 57  
     
 58  
     @Override
 59  
     public String getPlain() {
 60  0
         return plain;
 61  
     }
 62  
 
 63  
     @Override
 64  
     public String getFormatted() {
 65  0
         return formatted;
 66  
     }
 67  
 
 68  
     @Override
 69  
     public String toString() {
 70  0
             return "RichTextInfo[plain=" + plain + ", formatted=" + formatted + "]";
 71  
     }
 72  
     
 73  0
     public static class Builder implements ModelBuilder<RichTextInfo>, RichText {
 74  
             private String plain;
 75  
                 private String formatted;
 76  
 
 77  0
                 public Builder() {}
 78  
             
 79  0
             public Builder(RichText rtInfo) {
 80  0
                     this.plain = rtInfo.getPlain();
 81  0
                     this.formatted = rtInfo.getFormatted();
 82  0
             }
 83  
             
 84  
             public RichTextInfo build() {
 85  0
                     return new RichTextInfo(this);
 86  
             }
 87  
 
 88  
         public String getPlain() {
 89  0
             return plain;
 90  
         }
 91  
 
 92  
         public void setPlain(String plain) {
 93  0
             this.plain = plain;
 94  0
         }
 95  
 
 96  
         public String getFormatted() {
 97  0
             return formatted;
 98  
         }
 99  
 
 100  
         public void setFormatted(String formatted) {
 101  0
             this.formatted = formatted;
 102  0
         }
 103  
     }
 104  
 }