Package org.apache.aiaravata.application.catalog.data.resources

Examples of org.apache.aiaravata.application.catalog.data.resources.JobSubmissionInterfaceResource


      ComputeResourceResource computeHostResource)
      throws AppCatalogException {
    List<JobSubmissionInterface> jobSubmissionInterfaces = description.getJobSubmissionInterfaces();
    if (jobSubmissionInterfaces != null && !jobSubmissionInterfaces.isEmpty()) {
        for (JobSubmissionInterface jobSubmissionInterface : jobSubmissionInterfaces) {
          JobSubmissionInterfaceResource jsir = AppCatalogThriftConversion.getJobSubmissionInterface(jobSubmissionInterface);
        jsir.setComputeHostResource(computeHostResource);
        jsir.setComputeResourceId(computeHostResource.getResourceId());
        computeHostResource.save();
        }
    }
  }
View Full Code Here


    }

    @Override
    public void addJobSubmissionProtocol(String computeResourceId, JobSubmissionInterface jobSubmissionInterface) throws AppCatalogException {
        try {
          JobSubmissionInterfaceResource jsi = AppCatalogThriftConversion.getJobSubmissionInterface(jobSubmissionInterface);
          jsi.setComputeResourceId(computeResourceId);
          ComputeResourceResource computeResourceResource = new ComputeResourceResource();
          computeResourceResource=(ComputeResourceResource)computeResourceResource.get(computeResourceId);
          jsi.setComputeHostResource(computeResourceResource);
            jsi.save();
        }catch (Exception e){
            logger.error("Error while saving "+jobSubmissionInterface.getJobSubmissionProtocol().toString()+" Job Submission Protocol...", e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

    }

    @Override
    public void removeJobSubmissionInterface(String jobSubmissionInterfaceId) throws AppCatalogException {
        try {
            JobSubmissionInterfaceResource resource = new JobSubmissionInterfaceResource();
            resource.remove(jobSubmissionInterfaceId);
        }catch (Exception e){
            logger.error("Error while removing job submission interface..", e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

        }
    return dataMovementInterfaceResource;
  }
   
    private static Resource createJobSubmissionInterface(JobSubmissionInterface o) {
    JobSubmissionInterfaceResource jobSubmissionInterfaceResource = new JobSubmissionInterfaceResource();
        if (o != null) {
            jobSubmissionInterfaceResource.setJobSubmissionInterfaceId(o.getJobSubmissionInterfaceId());
            jobSubmissionInterfaceResource.setComputeResourceId(o.getComputeResourceId());
            jobSubmissionInterfaceResource.setComputeHostResource((ComputeResourceResource)createComputeResource(o.getComputeResource()));
            jobSubmissionInterfaceResource.setJobSubmissionProtocol(o.getJobSubmissionProtocol());
            jobSubmissionInterfaceResource.setPriorityOrder(o.getPriorityOrder());
        }
    return jobSubmissionInterfaceResource;
  }
View Full Code Here

TOP

Related Classes of org.apache.aiaravata.application.catalog.data.resources.JobSubmissionInterfaceResource

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.