Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 280815 | Differences between
and this patch

Collapse All | Expand All

(-)servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java (+35 lines)
Lines 238-243 Link Here
238
		setAttribute(PROP_STOP_TIMEOUT, p);
238
		setAttribute(PROP_STOP_TIMEOUT, p);
239
	}
239
	}
240
240
241
	public boolean isPublisherEnabled(String publisherId) {
242
243
		boolean enabled = false;
244
		if (publisherId != null) {
245
			List<String> publishers = this.getAttribute(Server.PROP_PUBLISHERS, Server.EMPTY_LIST);
246
			if (!publishers.isEmpty()) {
247
				// iterate over the publishers looking for the specified publisherId
248
				final Iterator<String> deployersIterator = publishers.iterator();
249
				while (deployersIterator.hasNext()) {
250
					String publisher = deployersIterator.next();
251
					int separatorIndex = publisher.indexOf(":");
252
					if(publisherId.equals(publisher.substring(0, separatorIndex))) {
253
						// determine the state of this publisher
254
						if("true".equals(publisher.substring(separatorIndex + 1, publisher.length()))) {
255
							enabled = true;
256
						}
257
						break;
258
					}
259
				}
260
			}
261
		}
262
		return enabled;
263
	}
264
265
	public void setPublisherEnabled(String publisherId, boolean enabled) {
266
267
		if (publisherId != null) {
268
			Publisher publisher = ServerPlugin.findPublisher(publisherId);
269
			if (publisher != null) {
270
				this.setPublisherEnabled(publisher, enabled);
271
			}
272
		}
273
	}
274
275
	
241
	public void setAutoPublishSetting(int s) {
276
	public void setAutoPublishSetting(int s) {
242
		setAttribute(PROP_AUTO_PUBLISH_SETTING, s);
277
		setAttribute(PROP_AUTO_PUBLISH_SETTING, s);
243
	}
278
	}
(-)servercore/org/eclipse/wst/server/core/IServerWorkingCopy.java (-1 / +32 lines)
Lines 60-66 Link Here
60
	 *    read only, and <code>false</code> to unset
60
	 *    read only, and <code>false</code> to unset
61
	 */
61
	 */
62
	public void setReadOnly(boolean readOnly);
62
	public void setReadOnly(boolean readOnly);
63
	
63
64
	/**
65
	 * Sets the time limit (in seconds) to wait for the server to start.
66
	 * 
67
	 * @param timeout The amount of time in seconds to wait for the server to start.
68
	 */
69
	public void setStartTimeout(int timeout);
70
71
	/**
72
	 * Sets the time limit (in seconds) to wait for the server to stop. 
73
	 * 
74
	 * @param timeout The amount of time in seconds to wait for the server to stop.
75
	 */
76
	public void setStopTimeout(int timeout);
77
78
	/**
79
	 * Returns whether the publisher with the specified publisherId is enabled or disabled for this working copy.
80
	 * 
81
	 * @return <code>true</code> if this working copy has a publisher with the specified publisherId and it is enabled;
82
	 *         Otherwise, <code>false</code>
83
	 */
84
	public boolean isPublisherEnabled(String publisherId);
85
86
	/**
87
	 * Sets the enabled state of the publisher with the specified publisherId.  If a publisher with the specified publisherId
88
	 * does not exist then no action occurs.
89
	 * 
90
	 * @param publisherId The id value of the publisher
91
	 * @param enabled The enabled state of this publisher
92
	 */
93
	public void setPublisherEnabled(String publisherId, boolean enabled);
94
64
	/**
95
	/**
65
	 * Returns whether this working copy has unsaved changes.
96
	 * Returns whether this working copy has unsaved changes.
66
	 * 
97
	 * 

Return to bug 280815