Bug 169570 - API deficiency in IServer.publish
Summary: API deficiency in IServer.publish
Status: CLOSED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Tim deBoer CLA
QA Contact: Tim deBoer CLA
URL:
Whiteboard:
Keywords: api
: 200279 205319 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-04 13:00 EST by Rob Stryker CLA
Modified: 2017-10-11 16:59 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stryker CLA 2007-01-04 13:00:21 EST
The IServer.publish method has the following prototype:

	public IStatus publish(int kind, IProgressMonitor monitor);

int kind can be one of the following, as per javadoc:
 *    <li><code>PUBLSIH_FULL</code>- indicates a full publish.</li>
 *    <li><code>PUBLISH_INCREMENTAL</code>- indicates a incremental publish.
 *    <li><code>PUBLISH_CLEAN</code>- indicates a clean request. Clean throws
 *      out all state and cleans up the module on the server before doing a
 *      full publish.

This API allows for full, incremental, or clean publish of the server as an entire entity, but it does not allow for the publishing of one or more specific modules only. 

Use Case:

User has 8 projects opened, all of which qualify as "modules". They are all in various states of sync. Some are perfectly sync'd, others need a full publish, and still others need only an incremental publish.

The user decides he wants to re-publish ONLY project5, and none of the others. There is no API for me to provide the user with this option. 

Suggestion:

IServer.publish(int kind, IProgressMonitor monitor) {
    publish(kind, getAllModules(), monitor);
}

IServer.publish(int kind, IModule[] modules, IProgressMonitor monitor) {
   etc
}

This would require a similar change in the ServerBehaviorDelegate class.
Comment 1 Rob Stryker CLA 2007-01-04 13:05:48 EST
This would require a similar change in the PublishServerJob, which admittedly is internal and trivially easy to duplicate, but would still benefit from the change. 
Comment 2 Tim deBoer CLA 2007-01-04 13:31:08 EST
Agreed; I knew this was coming. No plans in the short term yet for when this would be implemented and what changes would be made to the Servers view (although most likely an individual Publish option on each module).
Comment 3 Rob Stryker CLA 2007-01-04 15:58:58 EST
I could care less about the ui's impl dealing with the issue. I just want the core to be changed as soon as is possible to allow for it. ;)
Comment 4 Tim deBoer CLA 2007-08-17 10:14:15 EDT
*** Bug 200279 has been marked as a duplicate of this bug. ***
Comment 5 Tim deBoer CLA 2007-10-04 14:45:59 EDT
*** Bug 205319 has been marked as a duplicate of this bug. ***
Comment 6 Rob Stryker CLA 2008-05-29 00:01:31 EDT
Tim I've noticed API changes in 3.0 m7. Would you say this bug is fixed? 
Comment 7 Tim deBoer CLA 2008-06-10 15:17:31 EDT
That depends if you say 'yes' :). The new API exists and is passed through to ServerBehaviourDelegate, and all changes to affected classes like PublishJob, etc., have been made and tested.

I had wanted to make some further changes to ServerBehaviourDelegate. Right now it just delegates to the existing publish() method, leaving it to individual servers to provide a better implementation that only publishes the correct modules. However, I have not found any non-breaking ways to make this change given the existing protected/impl methods (which may have been overridden by existing adapters) and hence have not made any further changes.

If you consider this done for your scenario, I agree we should close and I can always open up another bug in the future if I find additional changes that could be made.
Comment 8 Angel Vera CLA 2009-09-25 16:27:35 EDT
Doing cleanup. It sounds like this one should be closed.

Tim, if there is further enhancements that you would like to get done, please open a new bug.
Comment 9 Tim deBoer CLA 2011-01-20 10:23:26 EST
Closing old bugs.
Comment 10 Eclipse Genie CLA 2017-10-11 16:17:51 EDT
New Gerrit change created: https://git.eclipse.org/r/108414
Comment 11 Eclipse Genie CLA 2017-10-11 16:17:54 EDT
New Gerrit change created: https://git.eclipse.org/r/108413
Comment 12 Eclipse Genie CLA 2017-10-11 16:21:01 EDT
New Gerrit change created: https://git.eclipse.org/r/108532
Comment 13 Eclipse Genie CLA 2017-10-11 16:21:19 EDT
New Gerrit change created: https://git.eclipse.org/r/108534
Comment 14 Eclipse Genie CLA 2017-10-11 16:51:45 EDT
New Gerrit change created: https://git.eclipse.org/r/109732
Comment 15 Eclipse Genie CLA 2017-10-11 16:52:22 EDT
New Gerrit change created: https://git.eclipse.org/r/109762