Coverage Report - org.apache.myfaces.config.impl.digester.elements.Property
 
Classes in this File Line Coverage Branch Coverage Complexity
Property
0%
0/41
0%
0/16
0
 
 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.util.List;
 22  
 import java.util.ArrayList;
 23  
 import java.util.Iterator;
 24  
 import java.util.Collections;
 25  
 
 26  
 /**
 27  
  * @author Martin Marinschek
 28  
  * @version $Revision: 684459 $ $Date: 2008-08-10 06:13:56 -0500 (Sun, 10 Aug 2008) $
 29  
  *
 30  
      The "property" element represents a JavaBean property of the Java class
 31  
      represented by our parent element.
 32  
 
 33  
      Property names must be unique within the scope of the Java class
 34  
      that is represented by the parent element, and must correspond to
 35  
      property names that will be recognized when performing introspection
 36  
      against that class via java.beans.Introspector.
 37  
 
 38  
     <!ELEMENT property        (description*, display-name*, icon*, property-name, property-class, default-value?, suggested-value?, property-extension*)>
 39  
 
 40  
  *          <p/>
 41  
  */
 42  0
 public class Property
 43  
 {
 44  
     private List<String> _description;
 45  
     private List<String> _displayName;
 46  
     private List<String> _icon;
 47  
     private String _propertyName;
 48  
     private String _propertyClass;
 49  
     private String _defaultValue;
 50  
     private String _suggestedValue;
 51  
     private List<String> _propertyExtension;
 52  
 
 53  
 
 54  
     public void addDescription(String value)
 55  
     {
 56  0
         if(_description == null)
 57  0
             _description = new ArrayList<String>();
 58  
 
 59  0
         _description.add(value);
 60  0
     }
 61  
 
 62  
     public Iterator<String> getDescriptions()
 63  
     {
 64  0
         if(_description==null)
 65  0
             return Collections.EMPTY_LIST.iterator();
 66  
 
 67  0
         return _description.iterator();
 68  
     }
 69  
 
 70  
     public void addDisplayName(String value)
 71  
     {
 72  0
         if(_displayName == null)
 73  0
             _displayName = new ArrayList<String>();
 74  
 
 75  0
         _displayName.add(value);
 76  0
     }
 77  
 
 78  
     public Iterator<String> getDisplayNames()
 79  
     {
 80  0
         if(_displayName==null)
 81  0
             return Collections.EMPTY_LIST.iterator();
 82  
 
 83  0
         return _displayName.iterator();
 84  
     }
 85  
 
 86  
     public void addIcon(String value)
 87  
     {
 88  0
         if(_icon == null)
 89  0
             _icon = new ArrayList<String>();
 90  
 
 91  0
         _icon.add(value);
 92  0
     }
 93  
 
 94  
     public Iterator<String> getIcons()
 95  
     {
 96  0
         if(_icon==null)
 97  0
             return Collections.EMPTY_LIST.iterator();
 98  
 
 99  0
         return _icon.iterator();
 100  
     }
 101  
 
 102  
     public void setPropertyName(String propertyName)
 103  
     {
 104  0
         _propertyName = propertyName;
 105  0
     }
 106  
 
 107  
     public String getPropertyName()
 108  
     {
 109  0
         return _propertyName;
 110  
     }
 111  
 
 112  
     public void setPropertyClass(String propertyClass)
 113  
     {
 114  0
         _propertyClass = propertyClass;
 115  0
     }
 116  
 
 117  
     public String getPropertyClass()
 118  
     {
 119  0
         return _propertyClass;
 120  
     }
 121  
 
 122  
     public void setDefaultValue(String defaultValue)
 123  
     {
 124  0
         _defaultValue = defaultValue;
 125  0
     }
 126  
 
 127  
     public String getDefaultValue()
 128  
     {
 129  0
         return _defaultValue;
 130  
     }
 131  
 
 132  
     public void setSuggestedValue(String suggestedValue)
 133  
     {
 134  0
         _suggestedValue = suggestedValue;
 135  0
     }
 136  
 
 137  
     public String getSuggestedValue()
 138  
     {
 139  0
         return _suggestedValue;
 140  
     }
 141  
 
 142  
     public void addPropertyExtension(String propertyExtension)
 143  
     {
 144  0
         if(_propertyExtension == null)
 145  0
             _propertyExtension = new ArrayList<String>();
 146  
 
 147  0
         _propertyExtension.add(propertyExtension);
 148  0
     }
 149  
 
 150  
     public Iterator<String> getPropertyExtensions()
 151  
     {
 152  0
         if(_propertyExtension==null)
 153  0
             return Collections.EMPTY_LIST.iterator();
 154  
 
 155  0
         return _propertyExtension.iterator();
 156  
     }
 157  
 
 158  
 }