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

java.lang.Object
  extended byorg.eclipse.wst.server.core.model.ModuleDelegate
      extended byorg.eclipse.wst.server.core.util.ProjectModule

public abstract class ProjectModule
extends ModuleDelegate

A simple IModuleProject that maps a folder within a project (or the root of the project itself) to the module.

Since:
1.0

Constructor Summary
ProjectModule()
          Create a new project module.
ProjectModule(IProject project)
          Create a new project module in the given project.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 boolean exists()
          Returns true if this module currently exists, and false if it has been deleted or moved and is no longer represented by this module.
 IModule[] getChildModules()
          Returns the child modules of this module.
 java.lang.String getId()
          Helper method - returns the module's id.
 java.lang.String getName()
          Helper method - returns the module's name.
 IProject getProject()
          Returns the project that the module is contained in.
 IPath getRootFolder()
          Returns the root folder.
 IModuleResource[] members()
          Returns the current array of module artifacts.
 IStatus validate()
          Validates this module instance.
 
Methods inherited from class org.eclipse.wst.server.core.model.ModuleDelegate
getModule, initialize, initialize
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectModule

public ProjectModule()
Create a new project module.


ProjectModule

public ProjectModule(IProject project)
Create a new project module in the given project.

Parameters:
project - the project containing the module
Method Detail

getProject

public IProject getProject()
Returns the project that the module is contained in.

Returns:
the project that the module is contained in

getRootFolder

public IPath getRootFolder()
Returns the root folder. The root folder is the project relative path that points to the root directory of the module. All resources contained within this folder belong to the module.

Returns:
the root project-relative folder that contains the contents of the module

getId

public java.lang.String getId()
Helper method - returns the module's id.

Returns:
the module id

validate

public IStatus validate()
Description copied from class: ModuleDelegate
Validates this module instance. Subclasses should override and call super.validate() for basic validation.

This method is called by the web server core framework. Clients should never call this method.

Specified by:
validate in class ModuleDelegate
Returns:
a status object with code IStatus.OK if this runtime is valid, otherwise a status object indicating what is wrong with it
See Also:
ModuleDelegate.validate()

members

public IModuleResource[] members()
                          throws CoreException
Description copied from class: ModuleDelegate
Returns the current array of module artifacts.

Specified by:
members in class ModuleDelegate
Returns:
a possibly empty array containing the module resources
Throws:
CoreException
See Also:
ModuleDelegate.members()

getName

public java.lang.String getName()
Helper method - returns the module's name.

Returns:
the module name

exists

public boolean exists()
Returns true if this module currently exists, and false if it has been deleted or moved and is no longer represented by this module.

Returns:
boolean

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(Object)

getChildModules

public IModule[] getChildModules()
Returns the child modules of this module.

Specified by:
getChildModules in class ModuleDelegate
Returns:
org.eclipse.wst.server.core.model.IModule[]