Examples of ServiceDescription


Examples of org.apache.airavata.commons.gfac.type.ServiceDescription


        /*
           * Service
           */
        ServiceDescription serv = new ServiceDescription();
        serv.getType().setName("SimpleEcho");

        List<InputParameterType> inputList = new ArrayList<InputParameterType>();

        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName("echo_input");
        input.setParameterType(StringParameterType.Factory.newInstance());
        inputList.add(input);

        InputParameterType input1 = InputParameterType.Factory.newInstance();
        input.setParameterName("myinput");
        URIParameterType uriType = URIParameterType.Factory.newInstance();
        uriType.setValue("gsiftp://gridftp1.ls4.tacc.utexas.edu:2811//home1/01437/ogce/gram_20130215.log");
        input.setParameterType(uriType);
        inputList.add(input1);


        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList

                                                                                       .size()]);
        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
        OutputParameterType output = OutputParameterType.Factory.newInstance();
        output.setParameterName("echo_output");
        output.setParameterType(StringParameterType.Factory.newInstance());
        outputList.add(output);

        OutputParameterType[] outputParamList = outputList
                .toArray(new OutputParameterType[outputList.size()]);

        serv.getType().setInputParametersArray(inputParamList);
        serv.getType().setOutputParametersArray(outputParamList);

        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
        // Adding security context
        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, getSecurityContext());
        ApplicationContext applicationContext = new ApplicationContext();
        jobExecutionContext.setApplicationContext(applicationContext);
        applicationContext.setServiceDescription(serv);
View Full Code Here

Examples of org.apache.airavata.commons.gfac.type.ServiceDescription

    }

    public static ServiceDescription getServiceDescription(String serviceName, String inputName, String inputType,
                                                           String outputName, String outputType) {
        // Create Service Description
        ServiceDescription serv = new ServiceDescription();
        serv.getType().setName(serviceName);

        InputParameterType input = InputParameterType.Factory.newInstance();
        input.setParameterName(inputName);
        ParameterType parameterType = input.addNewParameterType();
        parameterType.setType(DataType.Enum.forString(inputType));
        parameterType.setName(inputName);
        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
        inputList.add(input);
        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
                .size()]);

        OutputParameterType output = OutputParameterType.Factory.newInstance();
        output.setParameterName(outputName);
        ParameterType parameterType1 = output.addNewParameterType();
        parameterType1.setType(DataType.Enum.forString(outputType));
        parameterType1.setName(outputName);
        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
        outputList.add(output);
        OutputParameterType[] outputParamList = outputList
                .toArray(new OutputParameterType[outputList.size()]);
        serv.getType().setInputParametersArray(inputParamList);
        serv.getType().setOutputParametersArray(outputParamList);
        return serv;
    }
View Full Code Here

Examples of org.apache.airavata.commons.gfac.type.ServiceDescription

    ((UnicoreHostType) host.getType()).setGridFTPEndPointArray(new String[]{gridftpAddress});
    return host;
  }

  protected ServiceDescription getServiceDesc() {
    ServiceDescription serv = new ServiceDescription();
    serv.getType().setName("SimpleCat");

    List<InputParameterType> inputList = new ArrayList<InputParameterType>();
    InputParameterType input = InputParameterType.Factory.newInstance();
    input.setParameterName("echo_input");
    input.setParameterType(StringParameterType.Factory.newInstance());
    inputList.add(input);
    InputParameterType[] inputParamList = inputList
        .toArray(new InputParameterType[inputList.size()]);

    List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
    OutputParameterType output = OutputParameterType.Factory.newInstance();
    output.setParameterName("echo_output");
    output.setParameterType(StringParameterType.Factory.newInstance());
    outputList.add(output);
    OutputParameterType[] outputParamList = outputList
        .toArray(new OutputParameterType[outputList.size()]);

    serv.getType().setInputParametersArray(inputParamList);
    serv.getType().setOutputParametersArray(outputParamList);
   
   
    return serv;
  }
View Full Code Here

Examples of org.apache.airavata.commons.gfac.type.ServiceDescription

        this.serviceCreated = serviceCreated;
    }

    public ServiceDescription getServiceDescription() {
        if (serviceDescription == null) {
            serviceDescription = new ServiceDescription();
        }
        return serviceDescription;
    }
View Full Code Here

Examples of org.apache.airavata.commons.gfac.type.ServiceDescription

    private void validateDialog() throws Exception {
        if (getServiceName() == null || getServiceName().trim().equals("")) {
            throw new Exception("Name of the application cannot be empty!!!");
        }
        ServiceDescription serviceDescription2 = null;
        serviceDescription2 = getRegistry().getApplicationManager().getServiceDescription(getServiceName());
        if (isNewDescription() && serviceDescription2 != null) {
            throw new Exception("Service descriptor with the given name already exists!!!");
        }
    }
View Full Code Here

Examples of org.apache.airavata.commons.gfac.type.ServiceDescription

        this.serviceCreated = serviceCreated;
    }

    public ServiceDescription getServiceDescription() {
        if (serviceDescription == null) {
            serviceDescription = new ServiceDescription();
        }
        return serviceDescription;
    }
View Full Code Here

Examples of org.apache.airavata.commons.gfac.type.ServiceDescription

    private void validateDialog() throws Exception {
        if (getServiceName() == null || getServiceName().trim().equals("")) {
            throw new Exception("Name of the service cannot be empty!!!");
        }

        ServiceDescription serviceDescription2 = null;
        try {
            serviceDescription2 = getRegistry().getApplicationManager().getServiceDescription(getServiceName());
        } catch (AiravataAPIInvocationException e) {
            if (e.getCause() instanceof PathNotFoundException) {
                // non-existant name. just want we want
View Full Code Here

Examples of org.apache.airavata.commons.gfac.type.ServiceDescription

          if (hostDescriptionDialog.isHostCreated()) {
          loadDescriptors();
        }
          break;
        case SERVICE:
          ServiceDescription d = (ServiceDescription) getSelected();
          DeploymentDescriptionDialog serviceDescriptionDialog = new DeploymentDescriptionDialog(getAPI(),false,d, null);
            serviceDescriptionDialog.open();
//          ServiceDescriptionDialog serviceDescriptionDialog = new ServiceDescriptionDialog(getRegistry(),false,d);
//          serviceDescriptionDialog.open();
          if (serviceDescriptionDialog.isServiceCreated()) {
View Full Code Here

Examples of org.apache.airavata.commons.gfac.type.ServiceDescription

          title = "Host description";
          question = "Are you sure that you want to remove the service description \""
                      + h.getType().getHostName() + "\"?";
          break;
        case SERVICE:
            ServiceDescription d = (ServiceDescription) getSelected();
          title = "Service description";
          question = "Are you sure that you want to remove the applications associated with \""
                      + d.getType().getName() + "\"?";
          break;
        case APPLICATION:
          ApplicationDescription a = (ApplicationDescription) getSelected();
          title = "Service description";
          question = "Are you sure that you want to remove the service description \""
                      + a.getType().getApplicationName().getStringValue() + "\"?";
          break;
      }
     
       
    if (askQuestion(title, question)) {
              switch (descriptorType){
              case HOST:
                HostDescription h = (HostDescription) getSelected();
                  getAPI().getApplicationManager().deleteHostDescription(h.getType().getHostName());
                        loadDescriptors();
                break;
              case SERVICE:
                  ServiceDescription d = (ServiceDescription) getSelected();
                  getAPI().getApplicationManager().deleteServiceDescription(d.getType().getName());
                        loadDescriptors();
                break;
              case APPLICATION:
                ApplicationDescription a = (ApplicationDescription) getSelected();
                String[] s = dlist.get(a).split("\\$");
View Full Code Here

Examples of org.apache.axis.encoding.ServiceDescription

        Boolean shouldSendMultiRefs = (Boolean)engine.getOption(
                                                  AxisEngine.PROP_DOMULTIREFS);
        if (shouldSendMultiRefs != null)
            doMultiRefs = shouldSendMultiRefs.booleanValue();

        ServiceDescription sd = msgContext.getServiceDescription();
        if (sd != null) {
            sendXSIType = sd.getSendTypeAttr();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.