Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 139578 Details for
Bug 280815
Enhance the IServerWorkingCopy API to allow setting the timeout and publishers state
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
possible (but untested) patch to accomidate this request based on the 3_0_5_patches branch.
workingcopy_newapi.patch (text/plain), 3.79 KB, created by
Troy Bishop
on 2009-06-18 14:53:24 EDT
(
hide
)
Description:
possible (but untested) patch to accomidate this request based on the 3_0_5_patches branch.
Filename:
MIME Type:
Creator:
Troy Bishop
Created:
2009-06-18 14:53:24 EDT
Size:
3.79 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.server.core >Index: servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java,v >retrieving revision 1.57 >diff -u -r1.57 ServerWorkingCopy.java >--- servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java 12 Feb 2008 22:24:49 -0000 1.57 >+++ servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java 18 Jun 2009 18:48:59 -0000 >@@ -238,6 +238,41 @@ > setAttribute(PROP_STOP_TIMEOUT, p); > } > >+ public boolean isPublisherEnabled(String publisherId) { >+ >+ boolean enabled = false; >+ if (publisherId != null) { >+ List<String> publishers = this.getAttribute(Server.PROP_PUBLISHERS, Server.EMPTY_LIST); >+ if (!publishers.isEmpty()) { >+ // iterate over the publishers looking for the specified publisherId >+ final Iterator<String> deployersIterator = publishers.iterator(); >+ while (deployersIterator.hasNext()) { >+ String publisher = deployersIterator.next(); >+ int separatorIndex = publisher.indexOf(":"); >+ if(publisherId.equals(publisher.substring(0, separatorIndex))) { >+ // determine the state of this publisher >+ if("true".equals(publisher.substring(separatorIndex + 1, publisher.length()))) { >+ enabled = true; >+ } >+ break; >+ } >+ } >+ } >+ } >+ return enabled; >+ } >+ >+ public void setPublisherEnabled(String publisherId, boolean enabled) { >+ >+ if (publisherId != null) { >+ Publisher publisher = ServerPlugin.findPublisher(publisherId); >+ if (publisher != null) { >+ this.setPublisherEnabled(publisher, enabled); >+ } >+ } >+ } >+ >+ > public void setAutoPublishSetting(int s) { > setAttribute(PROP_AUTO_PUBLISH_SETTING, s); > } >Index: servercore/org/eclipse/wst/server/core/IServerWorkingCopy.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerWorkingCopy.java,v >retrieving revision 1.23 >diff -u -r1.23 IServerWorkingCopy.java >--- servercore/org/eclipse/wst/server/core/IServerWorkingCopy.java 4 Feb 2008 01:41:48 -0000 1.23 >+++ servercore/org/eclipse/wst/server/core/IServerWorkingCopy.java 18 Jun 2009 18:48:59 -0000 >@@ -60,7 +60,38 @@ > * read only, and <code>false</code> to unset > */ > public void setReadOnly(boolean readOnly); >- >+ >+ /** >+ * Sets the time limit (in seconds) to wait for the server to start. >+ * >+ * @param timeout The amount of time in seconds to wait for the server to start. >+ */ >+ public void setStartTimeout(int timeout); >+ >+ /** >+ * Sets the time limit (in seconds) to wait for the server to stop. >+ * >+ * @param timeout The amount of time in seconds to wait for the server to stop. >+ */ >+ public void setStopTimeout(int timeout); >+ >+ /** >+ * Returns whether the publisher with the specified publisherId is enabled or disabled for this working copy. >+ * >+ * @return <code>true</code> if this working copy has a publisher with the specified publisherId and it is enabled; >+ * Otherwise, <code>false</code> >+ */ >+ public boolean isPublisherEnabled(String publisherId); >+ >+ /** >+ * Sets the enabled state of the publisher with the specified publisherId. If a publisher with the specified publisherId >+ * does not exist then no action occurs. >+ * >+ * @param publisherId The id value of the publisher >+ * @param enabled The enabled state of this publisher >+ */ >+ public void setPublisherEnabled(String publisherId, boolean enabled); >+ > /** > * Returns whether this working copy has unsaved changes. > *
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 280815
: 139578 |
152513
|
152545