Interface IServerModulePublisher

All Known Implementing Classes:
JobBasedServerModulePublisher

public interface IServerModulePublisher
Publishes a module on a server.

WST API provides multiple ways to publish module on the server. Notably, there are IServer.publish(int, IProgressMonitor) and IServer.publish(int, java.util.List, org.eclipse.core.runtime.IAdaptable, org.eclipse.wst.server.core.IServer.IOperationListener). The first one supports progress monitor while the second one runs everything in background (as recommended) according to the rules defined for WST publish job.

This interface encapsulates WST specifics regarding server module publishing so clients do not have to bother with them. Implementations must guarantee that WST threading requirements are fulfilled. Additionally, implementations should support cancellation of publication process when user cancells the operation via specified progress monitor.

Ideally, we would use IApplicationManager.publish(com.e1c.g5.dt.applications.IApplication, com.e1c.g5.dt.applications.PublishKind, com.e1c.g5.dt.applications.ExecutionContext, IProgressMonitor) everywhere. However, there are multiple places here and there that are still closely tied to WST.

  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<org.eclipse.core.runtime.IStatus>
    publish(int kind, org.eclipse.wst.server.core.IServer server, org.eclipse.wst.server.core.IModule module, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.swt.widgets.Shell shell)
    Publishes specified server module.
  • Method Details

    • publish

      Optional<org.eclipse.core.runtime.IStatus> publish(int kind, org.eclipse.wst.server.core.IServer server, org.eclipse.wst.server.core.IModule module, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.swt.widgets.Shell shell)
      Publishes specified server module.
      Parameters:
      kind - Type of publishing. Should be one of the following:
      • IServer.PUBLISH_INCREMENTAL
      • IServer.PUBLISH_FULL
      • IServer.PUBLISH_AUTO
      • IServer.PUBLISH_CLEAN
      server - Server where the module should be published. Must not be null.
      module - Module to be published. Must not be null.
      monitor - Progress monitor that user can cancel to cancel publication process. Must not be null.
      shell - Shell to be used to prompt user if necessary or null if not available.
      Returns:
      Status of publication process or an empty value if publication operation has not been done. Never null.