Package org.apache.airavata.xbaya

Examples of org.apache.airavata.xbaya.XBayaRuntimeException


        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());
                input.setPosition(new Point(Math.max(0, node.getPosition().x - 150), node.getPosition().y));
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

                String messageName = component.getOutputTypeName();
                String parameterName = originalFromPort.getComponentPort().getName();
                output = getOutput(fromNodeID, messageName, parameterName);
            } else {
                // This should not happen.
                throw new XBayaRuntimeException(originalFromNode.getClass().getName());
            }
            Port originalToPort = originalFromPort.getToPorts().get(0);
            PortImpl toPort = graph.getPort(originalToPort.getID());
            InputNode inputNode = (InputNode) toPort.getFromNode();
            inputNode.setDefaultValue(output);
View Full Code Here

            }
            inputs = workflow.getInputs();
            return inputs;
        } catch (GraphException e) {
            throw new XBayaRuntimeException(e);
        } catch (ComponentException e) {
            throw new XBayaRuntimeException(e);
        }

    }
View Full Code Here

            for (WSComponentPort componentPort : inputs) {
                if (null == componentPort.getValue()) {
                    if (null != componentPort.getDefaultValue()) {
                        componentPort.setValue(componentPort.getDefaultValue());
                    } else {
                        throw new XBayaRuntimeException("Workflow input cannot be null :" + componentPort.getName());
                    }
                }
                // This is a check that we do to make sure if the user didnt bother
                // to parse the input to a type like a xmlElement or an array we would
                // do it ourselves
                if (componentPort.getValue() instanceof String) {
                    componentPort.setValue(ODEClientUtil.parseValue(componentPort, (String) componentPort.getValue()));
                }

            }

            GsiInvoker secureInvoker = null;
            secureInvoker = new GsiInvoker(credentials, XBayaSecurity.getTrustedCertificates());

            LEADWorkflowInvoker invoker = new LEADWorkflowInvoker(wsdl, leadContext, null, secureInvoker);
            invoker.setInputs(inputs);
            final LEADWorkflowInvoker finalInvoker = invoker;

            new Thread() {
                public synchronized void run() {
                    boolean success;
                    try {
                        success = finalInvoker.invoke();

                        if (success) {
                            XmlConstants.BUILDER.serializeToString(finalInvoker.getOutputMessage());
                        } else {
                            XmlConstants.BUILDER.serializeToString(finalInvoker.getFaultMessage());
                        }
                    } catch (XBayaException e) {
                        ODEClient.this.throwException(e);
                    }
                }
            }.start();

        } catch (Exception e) {
            throw new XBayaRuntimeException(e);
        }

    }
View Full Code Here

        }

    }

    private void throwException(Exception e) {
        throw new XBayaRuntimeException(e);
    }
View Full Code Here

            X509Certificate certificate;
            try {
                certificate = CertUtil.readCertificate(bufferedReader);
            } catch (IOException e) {
                String message = "Failed to read certificates";
                throw new XBayaRuntimeException(message, e);
            } catch (GeneralSecurityException e) {
                String message = "Certificates are invalid";
                throw new XBayaRuntimeException(message, e);
            }
            if (certificate == null) {
                break;
            }
            certificates.add(certificate);
View Full Code Here

        }
    }

    private ComponentTreeNode getComponentTree(File dir) {
        if (!dir.isDirectory()) {
            throw new XBayaRuntimeException(dir + "is not a directory.");
        }

        boolean found = false;
        ComponentTreeNode tree = new ComponentTreeNode(dir.getName());
        for (File file : dir.listFiles()) {
View Full Code Here

                    throw new GraphException("Cannot connect ports with different types.");
                }

            } else {
                // Should not happen.
                throw new XBayaRuntimeException("edges.size(): " + edges.size());
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.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.