## org.eclipse.wst.server.core
Interface IModule

    public interface IModule

A module is a unit of "content" that can be published to a server.

All modules have a module type, which is fixed for the lifetime of the module. The set of module types (or "kinds") is open-ended.

All modules are created by module factories using the moduleFactories extension point.

The content of a module is a collection of file and folder resources in the workspace.

In principle, a module exists independent of any particular server. The same module instance can be associated with multiple server instances at the same time. That is why you cannot ask the module which server it's associated with.

A module is equal to another module whenever the two ids are equal and the (optional) project attribute is equal.

This interface is not intended to be implemented by clients.

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
  1.0

Method Summary
`java.lang.Object` `getAdapter(java.lang.Class adapter)` Returns an object which is an instance of the given class associated with this object.
`java.lang.String` `getId()` Returns the id of this module.
`IModuleType` `getModuleType()` Returns the type of this module.
`java.lang.String` `getName()` Returns the displayable name for this module.
`IProject` `getProject()` Returns the workbench project that this module is contained in, or null if the module is outside of the workspace.
`boolean` `isExternal()` Returns `true` if the module is an external (non-workspace) module, and `false` otherwise
`java.lang.Object` `loadAdapter(java.lang.Class adapter, IProgressMonitor monitor)` Returns an object which is an instance of the given class associated with this object.

Method Detail

### getId

    java.lang.String getId()

  Returns the id of this module. Each module has a distinct id, used to distinguish this module from all other modules in the workspace (and within a server). Ids are intended to be used internally as keys; they are not intended to be shown to end users.

  Returns:
    the module id

### getName

    java.lang.String getName()

  Returns the displayable name for this module.

  Note that this name is appropriate for the current locale.

  Returns:
    a displayable name for this module

### getModuleType

    IModuleType getModuleType()

  Returns the type of this module.

  Returns:
    the module type

### getProject

    IProject getProject()

  Returns the workbench project that this module is contained in, or null if the module is outside of the workspace.

  Returns:
    a project

### isExternal

    boolean isExternal()

  Returns `true` if the module is an external (non-workspace) module, and `false` otherwise

  Returns:
    `true` if the module is an external module, and `false` otherwise

### getAdapter

    java.lang.Object getAdapter(java.lang.Class adapter)

  Returns an object which is an instance of the given class associated with this object. Returns `null` if no such object can be found, or if the delegate is not loaded.

  This method will not check the delegate classes for adapting unless they are already loaded. No plugin loading will occur when calling this method. It is suitable for popup menus and other UI artifacts where performance is a concern.

  Parameters:
    `adapter` - the adapter class to look up
  Returns:
    a object castable to the given class, or `null` if this object does not have an adapter for the given class
  See Also:
    `IAdaptable#getAdapter(Class)`, `loadAdapter(Class, IProgressMonitor)`

### loadAdapter

    java.lang.Object loadAdapter(java.lang.Class adapter,
                                 IProgressMonitor monitor)

  Returns an object which is an instance of the given class associated with this object. Returns `null` only if no such object can be found after loading and initializing delegates.

  This method will force a load and initialization of all delegate classes and check them for adapting.

  Parameters:
    `adapter` - the adapter class to look up
    `monitor` - a progress monitor, or `null` if progress reporting and cancellation are not desired
  Returns:
    a object castable to the given class, or `null` if this object does not have an adapter for the given class
  See Also:
    `getAdapter(Class)`