myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sless...@apache.org
Subject svn commit: r722668 - in /myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application: ApplicationFactory.java ApplicationWrapper.java
Date Tue, 02 Dec 2008 23:25:33 GMT
Author: slessard
Date: Tue Dec  2 15:25:32 2008
New Revision: 722668

URL: http://svn.apache.org/viewvc?rev=722668&view=rev
Log:
MYFACES-2085 - Add ApplicationWrapper class

Added:
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationWrapper.java
Modified:
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationFactory.java

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationFactory.java?rev=722668&r1=722667&r2=722668&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationFactory.java
(original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationFactory.java
Tue Dec  2 15:25:32 2008
@@ -18,15 +18,32 @@
  */
 package javax.faces.application;
 
+import javax.faces.FacesWrapper;
+
 /**
  * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF
Specification</a>
  *
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public abstract class ApplicationFactory
+public abstract class ApplicationFactory implements FacesWrapper<ApplicationFactory>
 {
     public abstract Application getApplication();
-
+    
+    /**
+     * If this factory has been decorated, the implementation doing the decorating may override
this method to 
+     * provide access to the implementation being wrapped. A default implementation is provided
that returns 
+     * <code>null</code>.
+     * 
+     * @return the decorated <code>ApplicationFactory</code> if this factory
decorates another, 
+     *         or <code>null</code> otherwise
+     * 
+     * @since 2.0
+     */
+    public ApplicationFactory getWrapped()
+    {
+        return null;
+    }
+    
     public abstract void setApplication(Application application);
 }

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationWrapper.java?rev=722668&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationWrapper.java
(added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/ApplicationWrapper.java
Tue Dec  2 15:25:32 2008
@@ -0,0 +1,363 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package javax.faces.application;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Locale;
+
+import javax.faces.FacesException;
+import javax.faces.FacesWrapper;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.PropertyResolver;
+import javax.faces.el.ReferenceSyntaxException;
+import javax.faces.el.ValueBinding;
+import javax.faces.el.VariableResolver;
+import javax.faces.event.ActionListener;
+import javax.faces.validator.Validator;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2008-12-02 18:14:34 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public abstract class ApplicationWrapper extends Application implements FacesWrapper<Application>
+{
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addComponent(String componentType, String componentClass)
+    {
+        getWrapped().addComponent(componentType, componentClass);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addConverter(Class targetClass, String converterClass)
+    {
+        getWrapped().addConverter(targetClass, converterClass);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addConverter(String converterId, String converterClass)
+    {
+        getWrapped().addConverter(converterId, converterClass);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addValidator(String validatorId, String validatorClass)
+    {
+        getWrapped().addValidator(validatorId, validatorClass);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public UIComponent createComponent(String componentType) throws FacesException
+    {
+        return getWrapped().createComponent(componentType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public UIComponent createComponent(ValueBinding componentBinding, FacesContext context,
String componentType)
+            throws FacesException
+    {
+        return getWrapped().createComponent(componentBinding, context, componentType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Converter createConverter(Class targetClass)
+    {
+        return getWrapped().createConverter(targetClass);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Converter createConverter(String converterId)
+    {
+        return getWrapped().createConverter(converterId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public MethodBinding createMethodBinding(String ref, Class[] params) throws ReferenceSyntaxException
+    {
+        return getWrapped().createMethodBinding(ref, params);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Validator createValidator(String validatorId) throws FacesException
+    {
+        return getWrapped().createValidator(validatorId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ValueBinding createValueBinding(String ref) throws ReferenceSyntaxException
+    {
+        return getWrapped().createValueBinding(ref);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ActionListener getActionListener()
+    {
+        return getWrapped().getActionListener();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Iterator<String> getComponentTypes()
+    {
+        return getWrapped().getComponentTypes();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Iterator<String> getConverterIds()
+    {
+        return getWrapped().getConverterIds();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Iterator<Class> getConverterTypes()
+    {
+        return getWrapped().getConverterTypes();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Locale getDefaultLocale()
+    {
+        return getWrapped().getDefaultLocale();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getDefaultRenderKitId()
+    {
+        return getWrapped().getDefaultRenderKitId();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getMessageBundle()
+    {
+        return getWrapped().getMessageBundle();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public NavigationHandler getNavigationHandler()
+    {
+        return getWrapped().getNavigationHandler();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public PropertyResolver getPropertyResolver()
+    {
+        return getWrapped().getPropertyResolver();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public StateManager getStateManager()
+    {
+        return getWrapped().getStateManager();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Iterator<Locale> getSupportedLocales()
+    {
+        return getWrapped().getSupportedLocales();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Iterator<String> getValidatorIds()
+    {
+        return getWrapped().getValidatorIds();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public VariableResolver getVariableResolver()
+    {
+        return getWrapped().getVariableResolver();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ViewHandler getViewHandler()
+    {
+        return getWrapped().getViewHandler();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setActionListener(ActionListener listener)
+    {
+        getWrapped().setActionListener(listener);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setDefaultLocale(Locale locale)
+    {
+        getWrapped().setDefaultLocale(locale);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setDefaultRenderKitId(String renderKitId)
+    {
+        getWrapped().setDefaultRenderKitId(renderKitId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setMessageBundle(String bundle)
+    {
+        getWrapped().setMessageBundle(bundle);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setNavigationHandler(NavigationHandler handler)
+    {
+        getWrapped().setNavigationHandler(handler);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setPropertyResolver(PropertyResolver resolver)
+    {
+        getWrapped().setPropertyResolver(resolver);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setStateManager(StateManager manager)
+    {
+        getWrapped().setStateManager(manager);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSupportedLocales(Collection<Locale> locales)
+    {
+        getWrapped().setSupportedLocales(locales);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setVariableResolver(VariableResolver resolver)
+    {
+        getWrapped().setVariableResolver(resolver);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setViewHandler(ViewHandler handler)
+    {
+        getWrapped().setViewHandler(handler);
+    }
+
+    public abstract Application getWrapped();
+}



Mime
View raw message