Coverage Report - org.apache.myfaces.config.impl.digester.elements.PropertyImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
PropertyImpl
0%
0/41
0%
0/16
1.75
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one
 3  
  * or more contributor license agreements.  See the NOTICE file
 4  
  * distributed with this work for additional information
 5  
  * regarding copyright ownership.  The ASF licenses this file
 6  
  * to you under the Apache License, Version 2.0 (the
 7  
  * "License"); you may not use this file except in compliance
 8  
  * with the License.  You may obtain a copy of the License at
 9  
  *
 10  
  *   http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing,
 13  
  * software distributed under the License is distributed on an
 14  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15  
  * KIND, either express or implied.  See the License for the
 16  
  * specific language governing permissions and limitations
 17  
  * under the License.
 18  
  */
 19  
 package org.apache.myfaces.config.impl.digester.elements;
 20  
 
 21  
 import java.io.Serializable;
 22  
 import java.util.ArrayList;
 23  
 import java.util.Collection;
 24  
 import java.util.Collections;
 25  
 import java.util.List;
 26  
 
 27  
 /**
 28  
  * @author Martin Marinschek
 29  
  * @version $Revision$ $Date$
 30  
  *
 31  
  * The "property" element represents a JavaBean property of the Java class
 32  
  * represented by our parent element.
 33  
  *
 34  
  * Property names must be unique within the scope of the Java class
 35  
  * that is represented by the parent element, and must correspond to
 36  
  * property names that will be recognized when performing introspection
 37  
  * against that class via java.beans.Introspector.
 38  
  *
 39  
  * <!ELEMENT property        (description*, display-name*, icon*, property-name, property-class,
 40  
  * default-value?, suggested-value?, property-extension*)>
 41  
  *
 42  
  *          <p/>
 43  
  */
 44  0
 public class PropertyImpl extends org.apache.myfaces.config.element.Property implements Serializable
 45  
 {
 46  
     private List<String> _description;
 47  
     private List<String> _displayName;
 48  
     private List<String> _icon;
 49  
     private String _propertyName;
 50  
     private String _propertyClass;
 51  
     private String _defaultValue;
 52  
     private String _suggestedValue;
 53  
     private List<String> _propertyExtension;
 54  
 
 55  
 
 56  
     public void addDescription(String value)
 57  
     {
 58  0
         if(_description == null)
 59  
         {
 60  0
             _description = new ArrayList<String>();
 61  
         }
 62  
 
 63  0
         _description.add(value);
 64  0
     }
 65  
 
 66  
     public Collection<? extends String> getDescriptions()
 67  
     {
 68  0
         if(_description == null)
 69  
         {
 70  0
             return Collections.emptyList();
 71  
         }
 72  
 
 73  0
         return _description;
 74  
     }
 75  
 
 76  
     public void addDisplayName(String value)
 77  
     {
 78  0
         if(_displayName == null)
 79  
         {
 80  0
             _displayName = new ArrayList<String>();
 81  
         }
 82  
 
 83  0
         _displayName.add(value);
 84  0
     }
 85  
 
 86  
     public Collection<? extends String> getDisplayNames()
 87  
     {
 88  0
         if(_displayName==null)
 89  
         {
 90  0
             return Collections.emptyList();
 91  
         }
 92  
 
 93  0
         return _displayName;
 94  
     }
 95  
 
 96  
     public void addIcon(String value)
 97  
     {
 98  0
         if(_icon == null)
 99  
         {
 100  0
             _icon = new ArrayList<String>();
 101  
         }
 102  
 
 103  0
         _icon.add(value);
 104  0
     }
 105  
 
 106  
     public Collection<? extends String> getIcons()
 107  
     {
 108  0
         if(_icon == null)
 109  
         {
 110  0
             return Collections.emptyList();
 111  
         }
 112  
 
 113  0
         return _icon;
 114  
     }
 115  
 
 116  
     public void setPropertyName(String propertyName)
 117  
     {
 118  0
         _propertyName = propertyName;
 119  0
     }
 120  
 
 121  
     public String getPropertyName()
 122  
     {
 123  0
         return _propertyName;
 124  
     }
 125  
 
 126  
     public void setPropertyClass(String propertyClass)
 127  
     {
 128  0
         _propertyClass = propertyClass;
 129  0
     }
 130  
 
 131  
     public String getPropertyClass()
 132  
     {
 133  0
         return _propertyClass;
 134  
     }
 135  
 
 136  
     public void setDefaultValue(String defaultValue)
 137  
     {
 138  0
         _defaultValue = defaultValue;
 139  0
     }
 140  
 
 141  
     public String getDefaultValue()
 142  
     {
 143  0
         return _defaultValue;
 144  
     }
 145  
 
 146  
     public void setSuggestedValue(String suggestedValue)
 147  
     {
 148  0
         _suggestedValue = suggestedValue;
 149  0
     }
 150  
 
 151  
     public String getSuggestedValue()
 152  
     {
 153  0
         return _suggestedValue;
 154  
     }
 155  
 
 156  
     public void addPropertyExtension(String propertyExtension)
 157  
     {
 158  0
         if(_propertyExtension == null)
 159  
         {
 160  0
             _propertyExtension = new ArrayList<String>();
 161  
         }
 162  
 
 163  0
         _propertyExtension.add(propertyExtension);
 164  0
     }
 165  
 
 166  
     public Collection<? extends String> getPropertyExtensions()
 167  
     {
 168  0
         if(_propertyExtension == null)
 169  
         {
 170  0
             return Collections.emptyList();
 171  
         }
 172  
 
 173  0
         return _propertyExtension;
 174  
     }
 175  
 
 176  
 }