Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 



org.eclipse.jst.jsf.core.jsfappconfig
Class JSFAppConfigManager

java.lang.Object
  extended by 
org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager

public class JSFAppConfigManager
extends java.lang.Object

JSFAppConfigManager provides an entry point to an entire JSF application configuration, which is defined in one or more application configuration resource files.

Provisional API - subject to change


Field Summary
static QualifiedName KEY_SESSIONPROPERTY
          Key that is used for the IProject instance's session property that holds a JSFAppConfigManager instance.
 
Method Summary
 void addFacesConfigChangeAdapter ( FacesConfigType facesConfig)
          Adds this instance's FacesConfigChangeAdapter instance to the passed application configuration model's adapters collection.
 java.lang.Object addFacesConfigChangeListener (java.lang.Class emfClass, IFacesConfigChangeListener listener)
          Adds an instance of IFacesConfigChangeListener.
 boolean addJSFAppConfigProvidersChangeListener ( IJSFAppConfigProvidersChangeListener listener)
          Adds an instance of IJSFAppConfigProvidersChangeListener.
 java.util.List getApplications ()
          Gets list of all ApplicationType instances from all known faces-config models; list may be empty.
 java.util.List getComponents ()
          Gets list of all ComponentType instances from all known faces-config models; list may be empty.
 java.util.List getConverters ()
          Gets list of all ConverterType instances from all known faces-config models; list may be empty.
 java.util.List getFacesConfigModels ()
          Gets all FacesConfigType instances from all IJSFAppConfigProvider instances.
 java.util.List getFactories ()
          Gets list of all FactoryType instances from all known faces-config models; list may be empty.
static  JSFAppConfigManager getInstance (IProject project)
          Gets a JSFAppConfigManager instance that is keyed to the passed IProject parameter.
 java.util.Set getJSFAppConfigProviders ()
          Gets all IJSFAppConfigProvider instances from all IJSFAppConfigLocater instances.
 java.util.List getLifecycles ()
          Gets list of all LifecycleType instances from all known faces-config models; list may be empty.
 java.util.List getManagedBeans ()
          Gets list of all ManagedBeanType instances from all known faces-config models; list may be empty.
 java.util.List getNavigationRules ()
          Gets list of all NavigationRuleType instances from all known faces-config models; list may be empty.
 java.util.List getNavigationRulesForPage (IFile pageFile)
          Gets list of all NavigationRuleType instances from all known faces-config models where the navigation-rule's from-view-id value matches the web content folder-relative value of the passed IFile instance; list may be empty.
 IProject getProject ()
          Gets this instance's IProject instance.
 java.util.List<java.lang.String> getPropertyResolvers ()
           
 java.util.List getReferencedBeans ()
          Gets list of all ReferencedBeanType instances from all known faces-config models; list may be empty.
 java.util.List getRenderKits ()
          Gets list of all RenderKitType instances from all known faces-config models; list may be empty.
 java.util.List getResourceBundles ()
           
 java.util.List getValidators ()
          Gets list of all ValidatorType instances from all known faces-config models; list may be empty.
 java.util.List<java.lang.String> getVariableResolvers ()
           
 void notifyFacesConfigChangeListeners (Notification notification)
          Notifies IFacesConfigChangeListener instances of model changes in which they registered interest.
 void notifyJSFAppConfigProvidersChangeListeners ( IJSFAppConfigProvider configProvider, int eventType)
          Notifies all IJSFAppConfigProvidersChangeListener instances of a change in the Set of IJSFAppConfigProvider instances.
 void removeFacesConfigChangeAdapter ( FacesConfigType facesConfig)
          Removes this instance's FacesConfigChangeAdapter instance from the passed application configuration model's adapters collection.
 java.lang.Object removeFacesConfigChangeListener (java.lang.Class emfClass)
          Removes an instance of IFacesConfigChangeListener.
 boolean removeJSFAppConfigProvidersChangeListener ( IJSFAppConfigProvidersChangeListener listener)
          Removes an instance of IJSFAppConfigProvidersChangeListener.
 void resourceChanged (IResourceChangeEvent event)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_SESSIONPROPERTY

public static final QualifiedName KEY_SESSIONPROPERTY
Key that is used for the IProject instance's session property that holds a JSFAppConfigManager instance.

Method Detail

getInstance

public static 
JSFAppConfigManager getInstance(IProject project)
Gets a JSFAppConfigManager instance that is keyed to the passed IProject parameter. May return null if the project is not valid or if a CoreException is thrown while attempting to get or set the instance as a session property.

Parameters:
project - IProject instance to which the returned JSFAppConfigManager instance is keyed.
Returns:
JSFAppConfigManager instance, or null.

getProject

public IProject getProject()
Gets this instance's IProject instance.

Returns:
This instance's IProject instance.

resourceChanged

public void resourceChanged(IResourceChangeEvent event)

addJSFAppConfigProvidersChangeListener

public boolean addJSFAppConfigProvidersChangeListener(
IJSFAppConfigProvidersChangeListener listener)
Adds an instance of IJSFAppConfigProvidersChangeListener.

Parameters:
listener - An instance of IJSFAppConfigProvidersChangeListener.
Returns:
true if added, else false.

removeJSFAppConfigProvidersChangeListener

public boolean removeJSFAppConfigProvidersChangeListener(
IJSFAppConfigProvidersChangeListener listener)
Removes an instance of IJSFAppConfigProvidersChangeListener.

Parameters:
listener - an instance of IJSFAppConfigProvidersChangeListener.
Returns:
true if removed, else false.

notifyJSFAppConfigProvidersChangeListeners

public void notifyJSFAppConfigProvidersChangeListeners(
IJSFAppConfigProvider configProvider,
                                                       int eventType)
Notifies all IJSFAppConfigProvidersChangeListener instances of a change in the Set of IJSFAppConfigProvider instances.

Parameters:
configProvider - IJSFAppConfigProvider instance that has changed.
eventType - Event type.

addFacesConfigChangeListener

public java.lang.Object addFacesConfigChangeListener(java.lang.Class emfClass,
                                                     
IFacesConfigChangeListener listener)
Adds an instance of IFacesConfigChangeListener.

NOTE: Calling this method will cause all application configuration models to be loaded, to ensure that a FacesConfigChangeAdapter has been added to each model.

Parameters:
emfClass - EMF class in which the listener is interested.
listener - IFacesConfigChangeListener instance.
Returns:
Previous IFacesConfigChangeListener, or null.

removeFacesConfigChangeListener

public java.lang.Object removeFacesConfigChangeListener(java.lang.Class emfClass)
Removes an instance of IFacesConfigChangeListener.

Parameters:
emfClass - EMF class in which the listener was interested.
Returns:
Removed IFacesConfigChangeListener, or null.

notifyFacesConfigChangeListeners

public void notifyFacesConfigChangeListeners(Notification notification)
Notifies IFacesConfigChangeListener instances of model changes in which they registered interest.

Parameters:
notification - EMF Notification instance that describes the model change.

getJSFAppConfigProviders

public java.util.Set getJSFAppConfigProviders()
Gets all IJSFAppConfigProvider instances from all IJSFAppConfigLocater instances.

Returns:
Set of all IJSFAppConfigProvider instances.

getFacesConfigModels

public java.util.List getFacesConfigModels()
Gets all FacesConfigType instances from all IJSFAppConfigProvider instances.

Returns:
List of all FacesConfigType instances.

getManagedBeans

public java.util.List getManagedBeans()
Gets list of all ManagedBeanType instances from all known faces-config models; list may be empty.

Returns:
List of all ManagedBeanType instances from all known faces-config models (list may be empty).

getPropertyResolvers

public final java.util.List<java.lang.String> getPropertyResolvers()
Returns:
List of all variable resolver class names registered.

getValidators

public java.util.List getValidators()
Gets list of all ValidatorType instances from all known faces-config models; list may be empty.

Returns:
List of all ValidatorType instances from all known faces-config models (list may be empty).

getVariableResolvers

public final java.util.List<java.lang.String> getVariableResolvers()
Returns:
List of all variable resolver class names registered.

getConverters

public java.util.List getConverters()
Gets list of all ConverterType instances from all known faces-config models; list may be empty.

Returns:
List of all ConverterType instances from all known faces-config models (list may be empty).

getNavigationRules

public java.util.List getNavigationRules()
Gets list of all NavigationRuleType instances from all known faces-config models; list may be empty.

Returns:
List of all NavigationRuleType instances from all known faces-config models (list may be empty).

getNavigationRulesForPage

public java.util.List getNavigationRulesForPage(IFile pageFile)
Gets list of all NavigationRuleType instances from all known faces-config models where the navigation-rule's from-view-id value matches the web content folder-relative value of the passed IFile instance; list may be empty. Matching is performed in the same manner as for a JSF implementation's default NavigationHandler.

Parameters:
pageFile - IFile instance to match against the from-view-id value of all NavigationRuleType instances. File is assumed to be relative to the web content folder, but may be expressed in a more complete form; its path will be calculated relative to the web content folder.
Returns:
List of all NavigationRuleType instances from all known faces-config models where the navigation-rule's from-view-id value matches the web content folder-relative value of the passed IFile instance (list may be empty).

getApplications

public java.util.List getApplications()
Gets list of all ApplicationType instances from all known faces-config models; list may be empty.

Returns:
List of all ApplicationType instances from all known faces-config models (list may be empty).

getFactories

public java.util.List getFactories()
Gets list of all FactoryType instances from all known faces-config models; list may be empty.

Returns:
List of all FactoryType instances from all known faces-config models (list may be empty).

getComponents

public java.util.List getComponents()
Gets list of all ComponentType instances from all known faces-config models; list may be empty.

Returns:
List of all ComponentType instances from all known faces-config models (list may be empty).

getReferencedBeans

public java.util.List getReferencedBeans()
Gets list of all ReferencedBeanType instances from all known faces-config models; list may be empty.

Returns:
List of all ReferencedBeanType instances from all known faces-config models (list may be empty).

getRenderKits

public java.util.List getRenderKits()
Gets list of all RenderKitType instances from all known faces-config models; list may be empty.

Returns:
List of all RenderKitType instances from all known faces-config models (list may be empty).

getLifecycles

public java.util.List getLifecycles()
Gets list of all LifecycleType instances from all known faces-config models; list may be empty.

Returns:
List of all LifecycleType instances from all known faces-config models (list may be empty).

getResourceBundles

public java.util.List getResourceBundles()
Returns:
the list of all resource bundles declared in all the FacesConfig configurations found.

addFacesConfigChangeAdapter

public void addFacesConfigChangeAdapter(
FacesConfigType facesConfig)
Adds this instance's FacesConfigChangeAdapter instance to the passed application configuration model's adapters collection.

Parameters:
facesConfig - Application configuration model's root object.

removeFacesConfigChangeAdapter

public void removeFacesConfigChangeAdapter(
FacesConfigType facesConfig)
Removes this instance's FacesConfigChangeAdapter instance from the passed application configuration model's adapters collection.

Parameters:
facesConfig - Application configuration model's root object.



 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire