You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sl...@apache.org on 2008/10/05 19:06:06 UTC
svn commit: r701829 [9/12] - in /myfaces/core/branches/2_0_0:
api/src/main/java/javax/faces/ api/src/main/java/javax/faces/application/
api/src/main/java/javax/faces/component/
api/src/main/java/javax/faces/context/
api/src/main/java/javax/faces/conver...
Modified: myfaces/core/branches/2_0_0/api/src/test/java/javax/faces/convert/MessageUtilsTest.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/test/java/javax/faces/convert/MessageUtilsTest.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/test/java/javax/faces/convert/MessageUtilsTest.java (original)
+++ myfaces/core/branches/2_0_0/api/src/test/java/javax/faces/convert/MessageUtilsTest.java Sun Oct 5 10:06:02 2008
@@ -24,38 +24,47 @@
import org.apache.shale.test.base.AbstractJsfTestCase;
import org.apache.shale.test.el.MockValueExpression;
-public class MessageUtilsTest extends AbstractJsfTestCase {
-
- public MessageUtilsTest(String name) {
+public class MessageUtilsTest extends AbstractJsfTestCase
+{
+
+ public MessageUtilsTest(String name)
+ {
super(name);
}
- protected void setUp() throws Exception {
+ @Override
+ protected void setUp() throws Exception
+ {
super.setUp();
}
-
- protected void tearDown() throws Exception {
+
+ @Override
+ protected void tearDown() throws Exception
+ {
super.tearDown();
}
- public void testGetLabelFromAttributesMap() {
+ public void testGetLabelFromAttributesMap()
+ {
HtmlInputText inputText = new HtmlInputText();
inputText.getAttributes().put("label", "testLabel");
String label = _MessageUtils.getLabel(facesContext, inputText);
assertEquals("testLabel", label);
}
-
- public void testGetLabelFromValueExpression() {
+
+ public void testGetLabelFromValueExpression()
+ {
facesContext.getExternalContext().getRequestMap().put("lbl", "testLabel");
HtmlInputText inputText = new HtmlInputText();
- ValueExpression expression = new MockValueExpression("#{requestScope.lbl}",String.class);
+ ValueExpression expression = new MockValueExpression("#{requestScope.lbl}", String.class);
inputText.setValueExpression("label", expression);
-
+
String label = _MessageUtils.getLabel(facesContext, inputText);
assertEquals("testLabel", label);
}
-
- public void testGetLabelReturnsClientIdWhenLabelIsNotSpecified() {
+
+ public void testGetLabelReturnsClientIdWhenLabelIsNotSpecified()
+ {
HtmlInputText inputText = new HtmlInputText();
inputText.setId("testId");
String label = _MessageUtils.getLabel(facesContext, inputText);
Modified: myfaces/core/branches/2_0_0/api/src/test/java/javax/faces/convert/NumberConverterTest.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/test/java/javax/faces/convert/NumberConverterTest.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/test/java/javax/faces/convert/NumberConverterTest.java (original)
+++ myfaces/core/branches/2_0_0/api/src/test/java/javax/faces/convert/NumberConverterTest.java Sun Oct 5 10:06:02 2008
@@ -39,6 +39,7 @@
super(name);
}
+ @Override
protected void setUp() throws Exception
{
super.setUp();
@@ -49,29 +50,22 @@
}
+ @Override
protected void tearDown() throws Exception
{
super.tearDown();
mock = null;
}
-/*
- * temporarily comment out tests that fail, until Matthias Wessendorf has time to investigate
- public void testFranceLocaleWithNonBreakingSpace()
- {
-
- UIInput input = new UIInput();
- mock.setType("currency");
- Number number = (Number) mock.getAsObject(FacesContext.getCurrentInstance(), input, "12\u00a0345,68 ");
- assertNotNull(number);
- }
- public void testFranceLocaleWithoutNonBreakingSpace()
- {
-
- UIInput input = new UIInput();
- mock.setType("currency");
- Number number = (Number) mock.getAsObject(FacesContext.getCurrentInstance(), input, "12 345,68 ");
- assertNotNull(number);
- }
-*/
+ /*
+ * temporarily comment out tests that fail, until Matthias Wessendorf has time to investigate public void
+ * testFranceLocaleWithNonBreakingSpace() {
+ *
+ * UIInput input = new UIInput(); mock.setType("currency"); Number number = (Number)
+ * mock.getAsObject(FacesContext.getCurrentInstance(), input, "12\u00a0345,68 "); assertNotNull(number); } public
+ * void testFranceLocaleWithoutNonBreakingSpace() {
+ *
+ * UIInput input = new UIInput(); mock.setType("currency"); Number number = (Number)
+ * mock.getAsObject(FacesContext.getCurrentInstance(), input, "12 345,68 "); assertNotNull(number); }
+ */
}
Modified: myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/ExceptionMockRunner.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/ExceptionMockRunner.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/ExceptionMockRunner.java (original)
+++ myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/ExceptionMockRunner.java Sun Oct 5 10:06:02 2008
@@ -18,16 +18,14 @@
*/
package org.apache.myfaces.mock;
-import org.apache.myfaces.TestRunner;
import org.easymock.classextension.IMocksControl;
/**
* @author Mathias Broekelmann (latest modification by $Author$)
* @version $Revision$ $Date$
*/
-public abstract class ExceptionMockRunner extends MockRunner implements TestRunner
+public abstract class ExceptionMockRunner extends MockRunner
{
-
private final Throwable _exception;
public ExceptionMockRunner(IMocksControl mockControl, Throwable exception)
Modified: myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/api/Mock2ApplicationFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/api/Mock2ApplicationFactory.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/api/Mock2ApplicationFactory.java (original)
+++ myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/api/Mock2ApplicationFactory.java Sun Oct 5 10:06:02 2008
@@ -39,11 +39,13 @@
//this.factory = factory;
}
+ @Override
public Application getApplication()
{
return app;
}
+ @Override
public void setApplication(Application application)
{
this.app = application;
Modified: myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/api/MockApplicationFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/api/MockApplicationFactory.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/api/MockApplicationFactory.java (original)
+++ myfaces/core/branches/2_0_0/api/src/test/java/org/apache/myfaces/mock/api/MockApplicationFactory.java Sun Oct 5 10:06:02 2008
@@ -36,11 +36,13 @@
//this.factory = factory;
}
+ @Override
public Application getApplication()
{
return app;
}
+ @Override
public void setApplication(Application application)
{
this.app = application;
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationFactoryImpl.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationFactoryImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationFactoryImpl.java Sun Oct 5 10:06:02 2008
@@ -29,16 +29,14 @@
* @author Thomas Spiegl
* @version $Revision$ $Date$
*/
-public class ApplicationFactoryImpl
- extends ApplicationFactory
+public class ApplicationFactoryImpl extends ApplicationFactory
{
private static final Log log = LogFactory.getLog(ApplicationFactoryImpl.class);
/**
* Application is thread-safe (see Application javadoc)
- * "Application represents a per-web-application singleton object..."
- * FactoryFinder has a ClassLoader-Factory Map. Since each webapp has it's
- * own ClassLoader, each webapp will have it's own private factory instances.
+ * "Application represents a per-web-application singleton object..." FactoryFinder has a ClassLoader-Factory Map.
+ * Since each webapp has it's own ClassLoader, each webapp will have it's own private factory instances.
*/
private Application _application;
@@ -47,20 +45,25 @@
createAndLogNewApplication();
}
- private void createAndLogNewApplication() {
+ private void createAndLogNewApplication()
+ {
_application = new ApplicationImpl();
- if (log.isTraceEnabled()) log.trace("New ApplicationFactory instance created");
+ if (log.isTraceEnabled())
+ log.trace("New ApplicationFactory instance created");
}
- public void purgeApplication(){
+ public void purgeApplication()
+ {
createAndLogNewApplication();
}
+ @Override
public Application getApplication()
{
return _application;
}
+ @Override
public void setApplication(Application application)
{
if (application == null)
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java Sun Oct 5 10:06:02 2008
@@ -90,8 +90,7 @@
* @author Anton Koinov
* @author Thomas Spiegl
* @author Stan Silvert
- * @version $Revision$ $Date: 2008-09-13 19:10:53 -0400 (sam., 13 sept.
- * 2008) $
+ * @version $Revision$ $Date$
*/
@SuppressWarnings("deprecation")
public class ApplicationImpl extends Application
@@ -106,7 +105,7 @@
private final static ThreadLocal<RuntimeConfig> initializingRuntimeConfig = new ThreadLocal<RuntimeConfig>();
// ~ Instance fields
- //--------------------------------------------------------------------------
+ // --------------------------------------------------------------------------
// --
private Collection<Locale> _supportedLocales = Collections.emptySet();
@@ -124,22 +123,22 @@
// components, converters, and validators can be added at runtime--must
// synchronize, uses ConcurrentHashMap to allow concurrent read of map
- private final Map<String, Class<? extends Converter>> _converterIdToClassMap =
- new ConcurrentHashMap<String, Class<? extends Converter>>();
-
- private final Map<Class, String> _converterClassNameToClassMap =
- new ConcurrentHashMap<Class, String>();
-
- private final Map<String, org.apache.myfaces.config.impl.digester.elements.Converter> _converterClassNameToConfigurationMap =
- new ConcurrentHashMap<String, org.apache.myfaces.config.impl.digester.elements.Converter>();
-
- private final Map<String, Class<? extends UIComponent>> _componentClassMap =
- new ConcurrentHashMap<String, Class<? extends UIComponent>>();
-
- private final Map<String, Class<? extends Validator>> _validatorClassMap =
- new ConcurrentHashMap<String, Class<? extends Validator>>();
-
- private final Map<Class<? extends SystemEvent>, SystemListenerEntry> _systemEventListenerClassMap = new ConcurrentHashMap<Class<? extends SystemEvent>, SystemListenerEntry>();
+ private final Map<String, Class<? extends Converter>> _converterIdToClassMap =
+ new ConcurrentHashMap<String, Class<? extends Converter>>();
+
+ private final Map<Class, String> _converterClassNameToClassMap = new ConcurrentHashMap<Class, String>();
+
+ private final Map<String, org.apache.myfaces.config.impl.digester.elements.Converter> _converterClassNameToConfigurationMap =
+ new ConcurrentHashMap<String, org.apache.myfaces.config.impl.digester.elements.Converter>();
+
+ private final Map<String, Class<? extends UIComponent>> _componentClassMap =
+ new ConcurrentHashMap<String, Class<? extends UIComponent>>();
+
+ private final Map<String, Class<? extends Validator>> _validatorClassMap =
+ new ConcurrentHashMap<String, Class<? extends Validator>>();
+
+ private final Map<Class<? extends SystemEvent>, SystemListenerEntry> _systemEventListenerClassMap =
+ new ConcurrentHashMap<Class<? extends SystemEvent>, SystemListenerEntry>();
private final RuntimeConfig _runtimeConfig;
@@ -148,11 +147,11 @@
private ELResolverBuilder resolverBuilderForFaces;
private ProjectStage _projectStage;
-
+
private PageDeclarationLanguage _pageDeclarationLanguage;
// ~ Constructors
- //--------------------------------------------------------------------------
+ // --------------------------------------------------------------------------
// -----
public ApplicationImpl()
@@ -179,8 +178,11 @@
// log.info(
// "initializingRuntimeConfig.get() == null, so loading from ExternalContext"
// );
- ApplicationImpl.setInitializingRuntimeConfig(RuntimeConfig.getCurrentInstance(FacesContext
- .getCurrentInstance().getExternalContext()));
+ ApplicationImpl
+ .setInitializingRuntimeConfig(RuntimeConfig
+ .getCurrentInstance(FacesContext
+ .getCurrentInstance()
+ .getExternalContext()));
// throw new IllegalStateException(
// "The runtime config instance which is created while initialize myfaces "
@@ -218,7 +220,7 @@
}
// ~ Methods
- //--------------------------------------------------------------------------
+ // --------------------------------------------------------------------------
// ----------
@Override
@@ -269,8 +271,7 @@
@Override
public final java.util.ResourceBundle getResourceBundle(final FacesContext facesContext, final String name)
- throws FacesException,
- NullPointerException
+ throws FacesException, NullPointerException
{
checkNull(facesContext, "facesContext");
@@ -313,7 +314,7 @@
}
java.util.ResourceBundle getResourceBundle(final String name, final Locale locale, final ClassLoader loader)
- throws MissingResourceException
+ throws MissingResourceException
{
return java.util.ResourceBundle.getBundle(name, locale, loader);
}
@@ -330,8 +331,8 @@
@Override
public final UIComponent createComponent(final ValueExpression componentExpression,
- final FacesContext facesContext,
- final String componentType) throws FacesException, NullPointerException
+ final FacesContext facesContext, final String componentType)
+ throws FacesException, NullPointerException
{
checkNull(componentExpression, "componentExpression");
@@ -348,7 +349,7 @@
if (retVal instanceof UIComponent)
{
- createdComponent = (UIComponent) retVal;
+ createdComponent = (UIComponent)retVal;
}
else
{
@@ -396,26 +397,27 @@
{
checkNull(systemEventClass, "systemEventClass");
checkNull(source, "source");
-
+
SystemEvent event = null;
if (source instanceof SystemEventListenerHolder)
{
SystemEventListenerHolder holder = (SystemEventListenerHolder)source;
- event = _traverseListenerList(holder.getListenersForEventClass(systemEventClass), systemEventClass,
- source, event);
+ event =
+ _traverseListenerList(holder.getListenersForEventClass(systemEventClass), systemEventClass, source,
+ event);
}
-
- SystemListenerEntry systemListenerEntry = _systemEventListenerClassMap.get(systemEventClass);
+
+ SystemListenerEntry systemListenerEntry = _systemEventListenerClassMap.get(systemEventClass);
if (systemListenerEntry != null)
{
systemListenerEntry.publish(systemEventClass, sourceBaseType, source, event);
- }
+ }
}
-
+
@Override
public void publishEvent(Class<? extends SystemEvent> systemEventClass, Object source)
{
- publishEvent(systemEventClass, source.getClass(), source);
+ publishEvent(systemEventClass, source.getClass(), source);
}
@Override
@@ -517,13 +519,13 @@
{
return _navigationHandler;
}
-
+
@Override
public PageDeclarationLanguage getPageDeclarationLanguage()
{
return _pageDeclarationLanguage;
}
-
+
@Override
public void setPageDeclarationLanguage(PageDeclarationLanguage pdl)
{
@@ -571,7 +573,7 @@
{
if (temp instanceof String)
{
- stageName = (String) temp;
+ stageName = (String)temp;
}
else
{
@@ -586,10 +588,8 @@
}
/*
- * If found, continue with the algorithm below, otherwise, look for
- * an entry in the initParamMap of the ExternalContext from the
- * current FacesContext with the key
- * ProjectStage.PROJECT_STAGE_PARAM_NAME
+ * If found, continue with the algorithm below, otherwise, look for an entry in the initParamMap of the
+ * ExternalContext from the current FacesContext with the key ProjectStage.PROJECT_STAGE_PARAM_NAME
*/
if (stageName == null)
{
@@ -601,10 +601,8 @@
if (stageName != null)
{
/*
- * see if an enum constant can be obtained by calling
- * ProjectStage.valueOf(), passing the value from the
- * initParamMap. If this succeeds without exception, save the
- * value and return it.
+ * see if an enum constant can be obtained by calling ProjectStage.valueOf(), passing the value from the
+ * initParamMap. If this succeeds without exception, save the value and return it.
*/
try
{
@@ -625,9 +623,8 @@
}
/*
- * If not found, or any of the previous attempts to discover the
- * enum constant value have failed, log a descriptive error message,
- * assign the value as ProjectStage.Production and return it.
+ * If not found, or any of the previous attempts to discover the enum constant value have failed, log a
+ * descriptive error message, assign the value as ProjectStage.Production and return it.
*/
_projectStage = ProjectStage.Production;
@@ -645,7 +642,7 @@
{
return PROPERTYRESOLVER;
}
-
+
@Override
public final void setResourceHandler(ResourceHandler resourceHandler)
{
@@ -653,7 +650,7 @@
_resourceHandler = resourceHandler;
}
-
+
@Override
public final ResourceHandler getResourceHandler()
{
@@ -742,14 +739,14 @@
systemListenerEntry.addListener(listener, sourceClass);
}
-
+
@Override
- public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass,
- Class sourceClass, SystemEventListener listener)
+ public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class sourceClass,
+ SystemEventListener listener)
{
checkNull(systemEventClass, "systemEventClass");
checkNull(listener, "listener");
-
+
SystemListenerEntry systemListenerEntry = _systemEventListenerClassMap.get(systemEventClass);
if (systemListenerEntry != null)
{
@@ -774,7 +771,7 @@
try
{
- _componentClassMap.put(componentType, (Class<? extends UIComponent>)ClassUtils.simpleClassForName(componentClassName));
+ _componentClassMap.put(componentType, ClassUtils.simpleClassForName(componentClassName));
if (log.isTraceEnabled())
log.trace("add Component class = " + componentClassName + " for type = " + componentType);
}
@@ -795,8 +792,7 @@
try
{
- _converterIdToClassMap.put(converterId,
- (Class<? extends Converter>)ClassUtils.simpleClassForName(converterClass));
+ _converterIdToClassMap.put(converterId, ClassUtils.simpleClassForName(converterClass));
if (log.isTraceEnabled())
log.trace("add Converter id = " + converterId + " converterClass = " + converterClass);
}
@@ -846,7 +842,7 @@
try
{
- _validatorClassMap.put(validatorId, (Class<? extends Validator>)ClassUtils.simpleClassForName(validatorClass));
+ _validatorClassMap.put(validatorId, ClassUtils.simpleClassForName(validatorClass));
if (log.isTraceEnabled())
log.trace("add Validator id = " + validatorId + " class = " + validatorClass);
}
@@ -871,7 +867,7 @@
try
{
- return (UIComponent) componentClass.newInstance();
+ return componentClass.newInstance();
}
catch (Exception e)
{
@@ -881,8 +877,7 @@
}
/**
- * @deprecated Use createComponent(ValueExpression, FacesContext, String)
- * instead.
+ * @deprecated Use createComponent(ValueExpression, FacesContext, String) instead.
*/
@Deprecated
@Override
@@ -901,35 +896,28 @@
}
/**
- * Return an instance of the converter class that has been registered under
- * the specified id.
+ * Return an instance of the converter class that has been registered under the specified id.
* <p>
- * Converters are registered via faces-config.xml files, and can also be
- * registered via the addConverter(String id, Class converterClass) method
- * on this class. Here the the appropriate Class definition is found, then
- * an instance is created and returned.
+ * Converters are registered via faces-config.xml files, and can also be registered via the addConverter(String id,
+ * Class converterClass) method on this class. Here the the appropriate Class definition is found, then an instance
+ * is created and returned.
* <p>
- * A converter registered via a config file can have any number of nested
- * attribute or property tags. The JSF specification is very vague about
- * what effect these nested tags have. This method ignores nested attribute
- * definitions, but for each nested property tag the corresponding setter is
- * invoked on the new Converter instance passing the property's
- * defaultValuer. Basic typeconversion is done so the target properties on
- * the Converter instance can be String, int, boolean, etc. Note that:
+ * A converter registered via a config file can have any number of nested attribute or property tags. The JSF
+ * specification is very vague about what effect these nested tags have. This method ignores nested attribute
+ * definitions, but for each nested property tag the corresponding setter is invoked on the new Converter instance
+ * passing the property's defaultValuer. Basic typeconversion is done so the target properties on the Converter
+ * instance can be String, int, boolean, etc. Note that:
* <ol>
- * <li>the Sun Mojarra JSF implemenation ignores nested property tags
- * completely, so this behaviour cannot be relied on across implementations.
- * <li>there is no equivalent functionality for converter classes registered
- * via the Application.addConverter api method.
+ * <li>the Sun Mojarra JSF implemenation ignores nested property tags completely, so this behaviour cannot be relied
+ * on across implementations.
+ * <li>there is no equivalent functionality for converter classes registered via the Application.addConverter api
+ * method.
* </ol>
* <p>
- * Note that this method is most commonly called from the standard
- * f:attribute tag. As an alternative, most components provide a "converter"
- * attribute which uses an EL expression to create a Converter instance, in
- * which case this method is not invoked at all. The converter attribute
- * allows the returned Converter instance to be configured via normal
- * dependency-injection, and is generally a better choice than using this
- * method.
+ * Note that this method is most commonly called from the standard f:attribute tag. As an alternative, most
+ * components provide a "converter" attribute which uses an EL expression to create a Converter instance, in which
+ * case this method is not invoked at all. The converter attribute allows the returned Converter instance to be
+ * configured via normal dependency-injection, and is generally a better choice than using this method.
*/
@Override
public final Converter createConverter(final String converterId)
@@ -937,8 +925,7 @@
checkNull(converterId, "converterId");
checkEmpty(converterId, "converterId");
- final Class<? extends Converter> converterClass =
- (Class<? extends Converter>)_converterIdToClassMap.get(converterId);
+ final Class<? extends Converter> converterClass = _converterIdToClassMap.get(converterId);
if (converterClass == null)
{
throw new FacesException("Could not find any registered converter-class by converterId : " + converterId);
@@ -1003,18 +990,17 @@
{
try
{
- final Class<? extends Converter> converterClass =
- ClassUtils.simpleClassForName(converterClassName);
+ Class<? extends Converter> converterClass = ClassUtils.simpleClassForName(converterClassName);
Converter converter = null;
try
{
// look for a constructor that takes a single Class object
// See JSF 1.2 javadoc for Converter
- final Constructor<? extends Converter> constructor =
- converterClass.getConstructor(new Class[]{Class.class});
-
- converter = constructor.newInstance(new Object[]{targetClass});
+ Constructor<? extends Converter> constructor =
+ converterClass.getConstructor(new Class[] { Class.class });
+
+ converter = constructor.newInstance(new Object[] { targetClass });
}
catch (Exception e)
{
@@ -1079,8 +1065,8 @@
private void setConverterProperties(final Class<?> converterClass, final Converter converter)
{
- final org.apache.myfaces.config.impl.digester.elements.Converter converterConfig =
- _converterClassNameToConfigurationMap.get(converterClass.getName());
+ final org.apache.myfaces.config.impl.digester.elements.Converter converterConfig =
+ _converterClassNameToConfigurationMap.get(converterClass.getName());
if (converterConfig != null)
{
@@ -1105,8 +1091,8 @@
*/
@Deprecated
@Override
- public final MethodBinding createMethodBinding(final String reference, Class[] params)
- throws ReferenceSyntaxException
+ public final MethodBinding createMethodBinding(final String reference, Class[] params)
+ throws ReferenceSyntaxException
{
checkNull(reference, "reference");
checkEmpty(reference, "reference");
@@ -1125,8 +1111,8 @@
try
{
- methodExpression = getExpressionFactory().createMethodExpression(threadELContext(), reference,
- Object.class, params);
+ methodExpression =
+ getExpressionFactory().createMethodExpression(threadELContext(), reference, Object.class, params);
}
catch (ELException e)
{
@@ -1152,7 +1138,7 @@
try
{
- return (Validator) validatorClass.newInstance();
+ return (Validator)validatorClass.newInstance();
}
catch (Exception e)
{
@@ -1324,7 +1310,7 @@
public void removeListener(SystemEventListener listener)
{
assert listener != null;
-
+
if (_lstSystemEventListener != null)
{
_lstSystemEventListener.remove(listener);
@@ -1334,7 +1320,7 @@
public void removeListener(SystemEventListener listener, Class<?> sourceClass)
{
assert listener != null;
-
+
if (sourceClass == null)
{
removeListener(listener);
@@ -1351,8 +1337,9 @@
}
}
}
-
- public void publish(Class<? extends SystemEvent> systemEventClass, Class<?> classSource, Object source, SystemEvent event)
+
+ public void publish(Class<? extends SystemEvent> systemEventClass, Class<?> classSource, Object source,
+ SystemEvent event)
{
if (source != null && _sourceClassMap != null)
{
@@ -1374,8 +1361,8 @@
{
if (_lstSystemEventListener == null)
{
- // TODO: Check if modification occurs often or not, might have to use a synchronized
- // list instead
+ // TODO: Check if modification occurs often or not, might have to use a synchronized
+ // list instead
_lstSystemEventListener = new CopyOnWriteArrayList<SystemEventListener>();
}
@@ -1392,8 +1379,8 @@
List<SystemEventListener> list = _sourceClassMap.get(sourceClass);
if (list == null)
{
- // TODO: Check if modification occurs often or not, might have to use a synchronized
- // list instead
+ // TODO: Check if modification occurs often or not, might have to use a synchronized
+ // list instead
list = new CopyOnWriteArrayList<SystemEventListener>();
_sourceClassMap.put(sourceClass, list);
}
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/DefaultResourceHandlerSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/DefaultResourceHandlerSupport.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/DefaultResourceHandlerSupport.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/DefaultResourceHandlerSupport.java Sun Oct 5 10:06:02 2008
@@ -23,8 +23,6 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.myfaces.application.DefaultViewHandlerSupport.FacesServletMapping;
import org.apache.myfaces.resource.ClassLoaderResourceLoader;
import org.apache.myfaces.resource.ExternalContextResourceLoader;
@@ -47,8 +45,6 @@
DefaultResourceHandlerSupport.class.getName() + ".CACHED_SERVLET_MAPPING";
private ResourceLoader[] _resourceLoaders;
-
- private static final Log log = LogFactory.getLog(DefaultResourceHandlerSupport.class);
public String calculateResourceBasePath(FacesContext facesContext)
{
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/DefaultViewHandlerSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/DefaultViewHandlerSupport.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/DefaultViewHandlerSupport.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/DefaultViewHandlerSupport.java Sun Oct 5 10:06:02 2008
@@ -50,7 +50,7 @@
{
viewId = applyDefaultSuffix(context, viewId);
}
- else if (mapping != null && viewId != null && mapping.getUrlPattern().startsWith(viewId))
+ else if (viewId != null && mapping.getUrlPattern().startsWith(viewId))
{
throw new InvalidViewIdException(viewId);
}
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java Sun Oct 5 10:06:02 2008
@@ -61,6 +61,7 @@
if (log.isTraceEnabled()) log.trace("New NavigationHandler instance created");
}
+ @Override
public void handleNavigation(FacesContext facesContext, String fromAction, String outcome)
{
if (outcome == null)
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java Sun Oct 5 10:06:02 2008
@@ -108,7 +108,8 @@
{
prefix = localePrefix;
}
- boolean prependPrefix = (prefix != null && !"".equals(prefix));
+
+ boolean prependPrefix = !"".equals(prefix);
if (null != libraryName)
{
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java Sun Oct 5 10:06:02 2008
@@ -151,6 +151,7 @@
if (log.isTraceEnabled()) log.trace("New JspStateManagerImpl instance created");
}
+ @Override
protected Object getComponentStateToSave(FacesContext facesContext)
{
if (log.isTraceEnabled()) log.trace("Entering getComponentStateToSave");
@@ -173,6 +174,7 @@
* tree to be recreated later, though all the components will have
* just default values for their members.
*/
+ @Override
protected Object getTreeStructureToSave(FacesContext facesContext)
{
if (log.isTraceEnabled()) log.trace("Entering getTreeStructureToSave");
@@ -193,6 +195,7 @@
* the server) and walk the tree restoring the members of each node
* from the saved state information.
*/
+ @Override
protected void restoreComponentState(FacesContext facesContext,
UIViewRoot uiViewRoot,
String renderKitId)
@@ -274,6 +277,7 @@
/**
* See getTreeStructureToSave.
*/
+ @Override
protected UIViewRoot restoreTreeStructure(FacesContext facesContext,
String viewId,
String renderKitId)
@@ -327,6 +331,7 @@
return uiViewRoot;
}
+ @Override
public UIViewRoot restoreView(FacesContext facesContext, String viewId, String renderKitId)
{
if (log.isTraceEnabled()) log.trace("Entering restoreView - viewId: "+viewId+" ; renderKitId: "+renderKitId);
@@ -367,6 +372,7 @@
return uiViewRoot;
}
+ @Override
public SerializedView saveSerializedView(FacesContext facesContext) throws IllegalStateException
{
if (log.isTraceEnabled()) log.trace("Entering saveSerializedView");
@@ -479,12 +485,10 @@
buf.insert(0,intBuf.toString());
- if(component!=null)
- {
- getPathToComponent(component.getParent(),buf);
- }
+ getPathToComponent(component.getParent(),buf);
}
+ @Override
public void writeState(FacesContext facesContext,
SerializedView serializedView) throws IOException
{
@@ -523,6 +527,7 @@
* @param serializedView
* @throws IOException
*/
+ @Override
public void writeStateAsUrlParams(FacesContext facesContext,
SerializedView serializedView) throws IOException
{
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java Sun Oct 5 10:06:02 2008
@@ -149,6 +149,7 @@
* Get the locales specified as acceptable by the original request, compare them to the
* locales supported by this Application and return the best match.
*/
+ @Override
public Locale calculateLocale(FacesContext facesContext)
{
Application application = facesContext.getApplication();
@@ -177,6 +178,7 @@
return defaultLocale != null ? defaultLocale : Locale.getDefault();
}
+ @Override
public String calculateRenderKitId(FacesContext facesContext)
{
Object renderKitId = facesContext.getExternalContext().getRequestMap().get(
@@ -199,6 +201,7 @@
* the viewRoot currently configured for the facesContext (if any). This means that on navigation
* from one view to another these settings are "inherited".
*/
+ @Override
public UIViewRoot createView(FacesContext facesContext, String viewId)
{
String calculatedViewId = viewId;
@@ -278,11 +281,13 @@
* <p>
* This method simply delegates to ViewHandlerSupport.calculateActionURL.
*/
+ @Override
public String getActionURL(FacesContext facesContext, String viewId)
{
return getViewHandlerSupport().calculateActionURL(facesContext, viewId);
}
+ @Override
public String getResourceURL(FacesContext facesContext, String path)
{
if (path.length() > 0 && path.charAt(0) == '/')
@@ -304,6 +309,7 @@
* <p>
* The component tree is then walked to generate the appropriate output for each component.
*/
+ @Override
public void renderView(FacesContext facesContext, UIViewRoot viewToRender) throws IOException, FacesException
{
if (viewToRender == null)
@@ -506,6 +512,7 @@
/**
* Just invoke StateManager.restoreView.
*/
+ @Override
public UIViewRoot restoreView(FacesContext facesContext, String viewId)
{
Application application = facesContext.getApplication();
@@ -540,6 +547,7 @@
* @param facesContext
* @throws IOException
*/
+ @Override
public void writeState(FacesContext facesContext) throws IOException
{
StateManager stateManager = facesContext.getApplication().getStateManager();
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/ViewResponseWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/ViewResponseWrapper.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/ViewResponseWrapper.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/ViewResponseWrapper.java Sun Oct 5 10:06:02 2008
@@ -161,6 +161,7 @@
_byteArrayOutputStream = new WrappedByteArrayOutputStream(1024);
}
+ @Override
public void write(int i) throws IOException
{
_byteArrayOutputStream.write(i);
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigDispenser.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigDispenser.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigDispenser.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigDispenser.java Sun Oct 5 10:06:02 2008
@@ -19,7 +19,6 @@
package org.apache.myfaces.config;
import java.util.Collection;
-import java.util.Iterator;
import javax.el.ELResolver;
@@ -71,20 +70,20 @@
/** @return Iterator over ApplicationFactory class names */
- public Iterator<String> getApplicationFactoryIterator();
+ public Collection<String> getApplicationFactoryIterator();
/** @return Iterator over FacesContextFactory class names */
- public Iterator<String> getFacesContextFactoryIterator();
+ public Collection<String> getFacesContextFactoryIterator();
/** @return Iterator over LifecycleFactory class names */
- public Iterator<String> getLifecycleFactoryIterator();
+ public Collection<String> getLifecycleFactoryIterator();
/** @return Iterator over RenderKit factory class names */
- public Iterator<String> getRenderKitFactoryIterator();
+ public Collection<String> getRenderKitFactoryIterator();
/** @return Iterator over ActionListener class names (in reverse order!) */
- public Iterator<String> getActionListenerIterator();
+ public Collection<String> getActionListenerIterator();
/** @return the default render kit id */
public String getDefaultRenderKitId();
@@ -93,45 +92,45 @@
public String getMessageBundle();
/** @return Iterator over NavigationHandler class names */
- public Iterator<String> getNavigationHandlerIterator();
+ public Collection<String> getNavigationHandlerIterator();
/** @return Iterator over ViewHandler class names */
- public Iterator<String> getViewHandlerIterator();
+ public Collection<String> getViewHandlerIterator();
/** @return Iterator over StateManager class names*/
- public Iterator<String> getStateManagerIterator();
+ public Collection<String> getStateManagerIterator();
/** @return Iterator over ResourceHandler class names*/
- public Iterator<String> getResourceHandlerIterator();
+ public Collection<String> getResourceHandlerIterator();
/** @return Iterator over PropertyResolver class names */
- public Iterator<String> getPropertyResolverIterator();
+ public Collection<String> getPropertyResolverIterator();
/** @return Iterator over VariableResolver class names */
- public Iterator<String> getVariableResolverIterator();
+ public Collection<String> getVariableResolverIterator();
/** @return the default locale name */
public String getDefaultLocale();
/** @return Iterator over supported locale names */
- public Iterator<String> getSupportedLocalesIterator();
+ public Collection<String> getSupportedLocalesIterator();
/** @return Iterator over all defined component types */
- public Iterator<String> getComponentTypes();
+ public Collection<String> getComponentTypes();
/** @return component class that belongs to the given component type */
public String getComponentClass(String componentType);
/** @return Iterator over all defined converter ids */
- public Iterator<String> getConverterIds();
+ public Collection<String> getConverterIds();
/** @return Iterator over all classes with an associated converter */
- public Iterator<String> getConverterClasses();
+ public Collection<String> getConverterClasses();
/** @return Iterator over the config classes for the converters */
- Iterator<String> getConverterConfigurationByClassName();
+ Collection<String> getConverterConfigurationByClassName();
/** delivers a converter-configuration for one class-name */
Converter getConverterConfiguration(String converterClassName);
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java Sun Oct 5 10:06:02 2008
@@ -28,6 +28,7 @@
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -526,10 +527,9 @@
while (facesConfigIt.hasNext())
{
Map.Entry<String, URL> entry = facesConfigIt.next();
- InputStream stream = null;
+ InputStream stream = openStreamWithoutCache(entry.getValue());
try
{
- openStreamWithoutCache(entry.getValue());
if (log.isInfoEnabled())
{
log.info("Reading config : " + entry.getKey());
@@ -539,10 +539,7 @@
}
finally
{
- if (stream != null)
- {
- stream.close();
- }
+ stream.close();
}
}
}
@@ -629,12 +626,11 @@
DEFAULT_RENDER_KIT_FACTORY);
}
- private void setFactories(String factoryName, Iterator<String> factories, String defaultFactory)
+ private void setFactories(String factoryName, Collection<String> factories, String defaultFactory)
{
FactoryFinder.setFactory(factoryName, defaultFactory);
- while (factories.hasNext())
+ for (String factory : factories)
{
- String factory = factories.next();
if (!factory.equals(defaultFactory))
{
FactoryFinder.setFactory(factoryName, factory);
@@ -662,8 +658,8 @@
Application application = ((ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();
FacesConfigDispenser<FacesConfig> dispenser = getDispenser();
- application.setActionListener((ActionListener)getApplicationObject(ActionListener.class,
- dispenser.getActionListenerIterator(), null));
+ application.setActionListener(getApplicationObject(ActionListener.class,
+ dispenser.getActionListenerIterator(), null));
if (dispenser.getDefaultLocale() != null)
{
@@ -680,45 +676,43 @@
application.setMessageBundle(dispenser.getMessageBundle());
}
- application.setNavigationHandler((NavigationHandler)getApplicationObject(NavigationHandler.class,
- dispenser.getNavigationHandlerIterator(),
- application.getNavigationHandler()));
-
- application.setStateManager((StateManager)getApplicationObject(StateManager.class,
- dispenser.getStateManagerIterator(),
- application.getStateManager()));
-
- application.setResourceHandler((ResourceHandler)getApplicationObject(ResourceHandler.class,
- dispenser.getResourceHandlerIterator(),
- application.getResourceHandler()));
+ application.setNavigationHandler(getApplicationObject(NavigationHandler.class,
+ dispenser.getNavigationHandlerIterator(),
+ application.getNavigationHandler()));
+
+ application.setStateManager(getApplicationObject(StateManager.class,
+ dispenser.getStateManagerIterator(),
+ application.getStateManager()));
+
+ application.setResourceHandler(getApplicationObject(ResourceHandler.class,
+ dispenser.getResourceHandlerIterator(),
+ application.getResourceHandler()));
List<Locale> locales = new ArrayList<Locale>();
- for (Iterator<String> it = dispenser.getSupportedLocalesIterator(); it.hasNext();)
+ for (String locale : dispenser.getSupportedLocalesIterator())
{
- locales.add(LocaleUtils.toLocale((String) it.next()));
+ locales.add(LocaleUtils.toLocale(locale));
}
application.setSupportedLocales(locales);
- application.setViewHandler((ViewHandler) getApplicationObject(ViewHandler.class,
- dispenser.getViewHandlerIterator(),
- application.getViewHandler()));
+ application.setViewHandler(getApplicationObject(ViewHandler.class,
+ dispenser.getViewHandlerIterator(),
+ application.getViewHandler()));
- for (Iterator<String> it = dispenser.getComponentTypes(); it.hasNext();)
+
+ for (String componentType : dispenser.getComponentTypes())
{
- String componentType = it.next();
application.addComponent(componentType, dispenser.getComponentClass(componentType));
}
- for (Iterator<String> it = dispenser.getConverterIds(); it.hasNext();)
+ for (String converterId : dispenser.getConverterIds())
{
- String converterId = it.next();
application.addConverter(converterId, dispenser.getConverterClassById(converterId));
}
- for (Iterator<String> it = dispenser.getConverterClasses(); it.hasNext();)
+ for (String converterClass : dispenser.getConverterClasses())
{
- String converterClass = it.next();
try
{
application.addConverter(ClassUtils.simpleClassForName(converterClass),
@@ -732,12 +726,10 @@
if (application instanceof ApplicationImpl)
{
- for (Iterator<String> it = dispenser.getConverterConfigurationByClassName(); it.hasNext();)
+ for (String converterClassName : dispenser.getConverterConfigurationByClassName())
{
- String converterClassName = it.next();
-
- ((ApplicationImpl)application).addConverterConfiguration(converterClassName,
- dispenser.getConverterConfiguration(converterClassName));
+ ApplicationImpl app = (ApplicationImpl)application;
+ app.addConverterConfiguration(converterClassName, dispenser.getConverterConfiguration(converterClassName));
}
}
@@ -748,13 +740,13 @@
RuntimeConfig runtimeConfig = getRuntimeConfig();
- runtimeConfig.setPropertyResolverChainHead((PropertyResolver) getApplicationObject(PropertyResolver.class,
- dispenser.getPropertyResolverIterator(),
- new DefaultPropertyResolver()));
-
- runtimeConfig.setVariableResolverChainHead((VariableResolver) getApplicationObject(VariableResolver.class,
- dispenser.getVariableResolverIterator(),
- new VariableResolverImpl()));
+ runtimeConfig.setPropertyResolverChainHead(getApplicationObject(PropertyResolver.class,
+ dispenser.getPropertyResolverIterator(),
+ new DefaultPropertyResolver()));
+
+ runtimeConfig.setVariableResolverChainHead(getApplicationObject(VariableResolver.class,
+ dispenser.getVariableResolverIterator(),
+ new VariableResolverImpl()));
}
/**
@@ -774,13 +766,12 @@
_runtimeConfig = runtimeConfig;
}
- private <T> T getApplicationObject(Class<T> interfaceClass, Iterator<String> classNamesIterator, T defaultObject)
+ private <T> T getApplicationObject(Class<T> interfaceClass, Collection<String> classNamesIterator, T defaultObject)
{
T current = defaultObject;
- while (classNamesIterator.hasNext())
+ for (String implClassName : classNamesIterator)
{
- String implClassName = (String) classNamesIterator.next();
Class<? extends T> implClass = ClassUtils.simpleClassForName(implClassName);
// check, if class is of expected interface type
@@ -877,7 +868,7 @@
{
for (Map.Entry<String, ManagedBean> entry : oldManagedBeans.entrySet())
{
- ManagedBean bean = (ManagedBean)entry.getValue();
+ ManagedBean bean = entry.getValue();
String scope = bean.getManagedBeanScope();
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/LastVariableResolverInChain.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/LastVariableResolverInChain.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/LastVariableResolverInChain.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/LastVariableResolverInChain.java Sun Oct 5 10:06:02 2008
@@ -40,6 +40,7 @@
}
// METHODS
+ @Override
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException
{
return delegate.resolveVariable(facesContext, name);
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java Sun Oct 5 10:06:02 2008
@@ -235,7 +235,6 @@
initializeMap(facesContext, property.getMapEntries(), (Map<Object, Object>) value);
break;
case ManagedProperty.TYPE_NULL:
- value = null;
break;
case ManagedProperty.TYPE_VALUE:
// check for correct scope of a referenced bean
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/AllAnnotationLifecycleProvider.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/AllAnnotationLifecycleProvider.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/AllAnnotationLifecycleProvider.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/AllAnnotationLifecycleProvider.java Sun Oct 5 10:06:02 2008
@@ -39,6 +39,7 @@
super(context);
}
+ @Override
protected void checkMethodAnnotation(Method method, Object instance)
throws NamingException, IllegalAccessException, InvocationTargetException
{
@@ -71,6 +72,7 @@
}
}
+ @Override
protected void checkFieldAnnotation(Field field, Object instance)
throws NamingException, IllegalAccessException
{
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java Sun Oct 5 10:06:02 2008
@@ -46,6 +46,7 @@
{
}
+ @Override
public LifecycleProvider getLifecycleProvider(ExternalContext externalContext)
{
if (LIFECYCLE_PROVIDER_INSTANCE == null)
@@ -70,6 +71,7 @@
return LIFECYCLE_PROVIDER_INSTANCE;
}
+ @Override
public void release() {
LIFECYCLE_PROVIDER_INSTANCE = null;
}
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/NoInjectionAnnotationLifecycleProvider.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/NoInjectionAnnotationLifecycleProvider.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/NoInjectionAnnotationLifecycleProvider.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/NoInjectionAnnotationLifecycleProvider.java Sun Oct 5 10:06:02 2008
@@ -28,16 +28,14 @@
import java.lang.reflect.Modifier;
/**
- * See SRV.14.5 Servlet Specification Version 2.5 JSR 154
- * and Common Annotations for the Java Platform JSR 250
-
+ * See SRV.14.5 Servlet Specification Version 2.5 JSR 154 and Common Annotations for the Java Platform JSR 250
*/
-public class NoInjectionAnnotationLifecycleProvider implements LifecycleProvider {
-
+public class NoInjectionAnnotationLifecycleProvider implements LifecycleProvider
+{
- public Object newInstance(String className)
- throws InstantiationException, IllegalAccessException, NamingException, InvocationTargetException, ClassNotFoundException
+ public Object newInstance(String className) throws InstantiationException, IllegalAccessException, NamingException,
+ InvocationTargetException, ClassNotFoundException
{
Class<?> clazz = ClassUtils.classForName(className);
Object object = clazz.newInstance();
@@ -49,8 +47,7 @@
/**
* Call postConstruct method on the specified instance.
*/
- private void postConstruct(Object instance)
- throws IllegalAccessException, InvocationTargetException
+ private void postConstruct(Object instance) throws IllegalAccessException, InvocationTargetException
{
// TODO the servlet spec is not clear about searching in superclass??
@@ -67,10 +64,8 @@
// the return value must be void
// the method may be public, protected, package private or private
- if ((postConstruct != null)
- || (method.getParameterTypes().length != 0)
- || (Modifier.isStatic(method.getModifiers()))
- || (method.getExceptionTypes().length > 0)
+ if ((postConstruct != null) || (method.getParameterTypes().length != 0)
+ || (Modifier.isStatic(method.getModifiers())) || (method.getExceptionTypes().length > 0)
|| (!method.getReturnType().getName().equals("void")))
{
throw new IllegalArgumentException("Invalid PostConstruct annotation");
@@ -83,8 +78,7 @@
}
- public void destroyInstance(Object instance)
- throws IllegalAccessException, InvocationTargetException
+ public void destroyInstance(Object instance) throws IllegalAccessException, InvocationTargetException
{
// TODO the servlet spec is not clear about searching in superclass??
@@ -101,10 +95,8 @@
// the return value must be void
// the method may be public, protected, package private or private
- if ((preDestroy != null)
- || (method.getParameterTypes().length != 0)
- || (Modifier.isStatic(method.getModifiers()))
- || (method.getExceptionTypes().length > 0)
+ if ((preDestroy != null) || (method.getParameterTypes().length != 0)
+ || (Modifier.isStatic(method.getModifiers())) || (method.getExceptionTypes().length > 0)
|| (!method.getReturnType().getName().equals("void")))
{
throw new IllegalArgumentException("Invalid PreDestroy annotation");
@@ -117,8 +109,8 @@
}
- private void invokeAnnotatedMethod(Method method, Object instance)
- throws IllegalAccessException, InvocationTargetException
+ private void invokeAnnotatedMethod(Method method, Object instance) throws IllegalAccessException,
+ InvocationTargetException
{
// At the end the annotated
// method is invoked
@@ -131,11 +123,14 @@
}
}
- /**
+ /**
* Inject resources in specified instance.
+ * @throws IllegalAccessException
+ * @throws InvocationTargetException
+ * @throws NamingException
*/
- protected void processAnnotations(Object instance)
- throws IllegalAccessException, InvocationTargetException, NamingException
+ protected void processAnnotations(Object instance) throws IllegalAccessException, InvocationTargetException,
+ NamingException
{
}
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/ResourceAnnotationLifecycleProvider.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/ResourceAnnotationLifecycleProvider.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/ResourceAnnotationLifecycleProvider.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/annotation/ResourceAnnotationLifecycleProvider.java Sun Oct 5 10:06:02 2008
@@ -41,6 +41,7 @@
/**
* Inject resources in specified instance.
*/
+ @Override
protected void processAnnotations(Object instance)
throws IllegalAccessException, InvocationTargetException, NamingException
{
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigDispenserImpl.java Sun Oct 5 10:06:02 2008
@@ -22,7 +22,6 @@
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -44,8 +43,7 @@
/**
* @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
*/
-public class DigesterFacesConfigDispenserImpl implements
- FacesConfigDispenser<FacesConfig>
+public class DigesterFacesConfigDispenserImpl implements FacesConfigDispenser<FacesConfig>
{
private List<FacesConfig> configs = new ArrayList<FacesConfig>();
@@ -84,36 +82,35 @@
public void feed(FacesConfig config)
{
configs.add(config);
- for (Iterator<Factory> iterator = config.getFactories().iterator(); iterator.hasNext();)
+ for (Factory factory : config.getFactories())
{
- Factory factory = iterator.next();
applicationFactories.addAll(factory.getApplicationFactory());
facesContextFactories.addAll(factory.getFacesContextFactory());
lifecycleFactories.addAll(factory.getLifecycleFactory());
renderKitFactories.addAll(factory.getRenderkitFactory());
}
-
+
components.putAll(config.getComponents());
validators.putAll(config.getValidators());
- for (Iterator<Application> iterator = config.getApplications().iterator(); iterator.hasNext();)
+ for (Application application : config.getApplications())
{
- Application application = iterator.next();
if (!application.getDefaultRenderkitId().isEmpty())
{
- defaultRenderKitId = application.getDefaultRenderkitId().get(application.getDefaultRenderkitId().size() - 1);
+ defaultRenderKitId =
+ application.getDefaultRenderkitId().get(application.getDefaultRenderkitId().size() - 1);
}
-
+
if (!application.getMessageBundle().isEmpty())
{
messageBundle = application.getMessageBundle().get(application.getMessageBundle().size() - 1);
}
-
+
if (!application.getLocaleConfig().isEmpty())
{
localeConfig = application.getLocaleConfig().get(application.getLocaleConfig().size() - 1);
}
-
+
actionListeners.addAll(application.getActionListener());
navigationHandlers.addAll(application.getNavigationHandler());
resourceHandlers.addAll(application.getResourceHandler());
@@ -124,11 +121,9 @@
resourceBundles.addAll(application.getResourceBundle());
elResolvers.addAll(application.getElResolver());
}
-
- for (Iterator<Converter> iterator = config.getConverters().iterator(); iterator.hasNext();)
- {
- Converter converter = iterator.next();
+ for (Converter converter : config.getConverters())
+ {
if (converter.getConverterId() != null)
{
converterById.put(converter.getConverterId(), converter.getConverterClass());
@@ -141,9 +136,8 @@
converterConfigurationByClassName.put(converter.getConverterClass(), converter);
}
- for (Iterator<RenderKit> iterator = config.getRenderKits().iterator(); iterator.hasNext();)
+ for (RenderKit renderKit : config.getRenderKits())
{
- RenderKit renderKit = (RenderKit) iterator.next();
String renderKitId = renderKit.getId();
if (renderKitId == null)
@@ -162,7 +156,7 @@
existing.merge(renderKit);
}
}
-
+
lifecyclePhaseListeners.addAll(config.getLifecyclePhaseListener());
managedBeans.addAll(config.getManagedBeans());
navigationRules.addAll(config.getNavigationRules());
@@ -213,44 +207,44 @@
}
/**
- * @return Iterator over ApplicationFactory class names
+ * @return Collection over ApplicationFactory class names
*/
- public Iterator<String> getApplicationFactoryIterator()
+ public Collection<String> getApplicationFactoryIterator()
{
- return applicationFactories.iterator();
+ return applicationFactories;
}
/**
- * @return Iterator over FacesContextFactory class names
+ * @return Collection over FacesContextFactory class names
*/
- public Iterator<String> getFacesContextFactoryIterator()
+ public Collection<String> getFacesContextFactoryIterator()
{
- return facesContextFactories.iterator();
+ return facesContextFactories;
}
/**
- * @return Iterator over LifecycleFactory class names
+ * @return Collection over LifecycleFactory class names
*/
- public Iterator<String> getLifecycleFactoryIterator()
+ public Collection<String> getLifecycleFactoryIterator()
{
- return lifecycleFactories.iterator();
+ return lifecycleFactories;
}
/**
- * @return Iterator over RenderKit factory class names
+ * @return Collection over RenderKit factory class names
*/
- public Iterator<String> getRenderKitFactoryIterator()
+ public Collection<String> getRenderKitFactoryIterator()
{
- return renderKitFactories.iterator();
+ return renderKitFactories;
}
/**
- * @return Iterator over ActionListener class names
+ * @return Collection over ActionListener class names
*/
- public Iterator<String> getActionListenerIterator()
+ public Collection<String> getActionListenerIterator()
{
List<String> listeners = new ArrayList<String>(actionListeners);
- return listeners.iterator();
+ return listeners;
}
/**
@@ -262,7 +256,7 @@
}
/**
- * @return Iterator over message bundle names
+ * @return Collection over message bundle names
*/
public String getMessageBundle()
{
@@ -270,58 +264,57 @@
}
/**
- * @return Iterator over NavigationHandler class names
+ * @return Collection over NavigationHandler class names
*/
- public Iterator<String> getNavigationHandlerIterator()
+ public Collection<String> getNavigationHandlerIterator()
{
List<String> handlers = new ArrayList<String>(navigationHandlers);
- return handlers.iterator();
+ return handlers;
}
/**
- * @return Iterator over ResourceHandler class names
+ * @return Collection over ResourceHandler class names
*/
- public Iterator<String> getResourceHandlerIterator()
+ public Collection<String> getResourceHandlerIterator()
{
List<String> handlers = new ArrayList<String>(resourceHandlers);
- return handlers.iterator();
+ return handlers;
}
/**
- * @return Iterator over ViewHandler class names
+ * @return Collection over ViewHandler class names
*/
- public Iterator<String> getViewHandlerIterator()
+ public Collection<String> getViewHandlerIterator()
{
- List<String> handlers = new ArrayList<String>(viewHandlers);
- return handlers.iterator();
+ return new ArrayList<String>(viewHandlers);
}
/**
- * @return Iterator over StateManager class names
+ * @return Collection over StateManager class names
*/
- public Iterator<String> getStateManagerIterator()
+ public Collection<String> getStateManagerIterator()
{
List<String> managers = new ArrayList<String>(stateManagers);
- return managers.iterator();
+ return managers;
}
/**
- * @return Iterator over PropertyResolver class names
+ * @return Collection over PropertyResolver class names
*/
- public Iterator<String> getPropertyResolverIterator()
+ public Collection<String> getPropertyResolverIterator()
{
List<String> resolver = new ArrayList<String>(propertyResolver);
- return resolver.iterator();
+ return resolver;
}
/**
- * @return Iterator over VariableResolver class names
+ * @return Collection over VariableResolver class names
*/
- public Iterator<String> getVariableResolverIterator()
+ public Collection<String> getVariableResolverIterator()
{
List<String> resolver = new ArrayList<String>(variableResolver);
- return resolver.iterator();
+ return resolver;
}
/**
@@ -337,9 +330,9 @@
}
/**
- * @return Iterator over supported locale names
+ * @return Collection over supported locale names
*/
- public Iterator<String> getSupportedLocalesIterator()
+ public Collection<String> getSupportedLocalesIterator()
{
List<String> locale;
if (localeConfig != null)
@@ -350,16 +343,16 @@
{
locale = Collections.emptyList();
}
-
- return locale.iterator();
+
+ return locale;
}
/**
- * @return Iterator over all defined component types
+ * @return Collection over all defined component types
*/
- public Iterator<String> getComponentTypes()
+ public Collection<String> getComponentTypes()
{
- return components.keySet().iterator();
+ return components.keySet();
}
/**
@@ -371,24 +364,24 @@
}
/**
- * @return Iterator over all defined converter ids
+ * @return Collection over all defined converter ids
*/
- public Iterator<String> getConverterIds()
+ public Collection<String> getConverterIds()
{
- return converterById.keySet().iterator();
+ return converterById.keySet();
}
/**
- * @return Iterator over all classes with an associated converter
+ * @return Collection over all classes with an associated converter
*/
- public Iterator<String> getConverterClasses()
+ public Collection<String> getConverterClasses()
{
- return converterByClass.keySet().iterator();
+ return converterByClass.keySet();
}
- public Iterator<String> getConverterConfigurationByClassName()
+ public Collection<String> getConverterConfigurationByClassName()
{
- return converterConfigurationByClassName.keySet().iterator();
+ return converterConfigurationByClassName.keySet();
}
public Converter getConverterConfiguration(String converterClassName)
@@ -413,7 +406,7 @@
}
/**
- * @return Iterator over all defined validator ids
+ * @return Collection over all defined validator ids
*/
public Collection<String> getValidatorIds()
{
@@ -429,8 +422,7 @@
}
/**
- * @return Iterator over
- * {@link org.apache.myfaces.config.element.ManagedBean ManagedBean}s
+ * @return Collection over {@link org.apache.myfaces.config.element.ManagedBean ManagedBean}s
*/
public Collection<ManagedBean> getManagedBeans()
{
@@ -438,8 +430,7 @@
}
/**
- * @return Iterator over
- * {@link org.apache.myfaces.config.element.NavigationRule NavigationRule}s
+ * @return Collection over {@link org.apache.myfaces.config.element.NavigationRule NavigationRule}s
*/
public Collection<NavigationRule> getNavigationRules()
{
@@ -447,7 +438,7 @@
}
/**
- * @return Iterator over all defined renderkit ids
+ * @return Collection over all defined renderkit ids
*/
public Collection<String> getRenderKitIds()
{
@@ -463,9 +454,7 @@
}
/**
- * @return Iterator over
- * {@link org.apache.myfaces.config.element.Renderer Renderer}s for
- * the given renderKitId
+ * @return Collection over {@link org.apache.myfaces.config.element.Renderer Renderer}s for the given renderKitId
*/
public Collection<Renderer> getRenderers(String renderKitId)
{
@@ -473,8 +462,7 @@
}
/**
- * @return Iterator over {@link javax.faces.event.PhaseListener}
- * implementation class names
+ * @return Collection over {@link javax.faces.event.PhaseListener} implementation class names
*/
public Collection<String> getLifecyclePhaseListeners()
{
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ManagedProperty.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ManagedProperty.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ManagedProperty.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ManagedProperty.java Sun Oct 5 10:06:02 2008
@@ -138,26 +138,31 @@
private static class DummyValueBinding extends ValueBinding
{
+ @Override
public String getExpressionString()
{
throw new UnsupportedOperationException();
}
+ @Override
public Class<?> getType(FacesContext facesContext)
{
throw new UnsupportedOperationException();
}
+ @Override
public Object getValue(FacesContext facesContext)
{
throw new UnsupportedOperationException();
}
+ @Override
public boolean isReadOnly(FacesContext facesContext)
{
throw new UnsupportedOperationException();
}
+ @Override
public void setValue(FacesContext facesContext, Object value)
{
throw new UnsupportedOperationException();
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/FacesContextFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/FacesContextFactoryImpl.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/FacesContextFactoryImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/FacesContextFactoryImpl.java Sun Oct 5 10:06:02 2008
@@ -30,38 +30,38 @@
/**
* DOCUMENT ME!
+ *
* @author Manfred Geiler (latest modification by $Author$)
* @version $Revision$ $Date$
*/
-public class FacesContextFactoryImpl
- extends FacesContextFactory
+public class FacesContextFactoryImpl extends FacesContextFactory
{
- public FacesContext getFacesContext(Object context,
- Object request,
- Object response,
- Lifecycle lifecycle)
- throws FacesException
+ @Override
+ public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle)
+ throws FacesException
{
- if (context == null) {
+ if (context == null)
+ {
throw new NullPointerException("context");
}
- if (request == null) {
+ if (request == null)
+ {
throw new NullPointerException("request");
}
- if (response == null) {
+ if (response == null)
+ {
throw new NullPointerException("response");
}
- if (lifecycle == null) {
+ if (lifecycle == null)
+ {
throw new NullPointerException("lifecycle");
}
if (context instanceof ServletContext)
{
- return new FacesContextImpl((ServletContext)context,
- (ServletRequest)request,
- (ServletResponse)response);
+ return new FacesContextImpl((ServletContext)context, (ServletRequest)request, (ServletResponse)response);
}
-
+
throw new FacesException("Unsupported context type " + context.getClass().getName());
}
}
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/FacesContextWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/FacesContextWrapper.java?rev=701829&r1=701828&r2=701829&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/FacesContextWrapper.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/FacesContextWrapper.java Sun Oct 5 10:06:02 2008
@@ -30,124 +30,143 @@
import javax.faces.render.RenderKit;
import java.util.Iterator;
-
/**
* Convenient class to wrap the current FacesContext.
+ *
* @author Manfred Geiler (latest modification by $Author$)
* @author Anton Koinov
* @version $Revision$ $Date$
*/
-public class FacesContextWrapper
- extends FacesContext
+public class FacesContextWrapper extends FacesContext
{
- //~ Instance fields ----------------------------------------------------------------------------
+ // ~ Instance fields ----------------------------------------------------------------------------
private FacesContext _facesContext;
- //~ Constructors -------------------------------------------------------------------------------
+ // ~ Constructors -------------------------------------------------------------------------------
public FacesContextWrapper(FacesContext facesContext)
{
_facesContext = facesContext;
}
- //~ Methods ------------------------------------------------------------------------------------
+ // ~ Methods ------------------------------------------------------------------------------------
+ @Override
public Application getApplication()
{
return _facesContext.getApplication();
}
+ @Override
public Iterator<String> getClientIdsWithMessages()
{
return _facesContext.getClientIdsWithMessages();
}
+ @Override
public ExternalContext getExternalContext()
{
return _facesContext.getExternalContext();
}
+ @Override
public Severity getMaximumSeverity()
{
return _facesContext.getMaximumSeverity();
}
+ @Override
public Iterator<FacesMessage> getMessages()
{
return _facesContext.getMessages();
}
+ @Override
public Iterator<FacesMessage> getMessages(String clientId)
{
return _facesContext.getMessages(clientId);
}
+ @Override
public RenderKit getRenderKit()
{
return _facesContext.getRenderKit();
}
+ @Override
public boolean getRenderResponse()
{
return _facesContext.getRenderResponse();
}
+ @Override
public boolean getResponseComplete()
{
return _facesContext.getResponseComplete();
}
+ @Override
public void setResponseStream(ResponseStream responsestream)
{
_facesContext.setResponseStream(responsestream);
}
+ @Override
public ResponseStream getResponseStream()
{
return _facesContext.getResponseStream();
}
+ @Override
public void setResponseWriter(ResponseWriter responsewriter)
{
_facesContext.setResponseWriter(responsewriter);
}
+ @Override
public ResponseWriter getResponseWriter()
{
return _facesContext.getResponseWriter();
}
+ @Override
public void setViewRoot(UIViewRoot viewRoot)
{
_facesContext.setViewRoot(viewRoot);
}
+ @Override
public UIViewRoot getViewRoot()
{
return _facesContext.getViewRoot();
}
+ @Override
public void addMessage(String clientId, FacesMessage message)
{
_facesContext.addMessage(clientId, message);
}
+ @Override
public void release()
{
_facesContext.release();
}
+ @Override
public void renderResponse()
{
_facesContext.renderResponse();
}
+ @Override
public void responseComplete()
{
_facesContext.responseComplete();
}
-
+
+ @Override
public ELContext getELContext()
{
return _facesContext.getELContext();