Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.3.0)
E15995-02


oracle.webcenter.webcenterapp
Class FactoryFinder

java.lang.Object
  extended by oracle.webcenter.webcenterapp.FactoryFinder


public final class FactoryFinder
extends java.lang.Object

This class is responsible for finding Factory implementations for a given Factory class name. This class does maintain the application mapping. It gets it from webcenter-config.xml file. This file goes in the META-INF directory of the APIs. If there are multiple webcenter-config files, it reads all of them and if there are any class conflicts To use this class, one must initialize it by calling init() method on it. Later consumers can simply call getFactory() method to get the factory implementations. Generally, this class should be initialized by calling init() method in the Filters and later consumed by all consumers. This class throws a generic InitializationException on getFactory() call.


Method Summary
static java.lang.Object getFactory(java.lang.String factoryName)
          Create (if necessary) and return a per-web-application instance of the appropriate implementation class for the specified Web Center factory class, based on the discovery algorithm described in the class description.
static void init(java.lang.String configFilePath)
          This API should be called for the first time.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

init

public static void init(java.lang.String configFilePath)
                 throws java.lang.InstantiationException
This API should be called for the first time. It initializes all the map with metadata. Basically, it loads up the webcenter configuration file from the class loader and parses it. Further, it loads up the data in the static map variable which can be used by other exposed public APIs.
Parameters:
configFilePath - The configuration file to be loaded
Throws:
java.lang.InstantiationException - if factory can not be initialized

getFactory

public static java.lang.Object getFactory(java.lang.String factoryName)

Create (if necessary) and return a per-web-application instance of the appropriate implementation class for the specified Web Center factory class, based on the discovery algorithm described in the class description.

Parameters:
factoryName - Fully qualified name of the JavaServer Faces factory for which an implementation instance is requested

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.3.0)
E15995-02


Copyright © 2009, 2010, Oracle. All rights reserved.