From: jprocter Date: Thu, 17 Apr 2008 15:47:56 +0000 (+0000) Subject: javadoc and refactor of setWebService method to allow headless client operation X-Git-Tag: Release_2_4~112 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7511792d44f06e239b56010abd2e8b3480835e39;p=jalview.git javadoc and refactor of setWebService method to allow headless client operation --- diff --git a/src/jalview/ws/WSClient.java b/src/jalview/ws/WSClient.java index cf871b8..aa02fd3 100755 --- a/src/jalview/ws/WSClient.java +++ b/src/jalview/ws/WSClient.java @@ -67,10 +67,20 @@ public class WSClient /** * initialise WSClient service information attributes from the service handle * @param sh - * @return the service instance information for this client and job. + * @return the service instance information GUI for this client and job. */ protected WebserviceInfo setWebService(ServiceHandle sh) { + return setWebService(sh, true); + } + /** + * initialise WSClient service information attributes from the service handle + * @param sh + * @param headless true implies no GUI objects will be created. + * @return the service instance information GUI for this client and job. + */ + protected WebserviceInfo setWebService(ServiceHandle sh, boolean headless) + { WebServiceName = sh.getName(); if (ServiceActions.containsKey(sh.getAbstractName())) { @@ -84,9 +94,12 @@ public class WSClient } WebServiceReference = sh.getDescription(); WsURL = sh.getEndpointURL(); - WebserviceInfo wsInfo = new WebserviceInfo(WebServiceJobTitle, + WebserviceInfo wsInfo = null; + if (!headless) + { + wsInfo = new WebserviceInfo(WebServiceJobTitle, WebServiceReference); - + } return wsInfo; } }