2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

Coverage Report - org.apache.shale.tiger.managed.config.ManagedPropertyConfig
 
Classes in this File Line Coverage Branch Coverage Complexity
ManagedPropertyConfig
100%
21/21
N/A
1
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to you under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 
 18  
 package org.apache.shale.tiger.managed.config;
 19  
 
 20  
 /**
 21  
  * <p>Representation of the runtime relevant contents of a JavaServer Faces
 22  
  * <code>&lt;managed-property&gt;</code> configuration element.</p>
 23  
  */
 24  
 public class ManagedPropertyConfig
 25  
     implements ListEntriesHolder, MapEntriesHolder, NullValueHolder {
 26  
 
 27  
     /** Creates a new instance of ManagedPropertyConfig. */
 28  624
     public ManagedPropertyConfig() {
 29  624
     }
 30  
 
 31  
     /**
 32  
      * <p>Return <code>true</code> if the specified <code>value</code>
 33  
      * is a value binding expression, rather than a literal value.</p>
 34  
      */
 35  
     public boolean isExpression() {
 36  39
         return (value != null) && value.startsWith("#{")
 37  
           && value.endsWith("}");
 38  
     }
 39  
 
 40  
     /**
 41  
      * Holds value of property name.
 42  
      */
 43  
     private String name;
 44  
 
 45  
     /**
 46  
      * Getter for property name.
 47  
      * @return Value of property name.
 48  
      */
 49  
     public String getName() {
 50  
 
 51  1034
         return this.name;
 52  
     }
 53  
 
 54  
     /**
 55  
      * Setter for property name.
 56  
      * @param name New value of property name.
 57  
      */
 58  
     public void setName(String name) {
 59  
 
 60  624
         this.name = name;
 61  624
     }
 62  
 
 63  
     /**
 64  
      * Holds value of property type.
 65  
      */
 66  
     private String type;
 67  
 
 68  
     /**
 69  
      * Getter for property type.
 70  
      * @return Value of property type.
 71  
      */
 72  
     public String getType() {
 73  
 
 74  233
         return this.type;
 75  
     }
 76  
 
 77  
     /**
 78  
      * Setter for property type.
 79  
      * @param type New value of property type.
 80  
      */
 81  
     public void setType(String type) {
 82  
 
 83  705
         this.type = type;
 84  705
     }
 85  
 
 86  
     /**
 87  
      * Holds value of property value.
 88  
      */
 89  
     private String value;
 90  
 
 91  
     /**
 92  
      * Getter for property value.
 93  
      * @return Value of property value.
 94  
      */
 95  
     public String getValue() {
 96  
 
 97  286
         return this.value;
 98  
     }
 99  
 
 100  
     /**
 101  
      * Setter for property value.
 102  
      * @param value New value of property value.
 103  
      */
 104  
     public void setValue(String value) {
 105  
 
 106  692
         this.value = value;
 107  692
     }
 108  
 
 109  
     /**
 110  
      * Holds value of property nullValue.
 111  
      */
 112  
     private boolean nullValue;
 113  
 
 114  
     /**
 115  
      * Getter for property nullValue.
 116  
      * @return Value of property nullValue.
 117  
      */
 118  
     public boolean isNullValue() {
 119  
 
 120  168
         return this.nullValue;
 121  
     }
 122  
 
 123  
     /**
 124  
      * Setter for property nullValue.
 125  
      * @param nullValue New value of property nullValue.
 126  
      */
 127  
     public void setNullValue(boolean nullValue) {
 128  
 
 129  13
         this.nullValue = nullValue;
 130  13
     }
 131  
 
 132  
     /**
 133  
      * Holds value of property listEntries.
 134  
      */
 135  
     private ListEntriesConfig listEntries;
 136  
 
 137  
     /**
 138  
      * Getter for property listEntries.
 139  
      * @return Value of property listEntries.
 140  
      */
 141  
     public ListEntriesConfig getListEntries() {
 142  
 
 143  140
         return this.listEntries;
 144  
     }
 145  
 
 146  
     /**
 147  
      * Setter for property listEntries.
 148  
      * @param listEntries New value of property listEntries.
 149  
      */
 150  
     public void setListEntries(ListEntriesConfig listEntries) {
 151  
 
 152  10
         this.listEntries = listEntries;
 153  10
     }
 154  
 
 155  
     /**
 156  
      * Holds value of property mapEntries.
 157  
      */
 158  
     private MapEntriesConfig mapEntries;
 159  
 
 160  
     /**
 161  
      * Getter for property mapEntries.
 162  
      * @return Value of property mapEntries.
 163  
      */
 164  
     public MapEntriesConfig getMapEntries() {
 165  
 
 166  132
         return this.mapEntries;
 167  
     }
 168  
 
 169  
     /**
 170  
      * Setter for property mapEntries.
 171  
      * @param mapEntries New value of property mapEntries.
 172  
      */
 173  
     public void setMapEntries(MapEntriesConfig mapEntries) {
 174  
 
 175  6
         this.mapEntries = mapEntries;
 176  6
     }
 177  
 
 178  
 
 179  
     /**
 180  
      * <p>Pretty printing toString() method.</p>
 181  
      */
 182  
     public String toString() {
 183  
 
 184  
         StringBuffer sb = new StringBuffer("ManagedPropertyConfig");
 185  
         sb.append("[name=" + getName());
 186  
         sb.append(",type=" + getType());
 187  
         sb.append(",value=" + getValue());
 188  
         sb.append(",nullValue=" + isNullValue());
 189  
         return sb.toString();
 190  
 
 191  
     }
 192  
 
 193  
 
 194  
 }