javax.faces

Class FactoryFinder


public class FactoryFinder
extends Object

Field Summary

static String
APPLICATION_FACTORY
static String
FACES_CONTEXT_FACTORY
static String
LIFECYCLE_FACTORY
static String
RENDER_KIT_FACTORY

Method Summary

static Object
getFactory(String factoryName)
static void
releaseFactories()
static void
setFactory(String factoryName, String implName)

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

APPLICATION_FACTORY

public static final String APPLICATION_FACTORY
Field Value:
"javax.faces.application.ApplictionFactory"
Usages and Demos :

View More Examples of FactoryFinder.APPLICATION_FACTORY
   1:     ApplicationFactory factory = (ApplicationFactory)
   2:       FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
   3:     Application application = factory.getApplication();
   4:     ValueBinding binding = application.getValueBinding(valueRef);
   5:     return binding;

View Full Code Here
   1:     _applicationFactory = (ApplicationFactory)
   2:       FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
   3:       }
   4: 
   5:       return _applicationFactory.getApplication();

View Full Code Here
   1:       if (_applicationFactory != null) {
   2:     FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
   3:                  _applicationFactory.getName());
   4: 
   5:       }

View Full Code Here
   1: 
   2:     initFactory(FactoryFinder.APPLICATION_FACTORY,
   3:         "com.caucho.jsf.application.ApplicationFactoryImpl");
   4:         ...
   5:     ApplicationFactory appFactory = (ApplicationFactory)
   6:       FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
   7: 
   8:     Application app = appFactory.getApplication();

View Full Code Here
   1:     }
   2:     ApplicationFactory aFactory = (ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
   3:     application_ = aFactory.getApplication();
   4:     return application_;
   5:   }

View Full Code Here

FACES_CONTEXT_FACTORY

public static final String FACES_CONTEXT_FACTORY
Field Value:
"javax.faces.context.FacesContextFactory"
Usages and Demos :

View More Examples of FactoryFinder.FACES_CONTEXT_FACTORY
   1:         Lifecycle lifecycle = lifecycleFactory.getLifecycle(getLifecycleId());
   2:         FacesContextFactory facesCtxFactory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
   3:         FacesContext ctx = facesCtxFactory.getFacesContext(config.getServletContext(), request, response, lifecycle);
   4:         return ctx;
   5:     }

View Full Code Here
   1:       if (_facesContextFactory != null) {
   2:     FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY,
   3:                  _facesContextFactory.getName());
   4: 
   5:       }

View Full Code Here
   1:         this.facesContextFactory = (FacesContextFactory)FactoryFinder.getFactory(
   2:             FactoryFinder.FACES_CONTEXT_FACTORY);
   3:         LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder
   4:             .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
   5:         lifecycle = lifecycleFactory

View Full Code Here
   1: 
   2:         facesContextFactory = (FacesContextFactory)FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
   3: 
   4:         LifecycleFactory lifecycleFactory = (LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
   5:         lifecycle = lifecycleFactory.getLifecycle(getLifecycleId());

View Full Code Here
   1:         FACTORY_NAMES.add(FactoryFinder.APPLICATION_FACTORY);
   2:         FACTORY_NAMES.add(FactoryFinder.FACES_CONTEXT_FACTORY);
   3:         FACTORY_NAMES.add(FactoryFinder.LIFECYCLE_FACTORY);
   4:         ...
   5:                     _dispenser.feedApplicationFactory(className);
   6:                 } else if (factoryName.equals(FactoryFinder.FACES_CONTEXT_FACTORY))
   7:                 {
   8:         ...
   9:         setFactories(FactoryFinder.APPLICATION_FACTORY, _dispenser.getApplicationFactoryIterator(), DEFAULT_APPLICATION_FACTORY);
  10:         setFactories(FactoryFinder.FACES_CONTEXT_FACTORY, _dispenser.getFacesContextFactoryIterator(), DEFAULT_FACES_CONTEXT_FACTORY);
  11:         setFactories(FactoryFinder.LIFECYCLE_FACTORY, _dispenser.getLifecycleFactoryIterator(), DEFAULT_LIFECYCLE_FACTORY);

View Full Code Here

LIFECYCLE_FACTORY

public static final String LIFECYCLE_FACTORY
Field Value:
"javax.faces.lifecycle.LifecycleFactory"
Usages and Demos :

View More Examples of FactoryFinder.LIFECYCLE_FACTORY
   1:     {
   2:         LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
   3:         Lifecycle lifecycle = lifecycleFactory.getLifecycle(getLifecycleId());
   4:         FacesContextFactory facesCtxFactory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
   5:         FacesContext ctx = facesCtxFactory.getFacesContext(config.getServletContext(), request, response, lifecycle);

View Full Code Here
   1:       XHTMLMPRendererConfiguration.confiure() ;
   2:       LifecycleFactory lfactory = (LifecycleFactory) FactoryFinder.getFactory( FactoryFinder.LIFECYCLE_FACTORY );
   3:       facesLifecycle_ = lfactory.getLifecycle( LifecycleFactory.DEFAULT_LIFECYCLE );
   4:       ApplicationFactory factory = 
   5:         (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);

View Full Code Here
   1:       if (_lifecycleFactory != null) {
   2:     FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY,
   3:                  _lifecycleFactory.getName());
   4: 
   5:       }

View Full Code Here
   1: 
   2:     initFactory(FactoryFinder.LIFECYCLE_FACTORY,
   3:         "com.caucho.jsf.lifecycle.LifecycleFactoryImpl");
   4:         ...
   5:     LifecycleFactory lifecycleFactory = (LifecycleFactory)
   6:       FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
   7: 
   8:     Iterator iter = lifecycleFactory.getLifecycleIds();
   9:     while (iter.hasNext()) {

View Full Code Here
   1: 
   2:         LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
   3:         assertEquals(TestLifecycleFactory.class, lifecycleFactory.getClass());
   4: 
   5:         LifecycleFactory lifecycleFactoryDelegate = ((TestLifecycleFactory) lifecycleFactory).getDelegate();

View Full Code Here

RENDER_KIT_FACTORY

public static final String RENDER_KIT_FACTORY
Field Value:
"javax.faces.render.RenderKitFactory"
Usages and Demos :

View More Examples of FactoryFinder.RENDER_KIT_FACTORY
   1:       if (_renderKitFactory != null) {
   2:     FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY,
   3:                  _renderKitFactory.getName());
   4: 
   5:       }

View Full Code Here
   1:     {
   2:         RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
   3:         RenderKit basicHtml = renderKitFactory.getRenderKit(getContext(), RenderKitFactory.HTML_BASIC_RENDER_KIT);
   4: 
   5:         Renderer renderer = basicHtml.getRenderer("javax.faces.Command", "javax.faces.Button");

View Full Code Here
   1:     RenderKitFactory factory = (RenderKitFactory)
   2:       FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
   3: 
   4:     return factory.getRenderKit(this, renderKitId);
   5:   }

View Full Code Here
   1:     = (RenderKitFactory) FactoryFinder.getFactory(
   2:     FactoryFinder.RENDER_KIT_FACTORY);
   3:       
   4:       renderKit = renderKitFactory.getRenderKit(context, renderKitId);
   5:     }

View Full Code Here

Method Details

getFactory

public static Object getFactory(String factoryName)
Usages and Demos :

View More Examples of getFactory(String factoryName)
   1: 
   2: import javax.faces.FactoryFinder;
   3: import javax.faces.application.Application;
   4:         ...
   5:     ApplicationFactory factory = (ApplicationFactory)
   6:       FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
   7:     Application application = factory.getApplication();
   8:     ValueBinding binding = application.getValueBinding(valueRef);
   9:     return binding;

View Full Code Here
   1:     _applicationFactory = (ApplicationFactory)
   2:       FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
   3:       }
   4: 
   5:       return _applicationFactory.getApplication();

View Full Code Here
   1: import javax.faces.lifecycle.Lifecycle;
   2: import javax.faces.FactoryFinder;
   3: import javax.faces.webapp.FacesServlet;
   4:         ...
   5:     {
   6:         LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
   7:         Lifecycle lifecycle = lifecycleFactory.getLifecycle(getLifecycleId());
   8:         ...
   9:         FacesContextFactory facesCtxFactory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
  10:         FacesContext ctx = facesCtxFactory.getFacesContext(config.getServletContext(), request, response, lifecycle);

View Full Code Here
   1: import java.io.IOException;
   2: import javax.faces.FactoryFinder;
   3: import javax.faces.application.*;
   4:         ...
   5:       XHTMLMPRendererConfiguration.confiure() ;
   6:       LifecycleFactory lfactory = (LifecycleFactory) FactoryFinder.getFactory( FactoryFinder.LIFECYCLE_FACTORY );
   7:       facesLifecycle_ = lfactory.getLifecycle( LifecycleFactory.DEFAULT_LIFECYCLE );
   8:         ...
   9:       ApplicationFactory factory = 
  10:         (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
  11:       Application app = factory.getApplication();
  12:         ...
  13:       FacesContextFactory factory = 
  14:         (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY );

View Full Code Here
   1: 
   2:     initFactory(FactoryFinder.APPLICATION_FACTORY,
   3:         "com.caucho.jsf.application.ApplicationFactoryImpl");
   4:         ...
   5: 
   6:     initFactory(FactoryFinder.LIFECYCLE_FACTORY,
   7:         "com.caucho.jsf.lifecycle.LifecycleFactoryImpl");
   8:         ...
   9: 
  10:     initFactory(FactoryFinder.RENDER_KIT_FACTORY,
  11:         "com.caucho.jsf.render.RenderKitFactoryImpl");
  12:         ...
  13:     ApplicationFactory appFactory = (ApplicationFactory)
  14:       FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);

View Full Code Here

releaseFactories

public static void releaseFactories()
            throws FacesException
Usages and Demos :

View More Examples of releaseFactories()
   1: 
   2: import javax.faces.FactoryFinder;
   3: import javax.faces.context.ExternalContext;
   4:         ...
   5:     {
   6:         FactoryFinder.releaseFactories();
   7:     }
   8: }

View Full Code Here
   1: 
   2: import javax.faces.FactoryFinder;
   3: import javax.faces.application.Application;
   4:         ...
   5:         super.destroy();
   6:         FactoryFinder.releaseFactories();
   7:     }
   8:         ...
   9: 
  10:         facesContextFactory = (FacesContextFactory)FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
  11: 
  12:         ...
  13:         LifecycleFactory lifecycleFactory = (LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);

View Full Code Here

setFactory

public static void setFactory(String factoryName,
                              String implName)
Usages and Demos :

View More Examples of setFactory(String factoryName,String implName)
   1: 
   2:     initFactory(FactoryFinder.APPLICATION_FACTORY,
   3:         "com.caucho.jsf.application.ApplicationFactoryImpl");
   4:         ...
   5: 
   6:     initFactory(FactoryFinder.LIFECYCLE_FACTORY,
   7:         "com.caucho.jsf.lifecycle.LifecycleFactoryImpl");
   8:         ...
   9: 
  10:     initFactory(FactoryFinder.RENDER_KIT_FACTORY,
  11:         "com.caucho.jsf.render.RenderKitFactoryImpl");
  12:         ...
  13:       
  14:       FactoryFinder.setFactory(factoryName, factory);

View Full Code Here
   1: import javax.faces.FacesException;
   2: import javax.faces.FactoryFinder;
   3: import javax.faces.application.Application;
   4:         ...
   5:     {
   6:         FACTORY_NAMES.add(FactoryFinder.APPLICATION_FACTORY);
   7:         ...
   8:         FACTORY_NAMES.add(FactoryFinder.FACES_CONTEXT_FACTORY);
   9:         FACTORY_NAMES.add(FactoryFinder.LIFECYCLE_FACTORY);
  10:         ...
  11:     {
  12:         FactoryFinder.setFactory(factoryName, defaultFactory);

View Full Code Here