Coverage Report - org.kuali.rice.kew.api.action.ReturnPoint
 
Classes in this File Line Coverage Branch Coverage Complexity
ReturnPoint
0%
0/14
0%
0/2
1.286
ReturnPoint$Constants
0%
0/2
N/A
1.286
ReturnPoint$Elements
0%
0/1
N/A
1.286
 
 1  
 /*
 2  
  * Copyright 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/ecl1.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.kew.api.action;
 17  
 
 18  
 import java.util.Collection;
 19  
 
 20  
 import javax.xml.bind.annotation.XmlAccessType;
 21  
 import javax.xml.bind.annotation.XmlAccessorType;
 22  
 import javax.xml.bind.annotation.XmlAnyElement;
 23  
 import javax.xml.bind.annotation.XmlElement;
 24  
 import javax.xml.bind.annotation.XmlRootElement;
 25  
 import javax.xml.bind.annotation.XmlType;
 26  
 
 27  
 import org.apache.commons.lang.StringUtils;
 28  
 import org.apache.commons.lang.builder.EqualsBuilder;
 29  
 import org.apache.commons.lang.builder.HashCodeBuilder;
 30  
 import org.apache.commons.lang.builder.ToStringBuilder;
 31  
 import org.kuali.rice.core.api.CoreConstants;
 32  
 import org.w3c.dom.Element;
 33  
 
 34  
 @XmlRootElement(name = ReturnPoint.Constants.ROOT_ELEMENT_NAME)
 35  
 @XmlAccessorType(XmlAccessType.NONE)
 36  
 @XmlType(name = ReturnPoint.Constants.TYPE_NAME, propOrder = {
 37  
                 ReturnPoint.Elements.NODE_NAME,
 38  
                 CoreConstants.CommonElements.FUTURE_ELEMENTS
 39  
 })
 40  
 public final class ReturnPoint {
 41  
     
 42  
         @XmlElement(name = Elements.NODE_NAME, required = true)
 43  
     private final String nodeName;
 44  
             
 45  0
     @SuppressWarnings("unused")
 46  
     @XmlAnyElement
 47  
     private final Collection<Element> _futureElements = null;
 48  
 
 49  0
     private ReturnPoint() {
 50  0
             this.nodeName = null;
 51  0
     }
 52  
     
 53  0
     private ReturnPoint(String nodeName) {
 54  0
             if (StringUtils.isBlank(nodeName)) {
 55  0
                     throw new IllegalArgumentException("nodeName was null or blank");
 56  
             }
 57  0
         this.nodeName = nodeName;
 58  0
     }
 59  
     
 60  
     public static ReturnPoint create(String nodeName) {
 61  0
             return new ReturnPoint(nodeName);
 62  
     }
 63  
     
 64  
     public String getNodeName() {
 65  0
         return nodeName;
 66  
     }
 67  
     
 68  
         @Override
 69  
     public int hashCode() {
 70  0
         return HashCodeBuilder.reflectionHashCode(this, Constants.HASH_CODE_EQUALS_EXCLUDE);
 71  
     }
 72  
 
 73  
     @Override
 74  
     public boolean equals(Object object) {
 75  0
         return EqualsBuilder.reflectionEquals(object, this, Constants.HASH_CODE_EQUALS_EXCLUDE);
 76  
     }
 77  
 
 78  
     @Override
 79  
     public String toString() {
 80  0
         return ToStringBuilder.reflectionToString(this);
 81  
     }
 82  
     
 83  
     /**
 84  
      * Defines some internal constants used on this class.
 85  
      */
 86  0
     static class Constants {
 87  
         final static String ROOT_ELEMENT_NAME = "returnPoint";
 88  
         final static String TYPE_NAME = "ReturnPointType";
 89  0
         final static String[] HASH_CODE_EQUALS_EXCLUDE = new String[] { CoreConstants.CommonElements.FUTURE_ELEMENTS };
 90  
     }
 91  
     
 92  
     /**
 93  
      * A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
 94  
      */
 95  0
     static class Elements {
 96  
         final static String NODE_NAME = "nodeName";
 97  
     }
 98  
 
 99  
 }