use of org.eclipse.jst.server.generic.servertype.definition.Publisher in project webtools.servertools by eclipse.
the class AntPublisherPropertyTester method test.
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
if (receiver instanceof IServerWorkingCopy) {
IServerWorkingCopy wc = (IServerWorkingCopy) receiver;
ServerRuntime runtimeDefinition = ServerTypeDefinitionUtil.getServerTypeDefinition(wc.getRuntime());
if (runtimeDefinition != null) {
List l = runtimeDefinition.getPublisher();
Iterator r = l.iterator();
while (r.hasNext()) {
Publisher publisher = (Publisher) r.next();
if (AntPublisher.PUBLISHER_ID.equals(publisher.getId())) {
return true;
}
}
}
}
;
return false;
}
use of org.eclipse.jst.server.generic.servertype.definition.Publisher in project webtools.servertools by eclipse.
the class ServerTypeDefinitionModelTest method testPublisher.
public void testPublisher() {
Publisher publisher = (Publisher) subject.getPublisher().get(0);
assertNotNull(publisher);
assertTrue(publisher.getId() != null && publisher.getId().length() > 0);
assertTrue(publisher.getPublisherdata() != null && publisher.getPublisherdata().size() > 0);
PublisherData data = (PublisherData) publisher.getPublisherdata().get(0);
assertNotNull(data);
assertTrue(data.getDataname() != null && data.getDataname().length() > 0);
assertTrue(data.getDatavalue() != null && data.getDatavalue().length() > 0);
}
Aggregations