Package org.apache.airavata.xbaya

Examples of org.apache.airavata.xbaya.XBayaConfiguration


            /**
             * @see java.lang.Thread#run()
             */
            @Override
            public void run() {
                XBayaConfiguration conf = DynamicWorkflowRunnerWindow.this.engine.getConfiguration();
                WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(engine.getGUI().getWorkflow(),topicString,conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf, DynamicWorkflowRunnerWindow.this.engine.getGUI(), DynamicWorkflowRunnerWindow.this.engine.getMonitor());
                workflowInterpreterConfiguration.setRunWithCrossProduct(isRunCrossProduct);

                WorkflowInterpreter workflowInterpreter = new WorkflowInterpreter(
                    workflowInterpreterConfiguration, new GUIWorkflowInterpreterInteractorImpl(engine, engine.getGUI().getWorkflow()));
                DynamicWorkflowRunnerWindow.this.engine.registerWorkflowInterpreter(workflowInterpreter);
View Full Code Here


        return getWorkflow(new QName(XBayaConstants.LEAD_NS, name));
    }

    public void main() {

        XBayaConfiguration config = new XBayaConfiguration();
        config.setMyProxyServer("myproxy.teragrid.org");
        config.setMyProxyUsername("USER");
        config.setMyProxyPassphrase("PASSWORD");

        new XBayaEngine(config);
    }
View Full Code Here

    }

    private void runInThread(final Workflow workflow, final List<WSComponentPort> inputs,
            LeadResourceMapping resourceMapping) {
        MonitorConfiguration monitorConfiguration = this.engine.getMonitor().getConfiguration();
        XBayaConfiguration configuration = this.engine.getConfiguration();

        // Create the invoker
        LEADWorkflowInvoker invoker = null;
        try {

            WsdlDefinitions wsdl = workflow.getOdeInvokableWSDL(configuration.getDSCURL(), configuration.getODEURL());

            LeadContextHeader leadContext = XBayaUtil.buildLeadContextHeader(this.engine, monitorConfiguration,
                    StringUtil.convertToJavaIdentifier(engine.getWorkflow().getName()), resourceMapping);
            // /////////////////////////////////////
            leadContext.setExperimentId(monitorConfiguration.getTopic());
View Full Code Here

     * restore all the field if workflow has been loaded before
     */
    public void show() {
        this.workflow = this.engine.getWorkflow();

        XBayaConfiguration configuration = this.engine.getConfiguration();
        MonitorConfiguration monitorConfiguration = this.engine.getMonitor().getConfiguration();

        // Topic
        String topic = monitorConfiguration.getTopic();
        if (topic != null) {
            this.topicTextField.setText(topic);
        } else {
            this.topicTextField.setText(UUID.randomUUID().toString());
        }

        // GFac URL
        this.gfacTextField.setText(configuration.getGFacURL());

        this.dialog.show();
    }
View Full Code Here

            registry = new JCRComponentRegistry(url, username, password);
        } catch (Exception e) {
            this.engine.getErrorWindow().error(e.getMessage());
            return;
        }
        XBayaConfiguration configuration = this.engine.getConfiguration();
        configuration.setJcrComponentRegistry(registry);
        configuration.setRegigstryUserName(username);
        configuration.setRegistryPassphrase(password);
        configuration.setRegistryURL(url);
        hide();

//        this.loader.load(registry);
    }
View Full Code Here

            }
        }
    }

    public  XBayaConfiguration getConfiguration(Map<String,String> vals) throws URISyntaxException {
    XBayaConfiguration configuration = new XBayaConfiguration();
    configuration.setBrokerURL(new URI(findValue(vals, BROKER, XBayaConstants.DEFAULT_BROKER_URL.toString())));
    configuration.setGFacURL(new URI(findValue(vals, GFAC, XBayaConstants.DEFAULT_GFAC_URL.toString())));
    configuration.setMessageBoxURL(new URI(findValue(vals, MSGBOX, XBayaConstants.DEFAULT_MESSAGE_BOX_URL.toString())));
    configuration.setMyProxyLifetime(XBayaConstants.DEFAULT_MYPROXY_LIFTTIME);
    configuration.setMyProxyPort(XBayaConstants.DEFAULT_MYPROXY_PORT);
        //This null check will fix some test failures
        if (WorkflowInterpretorSkeleton.configurationContext != null) {
            configuration.setMyProxyServer(findValue(vals, PROXYSERVER, (String) WorkflowInterpretorSkeleton.configurationContext.getProperty(MYPROXY_SERVER)));
            configuration.setMyProxyPassphrase(findValue(vals, MYPROXY_PASS, (String) WorkflowInterpretorSkeleton.configurationContext.getProperty(MYPROXY_PASS)));
            configuration.setMyProxyUsername(findValue(vals, MYPROXY_USER, (String) WorkflowInterpretorSkeleton.configurationContext.getProperty(MYPROXY_USER)));
            configuration.setTrustedCertLocation(findValue(vals, TRUSTED_CERT_LOCATION, (String) WorkflowInterpretorSkeleton.configurationContext.getProperty(TRUSTED_CERT_LOCATION)));
        }
    return configuration;
  }
View Full Code Here

    /**
     * @return
     */
    private static XBayaConfiguration getConfiguration() {
        XBayaConfiguration configuration = new XBayaConfiguration();
        configuration.setBrokerURL(XBayaConstants.DEFAULT_BROKER_URL);
        configuration.setDSCURL(XBayaConstants.DEFAULT_DSC_URL);
        configuration.setGFacURL(XBayaConstants.DEFAULT_GFAC_URL);
        configuration.setMessageBoxURL(XBayaConstants.DEFAULT_MESSAGE_BOX_URL);
        configuration.setMyProxyLifetime(XBayaConstants.DEFAULT_MYPROXY_LIFTTIME);
        configuration.setMyProxyPort(XBayaConstants.DEFAULT_MYPROXY_PORT);
        configuration.setMyProxyServer(XBayaConstants.DEFAULT_MYPROXY_SERVER);
        // configuration.setXRegistryURL(XBayaConstants.DEFAULT_XREGISTRY_URL);
        return configuration;
    }
View Full Code Here

            this.topicTextField.setText(UUID.randomUUID().toString());
        } else {
            this.topicTextField.setText(notifConfig.getTopic());
        }

        XBayaConfiguration config = this.engine.getConfiguration();

        URI gfacURL = config.getGFacURL();
        this.gfacTextField.setText(StringUtil.toString(gfacURL));

        this.dialog.show();
    }
View Full Code Here

            String value = parameterTextField.getText();
            arguments.add("-" + id);
            arguments.add(value);
        }

        XBayaConfiguration config = this.engine.getConfiguration();

        String gfacString = this.gfacTextField.getText();
        if (gfacString.length() != 0) {
            try {
                URI uri = new URI(gfacString).parseServerAuthority();
                config.setGFacURL(uri);
            } catch (URISyntaxException e) {
                this.engine.getErrorWindow().error(ErrorMessages.GFAC_URL_WRONG, e);
                return;
            }
            arguments.add("-" + JythonScript.GFAC_VARIABLE);
View Full Code Here

            }

        }
        System.err.println("Input all set");

        XBayaConfiguration conf = null;
        try {
            conf = getConfiguration(configurations);
            conf.setTopic(topic);
            conf.setRunWithCrossProduct(true);
        } catch (URISyntaxException e1) {
            throw new XBayaRuntimeException(e1);
        }
        WorkflowInterpretorEventListener listener = null;
        WorkflowInterpreter interpreter = null;
        if (Boolean.parseBoolean(configurations.get(WITH_LISTENER))) {
            listener = new WorkflowInterpretorEventListener(workflow, conf);
            interpreter = new WorkflowInterpreter(conf, topic, workflow, username, password);

            try {
                System.err.println("start listener set");
                listener.start();
            } catch (MonitorException e1) {
                e1.printStackTrace();
            }
        } else {
            interpreter = new WorkflowInterpreter(conf, topic, workflow, username, password, true);
        }

        WorkflowContextHeaderBuilder.setCurrentContextHeader(builder.getContextHeader());

        final WorkflowInterpretorEventListener finalListener = listener;
        conf.setJcrComponentRegistry(jcrComponentRegistry);

      
        final WorkflowInterpreter finalInterpreter = interpreter;
        interpreter.setActOnProvenance(provenance);
        interpreter.setProvenanceWriter(runner);
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.XBayaConfiguration

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.