コード例 #1
0
 public void downloadBAMTool(String toolName, HttpServletResponse response)
     throws BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException {
   try {
     ServletOutputStream out = response.getOutputStream();
     DataHandler downloadData = stub.downloadToolBox(toolName);
     if (downloadData != null) {
       String fileName = "";
       if (!toolName.endsWith(".tbox")) {
         fileName = toolName + ".tbox";
       } else fileName = toolName;
       response.setHeader("Content-Disposition", "fileName=" + fileName);
       response.setContentType(downloadData.getContentType());
       InputStream in = downloadData.getDataSource().getInputStream();
       int nextChar;
       while ((nextChar = in.read()) != -1) {
         out.write((char) nextChar);
       }
       out.flush();
       in.close();
     } else {
       out.write("The requested service archive was not found on the server".getBytes());
     }
   } catch (RemoteException e) {
     log.error(e.getMessage(), e);
     throw new BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException(e);
   } catch (IOException e) {
     log.error(e.getMessage(), e);
     throw new BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException(e);
   }
 }
コード例 #2
0
 public BAMToolBoxDeployerClient(
     String cookie, String backEndServerURL, ConfigurationContext configCtx) throws AxisFault {
   String serviceURL = backEndServerURL + BAMToolBoxService;
   stub = new BAMToolboxDepolyerServiceStub(configCtx, serviceURL);
   ServiceClient client = stub._getServiceClient();
   Options option = client.getOptions();
   option.setManageSession(true);
   option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
 }
コード例 #3
0
 public BasicToolBox[] getAllBasicTools()
     throws BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException {
   try {
     return stub.getBasicToolBoxes();
   } catch (RemoteException e) {
     log.error(e.getMessage(), e);
     throw new BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException(e);
   }
 }
コード例 #4
0
 public boolean undeployToolBox(String[] toolName)
     throws RemoteException, BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException {
   try {
     return stub.undeployToolBox(toolName);
   } catch (RemoteException e) {
     log.error(e);
     throw e;
   } catch (BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException e) {
     log.error(e.getFaultMessage().getBAMToolboxDeploymentException());
     throw e;
   }
 }
コード例 #5
0
 public ToolBoxStatusDTO getToolBoxStatus(String toolType, String search)
     throws BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException, RemoteException {
   try {
     return stub.getDeployedToolBoxes(toolType, search);
   } catch (RemoteException e) {
     log.error(e.getMessage(), e);
     throw e;
   } catch (BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException e) {
     log.error(e.getFaultMessage().getBAMToolboxDeploymentException().getMessage(), e);
     throw e;
   }
 }
コード例 #6
0
 public boolean uploadToolBox(DataHandler toolbox, String toolName)
     throws RemoteException, BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException {
   try {
     return stub.uploadBAMToolBox(toolbox, toolName);
   } catch (RemoteException e) {
     log.error(e.getMessage(), e);
     throw e;
   } catch (BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException e) {
     log.error(e.getFaultMessage().getBAMToolboxDeploymentException().getMessage(), e);
     throw e;
   }
 }
コード例 #7
0
 public void installToolBoxFromURL(String url)
     throws BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException {
   try {
     stub.deployToolBoxFromURL(url);
   } catch (RemoteException e) {
     log.error(e.getMessage(), e);
     throw new BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException(e);
   } catch (BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException e) {
     log.error(e.getFaultMessage().getBAMToolboxDeploymentException().getMessage(), e);
     throw e;
   }
 }
コード例 #8
0
 public void deploySample(String sampleId)
     throws BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException {
   try {
     stub.deployBasicToolBox(Integer.parseInt(sampleId));
   } catch (RemoteException e) {
     log.error(e.getMessage(), e);
     throw new BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException(e);
   } catch (BAMToolboxDepolyerServiceBAMToolboxDeploymentExceptionException e) {
     log.error(e.getFaultMessage().getBAMToolboxDeploymentException().getMessage(), e);
     throw e;
   }
 }