Package edu.indiana.extreme.xbaya

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException


            // Load anonymous certificate to access resource catalog.
            // This is a temporary solution
            InputStream anonymousCertificateStream = XBayaSecurity.class
                    .getResourceAsStream(ANONYMOUS_CERTIFICATE);
            if (anonymousCertificateStream == null) {
                throw new XBayaRuntimeException("Failed to get InputStream to "
                        + ANONYMOUS_CERTIFICATE);
            }

            sslContext.loadEAYKeyFile(anonymousCertificateStream, "");

            // Copied from PuretlsInvoker
            SSLPolicyInt policy = new SSLPolicyInt();
            policy.negotiateTLS(true);
            policy.waitOnClose(true);
            sslContext.setPolicy(policy);

            PuretlsInvoker invoker = new PuretlsInvoker(sslContext);
            WSIFProviderManager.getInstance().addProvider(
                    new xsul.wsif_xsul_soap_gsi.Provider(invoker));
            WsdlResolver.getInstance().setSecureInvoker(invoker);

        } catch (GeneralSecurityException e) {
            throw new XBayaRuntimeException(e);
        } catch (IOException e) {
            throw new XBayaRuntimeException(e);
        }

    }
View Full Code Here


    }

    private static List<X509Certificate> getTrustedCertificates(String pass) {
        InputStream stream = XBayaSecurity.class.getResourceAsStream(pass);
        if (stream == null) {
            throw new XBayaRuntimeException("Failed to get InputStream to "
                    + pass);
        }
        return SecurityUtil.readTrustedCertificates(stream);
    }
View Full Code Here

    for (Pair<String, String> pair : candidates) {
      Workflow clone = workflow.clone();

      NodeImpl node = clone.getGraph().getNode(pair.getLeft());
      if (null == node) {
        throw new XBayaRuntimeException("Specified node not found:"
            + pair.getLeft());
      }
      Port candidatePort = null;
      List<DataPort> inPorts = node.getInputPorts();
      for (DataPort dataPort : inPorts) {
        if (pair.getRight().equals(dataPort.getID())) {
          candidatePort = dataPort;
          break;
        }
      }
      if (null == candidatePort) {
        throw new XBayaRuntimeException("Specifies Port was not found:"
            + pair.getRight());
      }
      if (!(candidatePort.getFromNode() instanceof InputNode)) {
        removeUnnecessaryNodes(node, candidatePort, clone);
        Node input = clone.addNode(new InputComponent());
View Full Code Here

    }
    for (Node node : removeList) {
      try {
        clone.removeNode(node);
      } catch (GraphException e) {
        throw new XBayaRuntimeException(e);
      }
    }
  }
View Full Code Here

        for (DataPort dataPort : inputPorts) {
          removeUnnecessaryNodes(fromNode, dataPort, workflow);
        }
        workflow.removeNode(fromNode);
      } catch (GraphException e) {
        throw new XBayaRuntimeException(e);
      }
    }
  }
View Full Code Here

    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    int ret = fileChooser.showOpenDialog(this.engine.getGUI().getFrame());
    if (JFileChooser.APPROVE_OPTION != ret) {
      throw new XBayaRuntimeException(
          "Cannot proceed without valid directory");
    }
    File selectedDir = fileChooser.getSelectedFile();
    File rootDir = new File(selectedDir, "xbaya");
    deleteDir(rootDir);
View Full Code Here

      if (toNodes.size() == 1 && toNodes.get(0) instanceof WSPort) {
        WSPort outPort = (WSPort) toNodes.get(0);
        returnElement = outPort.getComponentPort().getElement();
        returnType = outPort.getType();
      } else {
        throw new XBayaRuntimeException(
            "Unhandled  port type for Dynamic component or to many outputs");
      }
      for (Port port : toNodes) {
        if (toNodes.get(0) instanceof DataPort) {
          if (!returnType.equals(((DataPort) toNodes.get(0))
              .getType())) {
            throw new XBayaRuntimeException(
                "Dynamic output port connected to input ports of different types.");
          }
        } else {
          throw new XBayaRuntimeException(
              "Unhandled  port type for Dynamic component");
        }
      }
      int index = BasicTypeMapping.getSimpleTypeIndex(returnElement);
      if (-1 != index) {
        function += SPACE + BasicTypeMapping.getTypeName(index);
      } else {
        throw new XBayaRuntimeException(
            "WIll be fixed with complex type mappign");
      }
    }

    function += SPACE + "operationName(";
    List<DataPort> inputPorts = this.node.getInputPorts();
    boolean first = true;

    // variable list in function prototype
    for (DataPort inPort : inputPorts) {
      Port fromPort = inPort.getFromPort();
      if (fromPort instanceof WSPort) {
        WSPort wsPort = (WSPort) fromPort;
        XmlElement element = wsPort.getComponentPort().getElement();
       
//        QName inType = ((DataPort) fromPort).getType();
        int typeIndex = BasicTypeMapping.getSimpleTypeIndex(element);
        if (-1 != typeIndex) {
          if (first) {
            first = false;
          } else {
            function += SPACE + ",";
          }
          function += BasicTypeMapping.getTypeName(typeIndex) + SPACE
              + BasicTypeMapping.getTypeVariableName(typeIndex);
        } else {
          throw new XBayaRuntimeException(
              "Complex Type occured:This will be fixed!!!!!");
        }
      } else {
        throw new XBayaRuntimeException(
            "Dynamic Node connected to non data port");
      }
    }

    function += ")" ;
View Full Code Here

            // TODO Auto-generated catch block
            e.printStackTrace();
          }

        } else {
          throw new XBayaRuntimeException(
              "Unknown port for code generation" + fromPort);
        }
      } else {
        throw new XBayaRuntimeException(
            "Unknown from node for code generation" + fromNode);
      }
    }
  }
View Full Code Here

        index = i;
        break;
      }
    }
    if(index == -1){
      throw new XBayaRuntimeException("Operation name not found");
    }
    return publicSplit[index].substring(0, publicSplit[index].indexOf(searchStr)).trim().split(" ")[1];
  }
View Full Code Here

      } else if (kind == Kind.DATA_IN || kind == Kind.CONTROL_IN) {
        p1 = this.mousePoint;
        p2 = this.draggedPort.getGUI().getPosition();
      } else {
        // This should not happen.
        throw new XBayaRuntimeException();
      }
      g.setColor(Color.RED);

      Stroke originalStroke = g.getStroke();
      if (kind == Kind.CONTROL_IN || kind == Kind.CONTROL_OUT) {
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.XBayaRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.