Coverage Report - org.kuali.rice.core.api.uif.RemotablePasswordInput
 
Classes in this File Line Coverage Branch Coverage Complexity
RemotablePasswordInput
0%
0/9
N/A
1.375
RemotablePasswordInput$1
N/A
N/A
1.375
RemotablePasswordInput$Builder
0%
0/10
0%
0/4
1.375
RemotablePasswordInput$Constants
0%
0/1
N/A
1.375
RemotablePasswordInput$Elements
0%
0/1
N/A
1.375
 
 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 password input control type.
 31  
  */
 32  
 @XmlRootElement(name = RemotablePasswordInput.Constants.ROOT_ELEMENT_NAME)
 33  
 @XmlAccessorType(XmlAccessType.NONE)
 34  
 @XmlType(name = RemotablePasswordInput.Constants.TYPE_NAME, propOrder = {
 35  
         RemotablePasswordInput.Elements.SIZE,
 36  
                 CoreConstants.CommonElements.FUTURE_ELEMENTS })
 37  0
 public final class RemotablePasswordInput extends RemotableAbstractControl implements Sized {
 38  
 
 39  
     @XmlElement(name = Elements.SIZE, required = false)
 40  
     private final Integer size;
 41  
 
 42  
     @Override
 43  
     public Integer getSize() {
 44  0
         return size;
 45  
     }
 46  
 
 47  0
     @SuppressWarnings("unused")
 48  
     @XmlAnyElement
 49  
     private final Collection<Element> _futureElements = null;
 50  
 
 51  
     /**
 52  
      * Should only be invoked by JAXB.
 53  
      */
 54  
     @SuppressWarnings("unused")
 55  0
     private RemotablePasswordInput() {
 56  0
         size = null;
 57  0
     }
 58  
 
 59  0
     private RemotablePasswordInput(Builder b) {
 60  0
         size = b.size;
 61  0
     }
 62  
 
 63  0
     public static final class Builder extends RemotableAbstractControl.Builder implements Sized {
 64  
         private Integer size;
 65  
 
 66  
         private Builder() {
 67  0
             super();
 68  0
         }
 69  
 
 70  
         public static Builder create() {
 71  0
             return new Builder();
 72  
         }
 73  
 
 74  
         @Override
 75  
         public Integer getSize() {
 76  0
             return size;
 77  
         }
 78  
 
 79  
         public void setSize(Integer size) {
 80  0
             if (size != null && size < 1) {
 81  0
                 throw new IllegalArgumentException("size was < 1");
 82  
             }
 83  
 
 84  0
             this.size = size;
 85  0
         }
 86  
 
 87  
         @Override
 88  
         public RemotablePasswordInput build() {
 89  0
             return new RemotablePasswordInput(this);
 90  
         }
 91  
     }
 92  
 
 93  
     /**
 94  
      * Defines some internal constants used on this class.
 95  
      */
 96  0
     static final class Constants {
 97  
         static final String TYPE_NAME = "PasswordInputType";
 98  
         final static String ROOT_ELEMENT_NAME = "passwordInput";
 99  
     }
 100  
 
 101  0
     static final class Elements {
 102  
         static final String SIZE = "size";
 103  
     }
 104  
 }