1 16 package org.apache.myfaces.config.impl.digester.elements; 17 18 import java.util.ArrayList ; 19 import java.util.List ; 20 import java.util.HashMap ; 21 import java.util.Map ; 22 23 import org.apache.myfaces.config.impl.digester.elements.Application; 24 import org.apache.myfaces.config.impl.digester.elements.Converter; 25 26 27 30 public class FacesConfig 31 { 32 33 private List applications = new ArrayList (); 34 private List factories = new ArrayList (); 35 private Map components = new HashMap (); 36 private List converters = new ArrayList (); 37 private List managedBeans = new ArrayList (); 38 private List navigationRules = new ArrayList (); 39 private List renderKits = new ArrayList (); 40 private List lifecyclePhaseListener = new ArrayList (); 41 private Map validators = new HashMap (); 42 43 44 public void addApplication(Application application) 45 { 46 applications.add(application); 47 } 48 49 50 public void addFactory(Factory factory) 51 { 52 factories.add(factory); 53 } 54 55 56 public void addComponent(String componentType, String componentClass) 57 { 58 components.put(componentType, componentClass); 59 } 60 61 62 public void addConverter(Converter converter) 63 { 64 converters.add(converter); 65 } 66 67 68 public void addManagedBean(ManagedBean bean) 69 { 70 managedBeans.add(bean); 71 } 72 73 74 public void addNavigationRule(NavigationRule rule) 75 { 76 navigationRules.add(rule); 77 } 78 79 80 public void addRenderKit(RenderKit renderKit) 81 { 82 renderKits.add(renderKit); 83 } 84 85 86 public void addLifecyclePhaseListener(String value) 87 { 88 lifecyclePhaseListener.add(value); 89 } 90 91 92 public void addValidator(String id, String validatorClass) 93 { 94 validators.put(id, validatorClass); 95 } 96 97 98 public List getApplications() 99 { 100 return applications; 101 } 102 103 104 public List getFactories() 105 { 106 return factories; 107 } 108 109 110 public Map getComponents() 111 { 112 return components; 113 } 114 115 116 public List getConverters() 117 { 118 return converters; 119 } 120 121 122 public List getManagedBeans() 123 { 124 return managedBeans; 125 } 126 127 128 public List getNavigationRules() 129 { 130 return navigationRules; 131 } 132 133 134 public List getRenderKits() 135 { 136 return renderKits; 137 } 138 139 140 public List getLifecyclePhaseListener() 141 { 142 return lifecyclePhaseListener; 143 } 144 145 146 public Map getValidators() 147 { 148 return validators; 149 } 150 } 151 | Popular Tags |