|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jst.jsf.core.internal.provisional.jsfappconfig.JSFAppConfigManager
JSFAppConfigManager provides an entry point to an entire JSF application configuration, which is defined in one or more application configuration resource files.
Field Summary | |
protected java.util.List |
configLocaters
Collection of IJSFAppConfigLocater instances. |
protected java.util.List |
configProvidersChangeListeners
Collection of IJSFAppConfigProvidersChangeListener instances. |
protected org.eclipse.jst.jsf.core.internal.provisional.jsfappconfig.JSFAppConfigManager.FacesConfigChangeAdapter |
facesConfigChangeAdapter
Single FacesConfigChangeAdapter instance. |
protected java.util.Map |
facesConfigChangeListeners
Map of application configuration model EMF classes to IFacesConfigChangeListener instances. |
static org.eclipse.core.runtime.QualifiedName |
KEY_SESSIONPROPERTY
Key that is used for the IProject instance's session property that holds a JSFAppConfigManager instance. |
protected org.eclipse.core.resources.IProject |
project
IProject instance to which this JSFAppConfigManager instance is keyed. |
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 . |
protected void |
changeProject(org.eclipse.core.resources.IProject newProject)
Called to respond to a change in the IProject instance to which this instance belongs. |
protected void |
finalize()
|
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. |
protected static JSFAppConfigManager |
getFromSessionProperty(org.eclipse.core.resources.IProject project)
Attempts to get a JSFAppConfigManager instance from a session property of the passed IProject instance. |
static JSFAppConfigManager |
getInstance(org.eclipse.core.resources.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(org.eclipse.core.resources.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. |
org.eclipse.core.resources.IProject |
getProject()
Gets this instance's IProject instance. |
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 |
getValidators()
Gets list of all ValidatorType instances from all known faces-config models; list may be empty. |
protected void |
initialize()
Initializes instance by: creating facesConfigChangeListeners collection, creating configProvidersChangeListeners collection, creating and populating configLocaters collection, invoking the startLocating() method on all configLocaters, setting instance as a session property of the IProject instance, adding a resource change listener to the workspace. |
void |
notifyFacesConfigChangeListeners(org.eclipse.emf.common.notify.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. |
protected void |
populateConfigLocaters()
Populates configLocaters Set with "built-in" set of IJSFAppConfigLocater implementations. |
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(org.eclipse.core.resources.IResourceChangeEvent event)
|
protected void |
setAsSessionProperty()
Sets this JSFAppConfigManager instance as a session property of its IProject instance. |
protected void |
startConfigLocaters()
Instructs set of IJSFAppConfigLocater instances to start
locating JSF application configuration resources. |
protected void |
stopConfigLocaters()
Instructs set of IJSFAppConfigLocater instances to stop
locating JSF application configuration resources. |
protected void |
unsetAsSessionProperty()
Unsets this JSFAppConfigManager instance as a session property of its IProject instance. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final org.eclipse.core.runtime.QualifiedName KEY_SESSIONPROPERTY
protected org.eclipse.core.resources.IProject project
protected java.util.List configLocaters
IJSFAppConfigLocater
instances.
protected java.util.List configProvidersChangeListeners
IJSFAppConfigProvidersChangeListener
instances.
protected java.util.Map facesConfigChangeListeners
IFacesConfigChangeListener
instances.
protected org.eclipse.jst.jsf.core.internal.provisional.jsfappconfig.JSFAppConfigManager.FacesConfigChangeAdapter facesConfigChangeAdapter
FacesConfigChangeAdapter
instance.
Method Detail |
public static JSFAppConfigManager getInstance(org.eclipse.core.resources.IProject project)
project
- IProject instance to which the returned
JSFAppConfigManager instance is keyed.
protected static JSFAppConfigManager getFromSessionProperty(org.eclipse.core.resources.IProject project)
project
- IProject instance from which to retrieve the
JSFAppConfigManager instance.
protected void setAsSessionProperty()
protected void unsetAsSessionProperty()
public org.eclipse.core.resources.IProject getProject()
protected void initialize()
protected void populateConfigLocaters()
IJSFAppConfigLocater
implementations.
protected void startConfigLocaters()
IJSFAppConfigLocater
instances to start
locating JSF application configuration resources.
protected void stopConfigLocaters()
IJSFAppConfigLocater
instances to stop
locating JSF application configuration resources.
public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
resourceChanged
in interface org.eclipse.core.resources.IResourceChangeListener
protected void changeProject(org.eclipse.core.resources.IProject newProject)
newProject
- New IProject instance to which this manager belongs.public boolean addJSFAppConfigProvidersChangeListener(IJSFAppConfigProvidersChangeListener listener)
IJSFAppConfigProvidersChangeListener
.
listener
- An instance of IJSFAppConfigProvidersChangeListener
.
public boolean removeJSFAppConfigProvidersChangeListener(IJSFAppConfigProvidersChangeListener listener)
IJSFAppConfigProvidersChangeListener
.
listener
- an instance of IJSFAppConfigProvidersChangeListener
.
public void notifyJSFAppConfigProvidersChangeListeners(IJSFAppConfigProvider configProvider, int eventType)
IJSFAppConfigProvidersChangeListener
instances of
a change in the Set of IJSFAppConfigProvider
instances.
configProvider
- IJSFAppConfigProvider
instance that has
changed.eventType
- Event type.public java.lang.Object addFacesConfigChangeListener(java.lang.Class emfClass, IFacesConfigChangeListener listener)
IFacesConfigChangeListener
. FacesConfigChangeAdapter
has been added to each model.
emfClass
- EMF class in which the listener is interested.listener
- IFacesConfigChangeListener
instance.
IFacesConfigChangeListener
, or null.public java.lang.Object removeFacesConfigChangeListener(java.lang.Class emfClass)
IFacesConfigChangeListener
.
emfClass
- EMF class in which the listener was interested.
IFacesConfigChangeListener
, or null.public void notifyFacesConfigChangeListeners(org.eclipse.emf.common.notify.Notification notification)
IFacesConfigChangeListener
instances of model changes
in which they registered interest.
notification
- EMF Notification
instance that describes the
model change.public java.util.Set getJSFAppConfigProviders()
IJSFAppConfigProvider
instances from all
IJSFAppConfigLocater
instances.
IJSFAppConfigProvider
instances.public java.util.List getFacesConfigModels()
FacesConfigType
instances from all
IJSFAppConfigProvider
instances.
FacesConfigType
instances.protected void finalize()
public java.util.List getManagedBeans()
public java.util.List getValidators()
public java.util.List getConverters()
public java.util.List getNavigationRules()
public java.util.List getNavigationRulesForPage(org.eclipse.core.resources.IFile pageFile)
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.
public java.util.List getApplications()
public java.util.List getFactories()
public java.util.List getComponents()
public java.util.List getReferencedBeans()
public java.util.List getRenderKits()
public java.util.List getLifecycles()
public void addFacesConfigChangeAdapter(FacesConfigType facesConfig)
FacesConfigChangeAdapter
instance to the
passed application configuration model's adapters collection.
facesConfig
- Application configuration model's root object.public void removeFacesConfigChangeAdapter(FacesConfigType facesConfig)
FacesConfigChangeAdapter
instance from
the passed application configuration model's adapters collection.
facesConfig
- Application configuration model's root object.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |