Examples of ServiceDescription


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

    @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Response addServiceDescriptor(ServiceDescriptor service) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            ServiceDescription serviceDescription = DescriptorUtil.createServiceDescription(service);
            airavataRegistry.addServiceDescriptor(serviceDescription);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Service descriptor saved successfully...");
            return builder.build();
        } catch (DescriptorAlreadyExistsException e) {
View Full Code Here

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

    @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Response updateServiceDescriptor(ServiceDescriptor service) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            ServiceDescription serviceDescription = DescriptorUtil.createServiceDescription(service);
            airavataRegistry.updateServiceDescriptor(serviceDescription);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Service descriptor updated successfully...");
            return builder.build();
        } catch (DescriptorAlreadyExistsException e) {
View Full Code Here

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

    @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Response getServiceDescriptor(@QueryParam("serviceName") String serviceName) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(serviceName);
            if (serviceDescription != null) {
                ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(serviceDescriptor);
                return builder.build();
View Full Code Here

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

        try {
            ApplicationDescription applicationDescription = airavataRegistry.getApplicationDescriptor(serviceName, hostName, applicationName);
            if (applicationDescription != null) {
                ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
                applicationDescriptor.setHostdescName(hostName);
                ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(serviceName);
                ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);
                applicationDescriptor.setServiceDescriptor(serviceDescriptor);

                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(applicationDescriptor);
View Full Code Here

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

        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            ApplicationDescription applicationDescription = airavataRegistry.getApplicationDescriptors(serviceName, hostName);
            ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
            applicationDescriptor.setHostdescName(hostName);
            ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(serviceName);
            ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);
            applicationDescriptor.setServiceDescriptor(serviceDescriptor);

            if (applicationDescription != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
View Full Code Here

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

            for (String hostName : applicationDeploymentDescriptionMap.keySet()) {
                ApplicationDescription applicationDescription = applicationDeploymentDescriptionMap.get(hostName);
                ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
                applicationDescriptor.setHostdescName(hostName);

                ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(serviceName);
                ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);
                applicationDescriptor.setServiceDescriptor(serviceDescriptor);

                applicationDescriptors[i] = applicationDescriptor;
                i++;
View Full Code Here

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

            int i = 0;
            for (String[] descriptors : applicationDeploymentDescriptionMap.keySet()) {
                ApplicationDescription applicationDescription = applicationDeploymentDescriptionMap.get(descriptors);
                ApplicationDescriptor applicationDescriptor = DescriptorUtil.createApplicationDescriptor(applicationDescription);
                applicationDescriptor.setHostdescName(descriptors[1]);
                ServiceDescription serviceDescription = airavataRegistry.getServiceDescriptor(descriptors[0]);
                if (serviceDescription == null) {
                    Response.ResponseBuilder builder = Response.status(Response.Status.NO_CONTENT);
                    return builder.build();
                }
                ServiceDescriptor serviceDescriptor = DescriptorUtil.createServiceDescriptor(serviceDescription);
View Full Code Here

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

  protected abstract ApplicationDescription getApplicationDesc(
      JobTypeType jobType);

  protected ServiceDescription getServiceDesc(String serviceName) {
    ServiceDescription serv = new ServiceDescription();
    serv.getType().setName(serviceName);
    return serv;
  }
View Full Code Here

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


        /*
        * Service
        */
        ServiceDescription serv = new ServiceDescription();
        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();

        serv.getType().setName(serviceName);
        serv.getType().setDescription(serviceName);

        //Creating input parameters
        InputParameterType parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("molecule_id");
        ParameterType parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");
        inputParameters.add(parameter);

        parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("geom_mol2");
        parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.URI);
        parameterType.setName("URI");
        inputParameters.add(parameter);

        parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("toppar_main_tgz");
        parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.URI);
        parameterType.setName("URI");
        inputParameters.add(parameter);

        parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("toppar_usr_tgz");
        parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.URI);
        parameterType.setName("URI");
        inputParameters.add(parameter);

        parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("toppar_mol_str");
        parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.URI);
        parameterType.setName("URI");
        inputParameters.add(parameter);

        parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("molecule_dir_in_tgz");
        parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.URI);
        parameterType.setName("URI");
        inputParameters.add(parameter);

        parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("GC_UserName");
        parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");
        inputParameters.add(parameter);

        parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("GC_ProjectName");
        parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");
        inputParameters.add(parameter);

        parameter = InputParameterType.Factory.newInstance();
        parameter.setParameterName("GC_WorkflowName");
        parameterType = parameter.addNewParameterType();
        parameterType.setType(DataType.STRING);
        parameterType.setName("String");
        inputParameters.add(parameter);

        //Creating output parameters
        OutputParameterType outputParameter = OutputParameterType.Factory.newInstance();
        outputParameter.setParameterName("opt_freq_input_gjf");
        ParameterType outputParaType = outputParameter.addNewParameterType();
        outputParaType.setType(DataType.URI);
        outputParaType.setName("URI");
        outputParameters.add(outputParameter);

        outputParameter = OutputParameterType.Factory.newInstance();
        outputParameter.setParameterName("charmm_miminized_crd");
        outputParaType = outputParameter.addNewParameterType();
        outputParaType.setType(DataType.URI);
        outputParaType.setName("URI");
        outputParameters.add(outputParameter);

        outputParameter = OutputParameterType.Factory.newInstance();
        outputParameter.setParameterName("step1_log");
        outputParaType = outputParameter.addNewParameterType();
        outputParaType.setType(DataType.URI);
        outputParaType.setName("URI");
        outputParameters.add(outputParameter);

        outputParameter = OutputParameterType.Factory.newInstance();
        outputParameter.setParameterName("molecule_dir_out_tgz");
        outputParaType = outputParameter.addNewParameterType();
        outputParaType.setType(DataType.URI);
        outputParaType.setName("URI");
        outputParameters.add(outputParameter);

        outputParameter = OutputParameterType.Factory.newInstance();
        outputParameter.setParameterName("gcvars");
        outputParaType = outputParameter.addNewParameterType();
        outputParaType.setType(DataType.URI);
        outputParaType.setName("URI");
        outputParameters.add(outputParameter);

        //Setting input and output parameters to serviceDescriptor
        serv.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[]{}));
        serv.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[]{}));

        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, context);
        ApplicationContext applicationContext = new ApplicationContext();
        applicationContext.setHostDescription(host);
        applicationContext.setApplicationDeploymentDescription(appDesc);
        jobExecutionContext.setApplicationContext(applicationContext);
View Full Code Here

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

        applicationContext.setApplicationDeploymentDescription(appDesc);

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

        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);

        jobExecutionContext = new JobExecutionContext(gFacConfiguration,serv.getType().getName());
        jobExecutionContext.setApplicationContext(applicationContext);

        // Add security context
        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext());
        /*
 
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.