1 4 package org.apache.myfaces.config.impl.digester.elements; 5 6 import java.util.List ; 7 import java.util.ArrayList ; 8 import java.util.Iterator ; 9 import java.util.Collections ; 10 11 30 public class Attribute 31 { 32 private List _description; 33 private List _displayName; 34 private List _icon; 35 private String _attributeName; 36 private String _attributeClass; 37 private String _defaultValue; 38 private String _suggestedValue; 39 private List _attributeExtension; 40 41 42 public void addDescription(String value) 43 { 44 if(_description == null) 45 _description = new ArrayList (); 46 47 _description.add(value); 48 } 49 50 public Iterator getDescriptions() 51 { 52 if(_description==null) 53 return Collections.EMPTY_LIST.iterator(); 54 55 return _description.iterator(); 56 } 57 58 public void addDisplayName(String value) 59 { 60 if(_displayName == null) 61 _displayName = new ArrayList (); 62 63 _displayName.add(value); 64 } 65 66 public Iterator getDisplayNames() 67 { 68 if(_displayName==null) 69 return Collections.EMPTY_LIST.iterator(); 70 71 return _displayName.iterator(); 72 } 73 74 public void addIcon(String value) 75 { 76 if(_icon == null) 77 _icon = new ArrayList (); 78 79 _icon.add(value); 80 } 81 82 public Iterator getIcons() 83 { 84 if(_icon==null) 85 return Collections.EMPTY_LIST.iterator(); 86 87 return _icon.iterator(); 88 } 89 90 public void setAttributeName(String attributeName) 91 { 92 _attributeName = attributeName; 93 } 94 95 public String getAttributeName() 96 { 97 return _attributeName; 98 } 99 100 public void setAttributeClass(String attributeClass) 101 { 102 _attributeClass = attributeClass; 103 } 104 105 public String getAttributeClass() 106 { 107 return _attributeClass; 108 } 109 110 public void setDefaultValue(String defaultValue) 111 { 112 _defaultValue = defaultValue; 113 } 114 115 public String getDefaultValue() 116 { 117 return _defaultValue; 118 } 119 120 public void setSuggestedValue(String suggestedValue) 121 { 122 _suggestedValue = suggestedValue; 123 } 124 125 public String getSuggestedValue() 126 { 127 return _suggestedValue; 128 } 129 130 public void addAttributeExtension(String attributeExtension) 131 { 132 if(_attributeExtension == null) 133 _attributeExtension = new ArrayList (); 134 135 _attributeExtension.add(attributeExtension); 136 } 137 138 public Iterator getAttributeExtensions() 139 { 140 if(_attributeExtension==null) 141 return Collections.EMPTY_LIST.iterator(); 142 143 return _attributeExtension.iterator(); 144 } 145 } 146 | Popular Tags |