com.sun.faces.config
Class JSFVersionTracker

java.lang.Object
  extended by com.sun.faces.config.JSFVersionTracker
All Implemented Interfaces:
java.io.Serializable

public class JSFVersionTracker
extends java.lang.Object
implements java.io.Serializable

Application Singleton that helps to track the version numbers of JSF artifacts defined in the application configuration resources (aka faces-config.xml files.

This class operates in two modes:

  1. Startup time mode.

    During startup time, this class is populated with version data for each of the artifacts specified in the application configuration resources. The version of the artifact is decided based on the version of the DTD or schema in which the artifact is declared. PENDING(edburns): Note that when we start allowing things to be declared via annotations, versioning will be a problem. I've filed JSF-API-149 on this.

    During startup time, this classes is accessed via a ThreadLocal variable exposed via the #getCurrentInstance method.

  2. Run time mode

    During runtime, this class is consulted to determine the version data of a JSF artifact. The reference for this class is stored on the ApplicationAssociate.

Author:
edburns
See Also:
Serialized Form

Nested Class Summary
static class JSFVersionTracker.Version
           
 
Constructor Summary
JSFVersionTracker()
           
 
Method Summary
 JSFVersionTracker.Version getCurrentVersion()
           
 JSFVersionTracker.Version getVersionForTrackedClassName(java.lang.String fqcn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSFVersionTracker

public JSFVersionTracker()
Method Detail

getVersionForTrackedClassName

public JSFVersionTracker.Version getVersionForTrackedClassName(java.lang.String fqcn)
Returns:
the Version for the argument tracked String.

getCurrentVersion

public JSFVersionTracker.Version getCurrentVersion()
Returns:
the Version of the current JSF implementation


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.