org.eclipse.wst.server.core.util
Class ProjectModuleFactoryDelegate

java.lang.Object
  extended by org.eclipse.wst.server.core.model.ModuleFactoryDelegate
      extended by org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate

public abstract class ProjectModuleFactoryDelegate
extends ModuleFactoryDelegate

A helper class for defining a module factory that provides modules based on projects.

Since:
1.0

Constructor Summary
ProjectModuleFactoryDelegate()
          Construct a new ProjectModuleFactoryDelegate.
 
Method Summary
 IModule findModule(java.lang.String id)
          Returns the module created by this factory that has the given id, or null if there is no module with the given id.
 IModule[] getModules()
          Return all modules created by this factory.
 IModule[] getModules(org.eclipse.core.resources.IProject project)
          Return all modules created by this factory that are contained within the given project.
static void handleGlobalProjectChange(org.eclipse.core.resources.IProject project, org.eclipse.core.resources.IResourceDelta delta)
          Handle changes to a project.
 
Methods inherited from class org.eclipse.wst.server.core.model.ModuleFactoryDelegate
clearModuleCache, getModuleDelegate, initialize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectModuleFactoryDelegate

public ProjectModuleFactoryDelegate()
Construct a new ProjectModuleFactoryDelegate.

Method Detail

getModules

public final IModule[] getModules()
Description copied from class: ModuleFactoryDelegate
Return all modules created by this factory.

This method is normally called by the web server core framework. Clients (other than the delegate) should never call this method.

A new array is returned on each call, so clients may store or modify the result.

Specified by:
getModules in class ModuleFactoryDelegate
Returns:
a possibly-empty array of modules IModule

handleGlobalProjectChange

public static final void handleGlobalProjectChange(org.eclipse.core.resources.IProject project,
                                                   org.eclipse.core.resources.IResourceDelta delta)
Handle changes to a project.

Parameters:
project - a project
delta - a resource delta

getModules

public IModule[] getModules(org.eclipse.core.resources.IProject project)
Description copied from class: ModuleFactoryDelegate
Return all modules created by this factory that are contained within the given project. Subclasses should override this method if they do not need to filter through the entire project list.

This method is normally called by the web server core framework. Clients (other than the delegate) should never call this method.

A new array is returned on each call, so clients may store or modify the result.

Overrides:
getModules in class ModuleFactoryDelegate
Parameters:
project - a project
Returns:
a possibly-empty array of modules IModule

findModule

public IModule findModule(java.lang.String id)
Description copied from class: ModuleFactoryDelegate
Returns the module created by this factory that has the given id, or null if there is no module with the given id. The id must not be null.

Subclasses should override this method if they do not need to search through the entire project list.

This method is normally called by the web server core framework. Clients (other than the delegate) should never call this method.

Overrides:
findModule in class ModuleFactoryDelegate
Parameters:
id - a module id
Returns:
the module with the given id, or null if no module could be found IModule