Coverage Report - org.kuali.rice.core.api.uif.RemotablePasswordInput
 
Classes in this File Line Coverage Branch Coverage Complexity
RemotablePasswordInput
88%
8/9
N/A
1.375
RemotablePasswordInput$1
N/A
N/A
1.375
RemotablePasswordInput$Builder
90%
9/10
100%
4/4
1.375
RemotablePasswordInput$Constants
0%
0/1
N/A
1.375
RemotablePasswordInput$Elements
0%
0/1
N/A
1.375
 
 1  
 package org.kuali.rice.core.api.uif;
 2  
 
 3  
 import org.kuali.rice.core.api.CoreConstants;
 4  
 import org.w3c.dom.Element;
 5  
 
 6  
 import javax.xml.bind.annotation.XmlAccessType;
 7  
 import javax.xml.bind.annotation.XmlAccessorType;
 8  
 import javax.xml.bind.annotation.XmlAnyElement;
 9  
 import javax.xml.bind.annotation.XmlElement;
 10  
 import javax.xml.bind.annotation.XmlRootElement;
 11  
 import javax.xml.bind.annotation.XmlType;
 12  
 import java.util.Collection;
 13  
 
 14  
 /**
 15  
  * A password input control type.
 16  
  */
 17  
 @XmlRootElement(name = RemotablePasswordInput.Constants.ROOT_ELEMENT_NAME)
 18  
 @XmlAccessorType(XmlAccessType.NONE)
 19  
 @XmlType(name = RemotablePasswordInput.Constants.TYPE_NAME, propOrder = {
 20  
         RemotablePasswordInput.Elements.SIZE,
 21  
                 CoreConstants.CommonElements.FUTURE_ELEMENTS })
 22  4
 public final class RemotablePasswordInput extends RemotableAbstractControl implements Sized {
 23  
 
 24  
     @XmlElement(name = Elements.SIZE, required = false)
 25  
     private final Integer size;
 26  
 
 27  
     @Override
 28  
     public Integer getSize() {
 29  0
         return size;
 30  
     }
 31  
 
 32  6
     @SuppressWarnings("unused")
 33  
     @XmlAnyElement
 34  
     private final Collection<Element> _futureElements = null;
 35  
 
 36  
     /**
 37  
      * Should only be invoked by JAXB.
 38  
      */
 39  
     @SuppressWarnings("unused")
 40  2
     private RemotablePasswordInput() {
 41  2
         size = null;
 42  2
     }
 43  
 
 44  4
     private RemotablePasswordInput(Builder b) {
 45  4
         size = b.size;
 46  4
     }
 47  
 
 48  8
     public static final class Builder extends RemotableAbstractControl.Builder implements Sized {
 49  
         private Integer size;
 50  
 
 51  
         private Builder() {
 52  5
             super();
 53  5
         }
 54  
 
 55  
         public static Builder create() {
 56  5
             return new Builder();
 57  
         }
 58  
 
 59  
         @Override
 60  
         public Integer getSize() {
 61  0
             return size;
 62  
         }
 63  
 
 64  
         public void setSize(Integer size) {
 65  7
             if (size != null && size < 1) {
 66  1
                 throw new IllegalArgumentException("size was < 1");
 67  
             }
 68  
 
 69  6
             this.size = size;
 70  6
         }
 71  
 
 72  
         @Override
 73  
         public RemotablePasswordInput build() {
 74  4
             return new RemotablePasswordInput(this);
 75  
         }
 76  
     }
 77  
 
 78  
     /**
 79  
      * Defines some internal constants used on this class.
 80  
      */
 81  0
     static final class Constants {
 82  
         static final String TYPE_NAME = "PasswordInputType";
 83  
         final static String ROOT_ELEMENT_NAME = "passwordInput";
 84  
     }
 85  
 
 86  0
     static final class Elements {
 87  
         static final String SIZE = "size";
 88  
     }
 89  
 }