001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License version 2
011: * as published by the Free Software Foundation.
012: *
013: * Resin Open Source is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
016: * of NON-INFRINGEMENT. See the GNU General Public License for more
017: * details.
018: *
019: * You should have received a copy of the GNU General Public License
020: * along with Resin Open Source; if not, write to the
021: *
022: * Free Software Foundation, Inc.
023: * 59 Temple Place, Suite 330
024: * Boston, MA 02111-1307 USA
025: *
026: * @author Scott Ferguson
027: */
028:
029: package javax.faces.application;
030:
031: import java.util.*;
032:
033: import javax.el.*;
034:
035: import javax.faces.*;
036: import javax.faces.component.*;
037: import javax.faces.context.*;
038: import javax.faces.convert.*;
039: import javax.faces.el.*;
040: import javax.faces.event.*;
041: import javax.faces.validator.*;
042:
043: public abstract class Application {
044: public abstract ActionListener getActionListener();
045:
046: public abstract void setActionListener(ActionListener listener);
047:
048: public abstract Locale getDefaultLocale();
049:
050: public abstract void setDefaultLocale(Locale locale);
051:
052: public abstract String getDefaultRenderKitId();
053:
054: public abstract void setDefaultRenderKitId(String renderKitId);
055:
056: public abstract String getMessageBundle();
057:
058: public abstract void setMessageBundle(String bundle);
059:
060: public abstract NavigationHandler getNavigationHandler();
061:
062: public abstract void setNavigationHandler(NavigationHandler handler);
063:
064: @Deprecated
065: public abstract PropertyResolver getPropertyResolver();
066:
067: @Deprecated
068: public abstract void setPropertyResolver(PropertyResolver resolver);
069:
070: /**
071: * @Since 1.2
072: */
073: public ResourceBundle getResourceBundle(FacesContext ctx,
074: String name) {
075: throw new UnsupportedOperationException(getClass().getName());
076: }
077:
078: @Deprecated
079: public abstract VariableResolver getVariableResolver();
080:
081: @Deprecated
082: public abstract void setVariableResolver(VariableResolver resolver);
083:
084: /**
085: * @Since 1.2
086: */
087: public void addELResolver(ELResolver resolver) {
088: throw new UnsupportedOperationException(getClass().getName());
089: }
090:
091: /**
092: * @Since 1.2
093: */
094: public ELResolver getELResolver() {
095: throw new UnsupportedOperationException(getClass().getName());
096: }
097:
098: public abstract ViewHandler getViewHandler();
099:
100: public abstract void setViewHandler(ViewHandler handler);
101:
102: public abstract StateManager getStateManager();
103:
104: public abstract void setStateManager(StateManager manager);
105:
106: public abstract void addComponent(String componentType,
107: String componentClass);
108:
109: public abstract UIComponent createComponent(String componentType)
110: throws FacesException;
111:
112: @Deprecated
113: public abstract UIComponent createComponent(
114: ValueBinding componentBinding, FacesContext context,
115: String componentType) throws FacesException;
116:
117: /**
118: * @Since 1.2
119: */
120: public UIComponent createComponent(ValueExpression componentExpr,
121: FacesContext context, String componentType)
122: throws FacesException {
123: throw new UnsupportedOperationException(getClass().getName());
124: }
125:
126: public abstract Iterator<String> getComponentTypes();
127:
128: public abstract void addConverter(String converterId,
129: String converterClass);
130:
131: public abstract void addConverter(Class targetClass,
132: String converterClass);
133:
134: public abstract Converter createConverter(String converterId)
135: throws FacesException;
136:
137: public abstract Converter createConverter(Class targetClass)
138: throws FacesException;
139:
140: public abstract Iterator<String> getConverterIds();
141:
142: public abstract Iterator<Class> getConverterTypes();
143:
144: /**
145: * @Since 1.2
146: */
147: public ExpressionFactory getExpressionFactory() {
148: throw new UnsupportedOperationException(getClass().getName());
149: }
150:
151: public Object evaluateExpressionGet(FacesContext context,
152: String expression, Class expectedType) throws ELException {
153: throw new UnsupportedOperationException(getClass().getName());
154: }
155:
156: @Deprecated
157: public abstract MethodBinding createMethodBinding(String ref,
158: Class[] param) throws ReferenceSyntaxException;
159:
160: public abstract Iterator<Locale> getSupportedLocales();
161:
162: public abstract void setSupportedLocales(Collection<Locale> locales);
163:
164: /**
165: * @Since 1.2
166: */
167: public void addELContextListener(ELContextListener listener) {
168: throw new UnsupportedOperationException(getClass().getName());
169: }
170:
171: /**
172: * @Since 1.2
173: */
174: public void removeELContextListener(ELContextListener listener) {
175: throw new UnsupportedOperationException(getClass().getName());
176: }
177:
178: /**
179: * @Since 1.2
180: */
181: public ELContextListener[] getELContextListeners() {
182: throw new UnsupportedOperationException(getClass().getName());
183: }
184:
185: public abstract void addValidator(String validatorId,
186: String validatorClass);
187:
188: public abstract Validator createValidator(String validatorId)
189: throws FacesException;
190:
191: public abstract Iterator<String> getValidatorIds();
192:
193: @Deprecated
194: public abstract ValueBinding createValueBinding(String ref)
195: throws ReferenceSyntaxException;
196: }
|