|
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 |
} |