import jalview.gui.JvOptionPane;
import jalview.gui.JvSwingUtils;
import jalview.util.MessageManager;
+import jalview.ws.WSMenuEntryProviderI;
+import jalview.ws.api.JalviewServiceEndpointProviderI;
import jalview.ws.api.MultipleSequenceAlignmentI;
+import jalview.ws.api.ServiceWithParameters;
import jalview.ws.gui.MsaWSThread;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.ArgumentI;
import javax.swing.ToolTipManager;
/**
- * DOCUMENT ME!
+ * MsaWSClient
*
- * @author $author$
+ * Instantiates web service menu items for multiple alignment services, and
+ * holds logic for constructing a web service thread.
+ *
+ * TODO remove dependency on Jws2Client methods for creating AACon service UI
+ * elements.
+ *
+ * @author Jim Procter et al
* @version $Revision$
*/
-public class MsaWSClient extends Jws2Client
+public class MsaWSClient extends Jws2Client implements WSMenuEntryProviderI
{
/**
* server is a proxy class implementing the core methods for submitting,
*/
MultipleSequenceAlignmentI server;
- public MsaWSClient(Jws2Instance sh, String altitle,
+ public MsaWSClient(ServiceWithParameters sh, String altitle,
jalview.datamodel.AlignmentView msa, boolean submitGaps,
boolean preserveOrder, AlignmentI seqdataset,
AlignFrame _alignFrame)
// TODO Auto-generated constructor stub
}
- public MsaWSClient(Jws2Instance sh, WsParamSetI preset, String altitle,
+ public MsaWSClient(ServiceWithParameters sh, WsParamSetI preset,
+ String altitle,
jalview.datamodel.AlignmentView msa, boolean submitGaps,
boolean preserveOrder, AlignmentI seqdataset,
AlignFrame _alignFrame)
* DOCUMENT ME!
*/
- public MsaWSClient(Jws2Instance sh, WsParamSetI preset,
+ public MsaWSClient(ServiceWithParameters sh, WsParamSetI preset,
List<ArgumentI> arguments, boolean editParams, String altitle,
jalview.datamodel.AlignmentView msa, boolean submitGaps,
boolean preserveOrder, AlignmentI seqdataset,
return;
}
- if (!(sh.getEndpoint() instanceof MultipleSequenceAlignmentI))
+ if (!(sh instanceof JalviewServiceEndpointProviderI
+ && ((JalviewServiceEndpointProviderI) sh)
+ .getEndpoint() instanceof MultipleSequenceAlignmentI))
{
// redundant at mo - but may change
JvOptionPane.showMessageDialog(Desktop.desktop,
return;
}
serviceHandle = sh;
- server = (MultipleSequenceAlignmentI) sh.getEndpoint();
+ server = (MultipleSequenceAlignmentI) ((JalviewServiceEndpointProviderI) sh)
+ .getEndpoint();
if ((wsInfo = setWebService(sh, false)) == null)
{
JvOptionPane.showMessageDialog(Desktop.desktop, MessageManager
// Alignment dependent analysis calculation WS gui
return;
}
+ serviceHandle = service;
setWebService(service, true); // headless
+ attachWSMenuEntry(rmsawsmenu, alignFrame);
+ }
+
+ @Override
+ public void attachWSMenuEntry(JMenu wsmenu, AlignFrame alignFrame)
+ {
boolean finished = true, submitGaps = false;
- JMenu msawsmenu = rmsawsmenu;
+ /**
+ * temp variables holding msa service submenu or root service menu
+ */
+ JMenu msawsmenu = wsmenu;
+ JMenu rmsawsmenu = wsmenu;
String svcname = WebServiceName;
if (svcname.endsWith("WS"))
{
rmsawsmenu.add(msawsmenu);
calcName = "";
}
- boolean hasparams = service.hasParameters();
+ boolean hasparams = serviceHandle.hasParameters();
+ ServiceWithParameters service = (ServiceWithParameters) serviceHandle;
do
{
String action = "Align ";