001: /*
002: * Copyright 2004 The Apache Software Foundation.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.apache.myfaces.config;
017:
018: import org.apache.myfaces.config.element.ManagedBean;
019: import org.apache.myfaces.config.element.NavigationRule;
020: import org.apache.myfaces.config.element.Renderer;
021: import org.apache.myfaces.config.impl.digester.elements.Converter;
022: import org.apache.myfaces.config.impl.digester.elements.ResourceBundle;
023:
024: import javax.el.ELResolver;
025:
026: import java.util.Iterator;
027:
028: /**
029: * Subsumes several unmarshalled faces config objects and presents a simple interface
030: * to the combined configuration data.
031: *
032: * @author Manfred Geiler (latest modification by $Author: mbr $)
033: * @version $Revision: 511499 $ $Date: 2007-02-25 14:04:50 +0100 (So, 25 Feb 2007) $
034: */
035: public interface FacesConfigDispenser<C> {
036: /**
037: * Add another unmarshalled faces config object.
038: * @param facesConfig unmarshalled faces config object
039: */
040: public void feed(C facesConfig);
041:
042: /**
043: * Add another ApplicationFactory class name
044: * @param factoryClassName a class name
045: */
046: public void feedApplicationFactory(String factoryClassName);
047:
048: /**
049: * Add another FacesContextFactory class name
050: * @param factoryClassName a class name
051: */
052: public void feedFacesContextFactory(String factoryClassName);
053:
054: /**
055: * Add another LifecycleFactory class name
056: * @param factoryClassName a class name
057: */
058: public void feedLifecycleFactory(String factoryClassName);
059:
060: /**
061: * Add another RenderKitFactory class name
062: * @param factoryClassName a class name
063: */
064: public void feedRenderKitFactory(String factoryClassName);
065:
066: /** @return Iterator over ApplicationFactory class names */
067: public Iterator<String> getApplicationFactoryIterator();
068:
069: /** @return Iterator over FacesContextFactory class names */
070: public Iterator<String> getFacesContextFactoryIterator();
071:
072: /** @return Iterator over LifecycleFactory class names */
073: public Iterator<String> getLifecycleFactoryIterator();
074:
075: /** @return Iterator over RenderKit factory class names */
076: public Iterator<String> getRenderKitFactoryIterator();
077:
078: /** @return Iterator over ActionListener class names (in reverse order!) */
079: public Iterator<String> getActionListenerIterator();
080:
081: /** @return the default render kit id */
082: public String getDefaultRenderKitId();
083:
084: /** @return Iterator over message bundle names (in reverse order!) */
085: public String getMessageBundle();
086:
087: /** @return Iterator over NavigationHandler class names */
088: public Iterator<String> getNavigationHandlerIterator();
089:
090: /** @return Iterator over ViewHandler class names */
091: public Iterator<String> getViewHandlerIterator();
092:
093: /** @return Iterator over StateManager class names*/
094: public Iterator getStateManagerIterator();
095:
096: /** @return Iterator over PropertyResolver class names */
097: public Iterator<String> getPropertyResolverIterator();
098:
099: /** @return Iterator over VariableResolver class names */
100: public Iterator<String> getVariableResolverIterator();
101:
102: /** @return the default locale name */
103: public String getDefaultLocale();
104:
105: /** @return Iterator over supported locale names */
106: public Iterator<String> getSupportedLocalesIterator();
107:
108: /** @return Iterator over all defined component types */
109: public Iterator<String> getComponentTypes();
110:
111: /** @return component class that belongs to the given component type */
112: public String getComponentClass(String componentType);
113:
114: /** @return Iterator over all defined converter ids */
115: public Iterator<String> getConverterIds();
116:
117: /** @return Iterator over all classes with an associated converter */
118: public Iterator<String> getConverterClasses();
119:
120: /** @return Iterator over the config classes for the converters */
121: Iterator<String> getConverterConfigurationByClassName();
122:
123: /** delivers a converter-configuration for one class-name */
124: Converter getConverterConfiguration(String converterClassName);
125:
126: /** @return converter class that belongs to the given converter id */
127: public String getConverterClassById(String converterId);
128:
129: /** @return converter class that is associated with the given class name */
130: public String getConverterClassByClass(String className);
131:
132: /** @return Iterator over all defined validator ids */
133: public Iterator<String> getValidatorIds();
134:
135: /** @return validator class name that belongs to the given validator id */
136: public String getValidatorClass(String validatorId);
137:
138: /**
139: * @return Iterator over {@link org.apache.myfaces.config.element.ManagedBean ManagedBean}s
140: */
141: public Iterator<ManagedBean> getManagedBeans();
142:
143: /**
144: * @return Iterator over {@link org.apache.myfaces.config.element.NavigationRule NavigationRule}s
145: */
146: public Iterator<NavigationRule> getNavigationRules();
147:
148: /** @return Iterator over all defined renderkit ids */
149: public Iterator<String> getRenderKitIds();
150:
151: /** @return renderkit class name for given renderkit id */
152: public String getRenderKitClass(String renderKitId);
153:
154: /**
155: * @return Iterator over {@link org.apache.myfaces.config.element.Renderer Renderer}s for the given renderKitId
156: */
157: public Iterator<Renderer> getRenderers(String renderKitId);
158:
159: /**
160: * @return Iterator over {@link javax.faces.event.PhaseListener} implementation class names
161: */
162: public Iterator<String> getLifecyclePhaseListeners();
163:
164: /**
165: * @return Iterator over {@link ResourceBundle}
166: */
167: public Iterator<ResourceBundle> getResourceBundles();
168:
169: /**
170: * @return Iterator over {@link ELResolver} implementation class names
171: */
172: public Iterator<String> getElResolvers();
173: }
|