Package xsul.lead

Examples of xsul.lead.LeadResourceMapping


         * component send information in soap header
         */
        for (Node n : wsNode.getControlInPort().getFromNodes()) {
          if (n instanceof InstanceNode) {
            // TODO make it as constant
            LeadResourceMapping x = new LeadResourceMapping("AMAZON");

            x.addAttribute("ACCESS_KEY", AmazonCredential.getInstance().getAwsAccessKeyId());
            x.addAttribute("SECRET_KEY", AmazonCredential.getInstance().getAwsSecretAccessKey());

            if (((InstanceNode) n).isStartNewInstance()) {
              x.addAttribute("AMI_ID", ((InstanceNode) n).getIdAsValue());
              x.addAttribute("INS_TYPE", ((InstanceNode) n).getInstanceType());
            } else {
              x.addAttribute("INS_ID", ((InstanceNode) n).getIdAsValue());
            }

            x.addAttribute("USERNAME", ((InstanceNode) n).getUsername());

            // set to leadHeader
            leadCtxHeader.setResourceMapping(x);
          }
        }
View Full Code Here


        // config.setXRegistryURL(xRegistryURL);
        config.setGFacURL(gfacURL);

        // Deal with the Lead resource mapping

        LeadResourceMapping resourceMapping = null;

        if (!"".equals(this.resourceMappingField.getText())) {
            resourceMapping = new LeadResourceMapping(this.resourceMappingField.getText());
            if (!"".equals(this.gatekeeperField.getText())) {
                try {
                    resourceMapping.setGatekeeperEPR(new URI(this.gatekeeperField.getText()));
                } catch (URISyntaxException e) {
                    hide();
                    this.engine.getGUI().getErrorWindow().error(e);
                    return;
                }
            }

            if (!"".equals(this.jobManagerField.getText())) {
                resourceMapping.setJobManager(this.jobManagerField.getText());
            }
        }

        // its ok to pass null to resource mapping
        this.invoker.invoke(this.workflow, inputs, redeploy, resourceMapping);
View Full Code Here

        this.engine.getConfiguration().setTopic(topic);

        /*
         * Load host description from xregistry and add to interpreter
         */
        LeadResourceMapping mapping = null;
        // String host = this.resourceSelectionComboBox.getText();
        // if (host != null && !host.isEmpty()) {
        // XRegistryAccesser xregistryAccesser = new XRegistryAccesser(this.engine);
        //
        // HostDescriptionRegistrationWindow hostWindow = HostDescriptionRegistrationWindow.getInstance();
        //
        // if (!hostWindow.isEngineSet()) {
        // hostWindow.setXBayaEngine(this.engine);
        // }
        //
        // HostBean hostBean = xregistryAccesser.getHostBean(host);
        //
        // mapping = new LeadResourceMapping(host);
        // try {
        // mapping.setGatekeeperEPR(new URI(hostBean.getGateKeeperendPointReference()));
        // } catch (Exception e) {
        // this.engine.getGUI().getErrorWindow().error(e);
        // }
        //
        // }

        final LeadResourceMapping resourceMapping = mapping;
        final String topicString = topic;
        new Thread() {
            /**
             * @see java.lang.Thread#run()
             */
 
View Full Code Here

        this.engine.getConfiguration().setTopic(topic);

        /*
         * Load host description from xregistry and add to interpreter
         */
        LeadResourceMapping mapping = null;
       
        final LeadResourceMapping resourceMapping = mapping;
        final String topicString = topic;
        new Thread() {
            /**
             * @see java.lang.Thread#run()
             */
 
View Full Code Here

     */

    public void invoke(final Workflow workflow, final List<WSComponentPort> inputs, boolean redeploy,
            LeadResourceMapping resourceMapping) {
        this.canceled = false;
        final LeadResourceMapping resourcemap = resourceMapping;
        this.invokeThread = new Thread() {
            @Override
            public void run() {
                runInThread(workflow, inputs, resourcemap);
            }
View Full Code Here

         * component send information in soap header
         */
        for (Node n : wsNode.getControlInPort().getFromNodes()) {
          if (n instanceof InstanceNode) {
            // TODO make it as constant
            LeadResourceMapping x = new LeadResourceMapping(
                "AMAZON");

            x.addAttribute("ACCESS_KEY", AmazonCredential
                .getInstance().getAwsAccessKeyId());
            x.addAttribute("SECRET_KEY", AmazonCredential
                .getInstance().getAwsSecretAccessKey());

            if (((InstanceNode) n).isStartNewInstance()) {
              x.addAttribute("AMI_ID",
                  ((InstanceNode) n).getIdAsValue());
              x.addAttribute("INS_TYPE",
                  ((InstanceNode) n).getInstanceType());
            } else {
              x.addAttribute("INS_ID",
                  ((InstanceNode) n).getIdAsValue());
            }

            x.addAttribute("USERNAME",
                ((InstanceNode) n).getUsername());

            // set to leadHeader
            leadCtxHeader.setResourceMapping(x);
          }
View Full Code Here

        // config.setXRegistryURL(xRegistryURL);
        config.setGFacURL(gfacURL);

        // Deal with the Lead resource mapping

        LeadResourceMapping resourceMapping = null;

        if (!"".equals(this.resourceMappingField.getText())) {
            resourceMapping = new LeadResourceMapping(this.resourceMappingField.getText());
            if (!"".equals(this.gatekeeperField.getText())) {
                try {
                    resourceMapping.setGatekeeperEPR(new URI(this.gatekeeperField.getText()));
                } catch (URISyntaxException e) {
                    hide();
                    this.engine.getErrorWindow().error(e);
                    return;
                }
            }

            if (!"".equals(this.jobManagerField.getText())) {
                resourceMapping.setJobManager(this.jobManagerField.getText());
            }
        }

        // its ok to pass null to resource mapping
        this.invoker.invoke(this.workflow, inputs, redeploy, resourceMapping);
View Full Code Here

        this.engine.getConfiguration().setTopic(topic);

        /*
         * Load host description from xregistry and add to interpreter
         */
        LeadResourceMapping mapping = null;
        // String host = this.resourceSelectionComboBox.getText();
        // if (host != null && !host.isEmpty()) {
        // XRegistryAccesser xregistryAccesser = new XRegistryAccesser(this.engine);
        //
        // HostDescriptionRegistrationWindow hostWindow = HostDescriptionRegistrationWindow.getInstance();
        //
        // if (!hostWindow.isEngineSet()) {
        // hostWindow.setXBayaEngine(this.engine);
        // }
        //
        // HostBean hostBean = xregistryAccesser.getHostBean(host);
        //
        // mapping = new LeadResourceMapping(host);
        // try {
        // mapping.setGatekeeperEPR(new URI(hostBean.getGateKeeperendPointReference()));
        // } catch (Exception e) {
        // this.engine.getErrorWindow().error(e);
        // }
        //
        // }

        final LeadResourceMapping resourceMapping = mapping;
        final String topicString = topic;
        new Thread() {
            /**
             * @see java.lang.Thread#run()
             */
 
View Full Code Here

TOP

Related Classes of xsul.lead.LeadResourceMapping

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.