org.eclipse.jst.jsf.core.jsfappconfig
Class JSFAppConfigManager
java.lang.Object
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. |
Methods inherited from class java.lang.Object
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
KEY_SESSIONPROPERTY
public static final QualifiedName KEY_SESSIONPROPERTY
- Key that is used for the IProject instance's session property that
holds a JSFAppConfigManager instance.
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.