Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   *
   * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
   *
   * The contents of this file are subject to the terms of either the GNU
   * General Public License Version 2 only ("GPL") or the Common Development
   * and Distribution License("CDDL") (collectively, the "License").  You
   * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
  * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
  * When distributing the software, include this License Header Notice in each
  * file and include the License file at packager/legal/LICENSE.txt.
  *
  * GPL Classpath Exception:
  * Oracle designates this particular file as subject to the "Classpath"
  * exception as provided by Oracle in the GPL Version 2 section of the License
  * file that accompanied this code.
  *
  * Modifications:
  * If applicable, add the following below the License Header, with the fields
  * enclosed by brackets [] replaced by your own identifying information:
  * "Portions Copyright [year] [name of copyright owner]"
  *
  * Contributor(s):
  * If you wish your version of this file to be governed by only the CDDL or
  * only the GPL Version 2, indicate your decision by adding "[Contributor]
  * elects to include this software in this distribution under the [CDDL or GPL
  * Version 2] license."  If you don't indicate a single choice of license, a
  * recipient has the option to distribute your version of this file under
  * either the CDDL, the GPL Version 2 or to extend the choice of license to
  * its licensees as provided above.  However, if you add GPL Version 2 code
  * and therefore, elected the GPL Version 2 license, then the option applies
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
 
 package javax.faces.application;
 
 import java.util.Map;
 

Provides a simple implementation of Application that can be subclassed by developers wishing to provide specialized behavior to an existing Application instance. The default implementation of all methods is to call through to the wrapped Application.

Usage: extend this class and override getWrapped() to return the instance we are wrapping.

Since:
2.0
 
 public abstract class ApplicationWrapper extends Application implements FacesWrapper<Application> {
 
     public abstract Application getWrapped();

    

The default behavior of this method is to call Application.getActionListener() on the wrapped Application object.

 
     @Override
     public ActionListener getActionListener() {
         return getWrapped().getActionListener();
     }

    

The default behavior of this method is to call Application.setActionListener(javax.faces.event.ActionListener) on the wrapped Application object.

    @Override
    public void setActionListener(ActionListener listener) {
        getWrapped().setActionListener(listener);
    }

    

The default behavior of this method is to call Application.getDefaultLocale() on the wrapped Application object.

    @Override
    public Locale getDefaultLocale() {
        return getWrapped().getDefaultLocale();
    }

    

The default behavior of this method is to call Application.setDefaultLocale(java.util.Locale) on the wrapped Application object.

    @Override
    public void setDefaultLocale(Locale locale) {
        getWrapped().setDefaultLocale(locale);
    }

    

The default behavior of this method is to call Application.getDefaultRenderKitId() on the wrapped Application object.

    @Override
    public String getDefaultRenderKitId() {
        return getWrapped().getDefaultRenderKitId();
    }

    

The default behavior of this method is to call Application.addDefaultValidatorId(java.lang.String) on the wrapped Application object.

    @Override
    public void addDefaultValidatorId(String validatorId) {
        getWrapped().addDefaultValidatorId(validatorId);
    }

    

The default behavior of this method is to call Application.getDefaultValidatorInfo() on the wrapped Application object.

    @Override
    public Map<StringStringgetDefaultValidatorInfo() {
        return getWrapped().getDefaultValidatorInfo();
    }

    

The default behavior of this method is to call Application.setDefaultRenderKitId(java.lang.String) on the wrapped Application object.

    @Override
    public void setDefaultRenderKitId(String renderKitId) {
        getWrapped().setDefaultRenderKitId(renderKitId);
    }

    

The default behavior of this method is to call Application.getMessageBundle() on the wrapped Application object.

    @Override
    public String getMessageBundle() {
        return getWrapped().getMessageBundle();
    }

    

The default behavior of this method is to call Application.setMessageBundle(java.lang.String) on the wrapped Application object.

    @Override
    public void setMessageBundle(String bundle) {
        getWrapped().setMessageBundle(bundle);
    }

    

The default behavior of this method is to call Application.getNavigationHandler() on the wrapped Application object.

    @Override
        return getWrapped().getNavigationHandler();
    }

    

The default behavior of this method is to call Application.setNavigationHandler(javax.faces.application.NavigationHandler) on the wrapped Application object.

    @Override
    public void setNavigationHandler(NavigationHandler handler) {
        getWrapped().setNavigationHandler(handler);
    }

    

The default behavior of this method is to call Application.getPropertyResolver() on the wrapped Application object.

    @Override
        return getWrapped().getPropertyResolver();
    }

    

The default behavior of this method is to call Application.setPropertyResolver(javax.faces.el.PropertyResolver) on the wrapped Application object.

    @Override
    public void setPropertyResolver(PropertyResolver resolver) {
        getWrapped().setPropertyResolver(resolver);
    }

    

The default behavior of this method is to call Application.getVariableResolver() on the wrapped Application object.

    @Override
        return getWrapped().getVariableResolver();
    }

    

The default behavior of this method is to call Application.setVariableResolver(javax.faces.el.VariableResolver) on the wrapped Application object.

    @Override
    public void setVariableResolver(VariableResolver resolver) {
        getWrapped().setVariableResolver(resolver);
    }

    

The default behavior of this method is to call Application.getViewHandler() on the wrapped Application object.

    @Override
    public ViewHandler getViewHandler() {
        return getWrapped().getViewHandler();
    }

    

The default behavior of this method is to call Application.setViewHandler(javax.faces.application.ViewHandler) on the wrapped Application object.

    @Override
    public void setViewHandler(ViewHandler handler) {
        getWrapped().setViewHandler(handler);
    }

    

The default behavior of this method is to call Application.getStateManager() on the wrapped Application object.

    @Override
    public StateManager getStateManager() {
        return getWrapped().getStateManager();
    }

    

The default behavior of this method is to call Application.setStateManager(javax.faces.application.StateManager) on the wrapped Application object.

    @Override
    public void setStateManager(StateManager manager) {
        getWrapped().setStateManager(manager);
    }

    

The default behavior of this method is to call Application.addComponent(java.lang.String,java.lang.String) on the wrapped Application object.

    @Override
    public void addComponent(String componentTypeString componentClass) {
        getWrapped().addComponent(componentTypecomponentClass);
    }

    

The default behavior of this method is to call Application.createComponent(java.lang.String) on the wrapped Application object.

    @Override
    public UIComponent createComponent(String componentType)
          throws FacesException {
        return getWrapped().createComponent(componentType);
    }

    
    @Override
    public UIComponent createComponent(ValueBinding componentBinding,
                                       FacesContext context,
                                       String componentType)
          throws FacesException {
        return getWrapped().createComponent(componentBinding,
                                            context,
                                            componentType);
    }

    

The default behavior of this method is to call Application.getComponentTypes() on the wrapped Application object.

    @Override
    public Iterator<StringgetComponentTypes() {
        return getWrapped().getComponentTypes();
    }

    

The default behavior of this method is to call Application.addConverter(java.lang.String,java.lang.String) on the wrapped Application object.

    @Override
    public void addConverter(String converterIdString converterClass) {
        getWrapped().addConverter(converterIdconverterClass);
    }

    

The default behavior of this method is to call Application.addConverter(java.lang.Class,java.lang.String) on the wrapped Application object.

    @Override
    public void addConverter(Class<?> targetClassString converterClass) {
        getWrapped().addConverter(targetClassconverterClass);
    }

    

The default behavior of this method is to call Application.createConverter(java.lang.String) on the wrapped Application object.

    @Override
    public Converter createConverter(String converterId) {
        return getWrapped().createConverter(converterId);
    }

    

The default behavior of this method is to call Application.createConverter(java.lang.Class) on the wrapped Application object.

    @Override
    public Converter createConverter(Class<?> targetClass) {
        return getWrapped().createConverter(targetClass);
    }

    

The default behavior of this method is to call Application.getConverterIds() on the wrapped Application object.

    @Override
    public Iterator<StringgetConverterIds() {
        return getWrapped().getConverterIds();
    }

    

The default behavior of this method is to call Application.getConverterTypes() on the wrapped Application object.

    @Override
    public Iterator<Class<?>> getConverterTypes() {
        return getWrapped().getConverterTypes();
    }

    

The default behavior of this method is to call Application.createMethodBinding(java.lang.String,java.lang.Class[]) on the wrapped Application object.

    @Override
    public MethodBinding createMethodBinding(String refClass<?>[] params)
          throws ReferenceSyntaxException {
        return getWrapped().createMethodBinding(refparams);
    }

    

The default behavior of this method is to call Application.getSupportedLocales() on the wrapped Application object.

    @Override
    public Iterator<LocalegetSupportedLocales() {
        return getWrapped().getSupportedLocales();
    }

    

The default behavior of this method is to call Application.setSupportedLocales(java.util.Collection) on the wrapped Application object.

    @Override
    public void setSupportedLocales(Collection<Localelocales) {
        getWrapped().setSupportedLocales(locales);
    }

    

The default behavior of this method is to call Application.addBehavior(java.lang.String,java.lang.String) on the wrapped Application object.

    @Override
    public void addBehavior(String behaviorIdString behaviorClass) {
        getWrapped().addBehavior(behaviorIdbehaviorClass);
    }

    

The default behavior of this method is to call Application.createBehavior(java.lang.String) on the wrapped Application object.

    @Override
    public Behavior createBehavior(String behaviorIdthrows FacesException {
        return getWrapped().createBehavior(behaviorId);
    }

    

The default behavior of this method is to call Application.getBehaviorIds() on the wrapped Application object.

    @Override
    public Iterator<StringgetBehaviorIds() {
        return getWrapped().getBehaviorIds();
    }

    

The default behavior of this method is to call Application.addValidator(java.lang.String,java.lang.String) on the wrapped Application object.

    @Override
    public void addValidator(String validatorIdString validatorClass) {
        getWrapped().addValidator(validatorIdvalidatorClass);
    }

    

The default behavior of this method is to call Application.createValidator(java.lang.String) on the wrapped Application object.

    @Override
    public Validator createValidator(String validatorIdthrows FacesException {
        return getWrapped().createValidator(validatorId);
    }

    

The default behavior of this method is to call Application.getValidatorIds() on the wrapped Application object.

    @Override
    public Iterator<StringgetValidatorIds() {
        return getWrapped().getValidatorIds();
    }

    

The default behavior of this method is to call Application.createValueBinding(java.lang.String) on the wrapped Application object.

    @Override
          throws ReferenceSyntaxException {
        return getWrapped().createValueBinding(ref);
    }

    

The default behavior of this method is to call Application.getResourceHandler() on the wrapped Application object.

    @Override
        return getWrapped().getResourceHandler();
    }

    

The default behavior of this method is to call Application.setResourceHandler(javax.faces.application.ResourceHandler) on the wrapped Application object.

    @Override
    public void setResourceHandler(ResourceHandler resourceHandler) {
        getWrapped().setResourceHandler(resourceHandler);
    }

    

The default behavior of this method is to call Application.getResourceBundle(javax.faces.context.FacesContext,java.lang.String) on the wrapped Application object.

    @Override
    public ResourceBundle getResourceBundle(FacesContext ctxString name) {
        return getWrapped().getResourceBundle(ctxname);
    }

    

The default behavior of this method is to call Application.getProjectStage() on the wrapped Application object.

    @Override
    public ProjectStage getProjectStage() {
        return getWrapped().getProjectStage();
    }

    

The default behavior of this method is to call Application.addELResolver(javax.el.ELResolver) on the wrapped Application object.

    @Override
    public void addELResolver(ELResolver resolver) {
        getWrapped().addELResolver(resolver);
    }

    

The default behavior of this method is to call Application.getELResolver() on the wrapped Application object.

    @Override
    public ELResolver getELResolver() {
        return getWrapped().getELResolver();
    }

    
    @Override
    public UIComponent createComponent(ValueExpression componentExpression,
                                       FacesContext context,
                                       String componentType)
          throws FacesException {
        return getWrapped().createComponent(componentExpressioncontextcomponentType);
    }

    
    @Override
    public UIComponent createComponent(ValueExpression componentExpression,
                                       FacesContext context,
                                       String componentType,
                                       String rendererType) {
        return getWrapped().createComponent(componentExpressioncontextcomponentTyperendererType);
    }

    

The default behavior of this method is to call Application.createComponent(javax.faces.context.FacesContext,java.lang.String,java.lang.String) on the wrapped Application object.

    @Override
    public UIComponent createComponent(FacesContext context,
                                       String componentType,
                                       String rendererType) {
        return getWrapped().createComponent(contextcomponentTyperendererType);
    }

    

The default behavior of this method is to call Application.createComponent(javax.faces.context.FacesContext,javax.faces.application.Resource) on the wrapped Application object.

    @Override
    public UIComponent createComponent(FacesContext context,
                                       Resource componentResource) {
        return getWrapped().createComponent(contextcomponentResource);
    }

    

The default behavior of this method is to call Application.getExpressionFactory() on the wrapped Application object.

    @Override
        return getWrapped().getExpressionFactory();
    }

    
    @Override
    public <T> T evaluateExpressionGet(FacesContext context,
                                       String expression,
                                       Class<? extends T> expectedType)
          throws ELException {
        return getWrapped().evaluateExpressionGet(contextexpressionexpectedType);
    }

    

The default behavior of this method is to call Application.addELContextListener(javax.el.ELContextListener) on the wrapped Application object.

    @Override
    public void addELContextListener(ELContextListener listener) {
        getWrapped().addELContextListener(listener);
    }

    

The default behavior of this method is to call Application.removeELContextListener(javax.el.ELContextListener) on the wrapped Application object.

    @Override
    public void removeELContextListener(ELContextListener listener) {
        getWrapped().removeELContextListener(listener);
    }

    

The default behavior of this method is to call Application.getELContextListeners() on the wrapped Application object.

    @Override
        return getWrapped().getELContextListeners();
    }

    

The default behavior of this method is to call Application.publishEvent(javax.faces.context.FacesContext,java.lang.Class,java.lang.Object) on the wrapped Application object.

    @Override
    public void publishEvent(FacesContext context,
                             Class<? extends SystemEventsystemEventClass,
                             Object source) {
        getWrapped().publishEvent(contextsystemEventClasssource);
    }

    
    @Override
    public void publishEvent(FacesContext context,
                             Class<? extends SystemEventsystemEventClass,
                             Class<?> sourceBaseType,
                             Object source) {
        getWrapped().publishEvent(context,
                                  systemEventClass,
                                  sourceBaseType,
                                  source);
    }

    
    @Override
    public void subscribeToEvent(Class<? extends SystemEventsystemEventClass,
                                 Class<?> sourceClass,
                                 SystemEventListener listener) {
        getWrapped().subscribeToEvent(systemEventClasssourceClasslistener);
    }

    

The default behavior of this method is to call Application.subscribeToEvent(java.lang.Class,javax.faces.event.SystemEventListener) on the wrapped Application object.

    @Override
    public void subscribeToEvent(Class<? extends SystemEventsystemEventClass,
                                 SystemEventListener listener) {
        getWrapped().subscribeToEvent(systemEventClasslistener);
    }

    
    @Override
    public void unsubscribeFromEvent(Class<? extends SystemEventsystemEventClass,
                                     Class<?> sourceClass,
                                     SystemEventListener listener) {
        getWrapped().unsubscribeFromEvent(systemEventClasssourceClasslistener);
    }

    

The default behavior of this method is to call Application.unsubscribeFromEvent(java.lang.Class,javax.faces.event.SystemEventListener) on the wrapped Application object.

    @Override
    public void unsubscribeFromEvent(Class<? extends SystemEventsystemEventClass,
                                     SystemEventListener listener) {
        getWrapped().unsubscribeFromEvent(systemEventClasslistener);
    }
New to GrepCode? Check out our FAQ X