Coverage Report - org.kuali.rice.core.api.uif.RemotableTextarea
 
Classes in this File Line Coverage Branch Coverage Complexity
RemotableTextarea
0%
0/15
N/A
1.429
RemotableTextarea$1
N/A
N/A
1.429
RemotableTextarea$Builder
0%
0/18
0%
0/8
1.429
RemotableTextarea$Constants
0%
0/1
N/A
1.429
RemotableTextarea$Elements
0%
0/1
N/A
1.429
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 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 implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.core.api.uif;
 17  
 
 18  
 import org.kuali.rice.core.api.CoreConstants;
 19  
 import org.w3c.dom.Element;
 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.XmlRootElement;
 26  
 import javax.xml.bind.annotation.XmlType;
 27  
 import java.util.Collection;
 28  
 
 29  
 /**
 30  
  * A textarea control type.
 31  
  */
 32  
 @XmlRootElement(name = RemotableTextarea.Constants.ROOT_ELEMENT_NAME)
 33  
 @XmlAccessorType(XmlAccessType.NONE)
 34  
 @XmlType(name = RemotableTextarea.Constants.TYPE_NAME, propOrder = {
 35  
         RemotableTextarea.Elements.ROWS,
 36  
         RemotableTextarea.Elements.COLS,
 37  
         RemotableTextarea.Elements.WATERMARK,
 38  
                 CoreConstants.CommonElements.FUTURE_ELEMENTS })
 39  0
 public final class RemotableTextarea extends RemotableAbstractControl implements Watermarked, RowsCols {
 40  
 
 41  
     @XmlElement(name = Elements.ROWS, required = false)
 42  
     private final Integer rows;
 43  
 
 44  
     @XmlElement(name = Elements.COLS, required = false)
 45  
     private final Integer cols;
 46  
 
 47  
     @XmlElement(name = Elements.WATERMARK, required = false)
 48  
     private final String watermark;
 49  
 
 50  0
     @SuppressWarnings("unused")
 51  
     @XmlAnyElement
 52  
     private final Collection<Element> _futureElements = null;
 53  
 
 54  
     /**
 55  
      * Should only be invoked by JAXB.
 56  
      */
 57  
     @SuppressWarnings("unused")
 58  0
     private RemotableTextarea() {
 59  0
         rows = null;
 60  0
         cols = null;
 61  0
         watermark = null;
 62  0
     }
 63  
 
 64  0
     private RemotableTextarea(Builder b) {
 65  0
         rows = b.rows;
 66  0
         cols = b.cols;
 67  0
         watermark = b.watermark;
 68  0
     }
 69  
 
 70  
     @Override
 71  
     public Integer getRows() {
 72  0
         return rows;
 73  
     }
 74  
 
 75  
     @Override
 76  
     public Integer getCols() {
 77  0
         return cols;
 78  
     }
 79  
 
 80  
     @Override
 81  
     public String getWatermark() {
 82  0
         return watermark;
 83  
     }
 84  
 
 85  0
     public static final class Builder extends RemotableAbstractControl.Builder implements Watermarked, RowsCols {
 86  
         private Integer rows;
 87  
         private Integer cols;
 88  
         private String watermark;
 89  
 
 90  
         private Builder() {
 91  0
             super();
 92  0
         }
 93  
 
 94  
         public static Builder create() {
 95  0
             return new Builder();
 96  
         }
 97  
 
 98  
         @Override
 99  
         public Integer getRows() {
 100  0
             return rows;
 101  
         }
 102  
 
 103  
         public void setRows(Integer rows) {
 104  0
             if (rows != null && rows < 1) {
 105  0
                 throw new IllegalArgumentException("rows was < 1");
 106  
             }
 107  
 
 108  0
             this.rows = rows;
 109  0
         }
 110  
 
 111  
         @Override
 112  
         public Integer getCols() {
 113  0
             return cols;
 114  
         }
 115  
 
 116  
         public void setCols(Integer cols) {
 117  0
             if (cols != null && cols < 1) {
 118  0
                 throw new IllegalArgumentException("cols was < 1");
 119  
             }
 120  
 
 121  0
             this.cols = cols;
 122  0
         }
 123  
 
 124  
         @Override
 125  
         public String getWatermark() {
 126  0
             return watermark;
 127  
         }
 128  
 
 129  
         public void setWatermark(String watermark) {
 130  0
             this.watermark = watermark;
 131  0
         }
 132  
 
 133  
         @Override
 134  
         public RemotableTextarea build() {
 135  0
             return new RemotableTextarea(this);
 136  
         }
 137  
     }
 138  
 
 139  
     /**
 140  
      * Defines some internal constants used on this class.
 141  
      */
 142  0
     static final class Constants {
 143  
         static final String TYPE_NAME = "TextareaType";
 144  
         final static String ROOT_ELEMENT_NAME = "textarea";
 145  
     }
 146  
 
 147  0
     static final class Elements {
 148  
         static final String COLS = "cols";
 149  
         static final String ROWS = "rows";
 150  
         static final String WATERMARK = "watermark";
 151  
     }
 152  
 }