com.liferay.faces.bridge
Class BridgeFactoryFinder

java.lang.Object
  extended by com.liferay.faces.bridge.BridgeFactoryFinder

public abstract class BridgeFactoryFinder
extends Object

This class provides a factory lookup mechanism similar to the FactoryFinder in the JSF API. Factory instances are stored as attributes in the PortletContext.

Author:
Neil Griffin

Constructor Summary
BridgeFactoryFinder()
           
 
Method Summary
static Object getFactory(Class<?> factoryClass)
          Deprecated. Call getFactory(PortletContext, Class) instead.

Returns the factory instance associated with the specified factory class from the portlet context associated with the current portlet request.

static Object getFactory(javax.portlet.PortletContext portletContext, Class<?> factoryClass)
          Returns the factory instance associated with the specified factory class from the specified portlet context.
abstract  Object getFactoryInstance(Class<?> factoryClass)
          Deprecated. Call getFactory(PortletContext, Class) instead.

Returns the factory instance associated with the specified factory class from the portlet context associated with the current portlet request.

abstract  Object getFactoryInstance(javax.portlet.PortletContext portletContext, Class<?> factoryClass)
          Returns the factory instance associated with the specified factory class from the specified portlet context.
static BridgeFactoryFinder getInstance()
          Returns the thread-safe Singleton instance of the bridge factory finder.
abstract  void releaseFactories(javax.portlet.PortletContext portletContext)
          Releases all of the factories that are associated with the specified portlet context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BridgeFactoryFinder

public BridgeFactoryFinder()
Method Detail

getFactory

@Deprecated
public static Object getFactory(Class<?> factoryClass)
Deprecated. Call getFactory(PortletContext, Class) instead.

Returns the factory instance associated with the specified factory class from the portlet context associated with the current portlet request.

Parameters:
factoryClass - The factory Class.

getFactory

public static Object getFactory(javax.portlet.PortletContext portletContext,
                                Class<?> factoryClass)
Returns the factory instance associated with the specified factory class from the specified portlet context.

Parameters:
portletContext - The portlet context associated with the current portlet request.
factoryClass - The factory Class.
Since:
4.1, 3.1, 2.1

getInstance

public static BridgeFactoryFinder getInstance()
                                       throws javax.faces.FacesException
Returns the thread-safe Singleton instance of the bridge factory finder.

Throws:
javax.faces.FacesException - When the factory extension finder cannot be discovered.

getFactoryInstance

@Deprecated
public abstract Object getFactoryInstance(Class<?> factoryClass)
Deprecated. Call getFactory(PortletContext, Class) instead.

Returns the factory instance associated with the specified factory class from the portlet context associated with the current portlet request.

Parameters:
factoryClass - The factory Class.

getFactoryInstance

public abstract Object getFactoryInstance(javax.portlet.PortletContext portletContext,
                                          Class<?> factoryClass)
Returns the factory instance associated with the specified factory class from the specified portlet context.

Parameters:
portletContext - The portlet context associated with the current portlet request.
factoryClass - The factory Class.
Since:
4.1, 3.1, 2.1

releaseFactories

public abstract void releaseFactories(javax.portlet.PortletContext portletContext)
Releases all of the factories that are associated with the specified portlet context. It is designed to be called when a portlet application is taken out of service.

Parameters:
portletContext - The portlet context associated with the portlet application that is being taken out of service.


Copyright © 2017 Liferay, Inc. All Rights Reserved.