From 7511792d44f06e239b56010abd2e8b3480835e39 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 17 Apr 2008 15:47:56 +0000 Subject: [PATCH] javadoc and refactor of setWebService method to allow headless client operation --- src/jalview/ws/WSClient.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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; } } -- 1.7.10.2