use of org.apache.airavata.registry.api.exception.RegistryServiceException in project airavata by apache.
the class RegistryServerHandler method getApplicationDeployment.
/**
* Fetch a Application Deployment.
*
* @param appDeploymentId The identifier for the requested application module
* @return applicationDeployment
* Returns a application Deployment Object.
*/
@Override
public ApplicationDeploymentDescription getApplicationDeployment(String appDeploymentId) throws RegistryServiceException, TException {
try {
appCatalog = RegistryFactory.getAppCatalog();
ApplicationDeploymentDescription deployement = appCatalog.getApplicationDeployment().getApplicationDeployement(appDeploymentId);
logger.debug("Airavata registered application deployment for deployment id : " + appDeploymentId);
return deployement;
} catch (AppCatalogException e) {
logger.error(appDeploymentId, "Error while retrieving application deployment...", e);
RegistryServiceException exception = new RegistryServiceException();
exception.setMessage("Error while retrieving application deployment. More info : " + e.getMessage());
throw exception;
}
}
use of org.apache.airavata.registry.api.exception.RegistryServiceException in project airavata by apache.
the class RegistryServerHandler method getComputeResource.
/**
* Fetch the given Compute Resource.
*
* @param computeResourceId The identifier for the requested compute resource
* @return computeResourceDescription
* Compute Resource Object created from the datamodel..
*/
@Override
public ComputeResourceDescription getComputeResource(String computeResourceId) throws RegistryServiceException, TException {
try {
appCatalog = RegistryFactory.getAppCatalog();
ComputeResourceDescription computeResource = appCatalog.getComputeResource().getComputeResource(computeResourceId);
logger.debug("Airavata retrieved compute resource with compute resource Id : " + computeResourceId);
return computeResource;
} catch (AppCatalogException e) {
logger.error(computeResourceId, "Error while retrieving compute resource...", e);
RegistryServiceException exception = new RegistryServiceException();
exception.setMessage("Error while retrieving compute resource. More info : " + e.getMessage());
throw exception;
}
}
use of org.apache.airavata.registry.api.exception.RegistryServiceException in project airavata by apache.
the class RegistryServerHandler method updateLocalSubmissionDetails.
/**
* Update the given Local Job Submission details
*
* @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be updated.
* @param localSubmission The LOCALSubmission object to be updated.
* @return status
* Returns a success/failure of the deletion.
*/
@Override
public boolean updateLocalSubmissionDetails(String jobSubmissionInterfaceId, LOCALSubmission localSubmission) throws RegistryServiceException, TException {
try {
LocalSubmissionResource submission = AppCatalogThriftConversion.getLocalJobSubmission(localSubmission);
submission.setJobSubmissionInterfaceId(jobSubmissionInterfaceId);
submission.save();
logger.debug("Airavata updated local job submission for job submission interface id: " + jobSubmissionInterfaceId);
return true;
} catch (Exception e) {
logger.error(jobSubmissionInterfaceId, "Error while adding job submission interface to resource compute resource...", e);
RegistryServiceException exception = new RegistryServiceException();
exception.setMessage("Error while adding job submission interface to resource compute resource. More info : " + e.getMessage());
throw exception;
}
}
use of org.apache.airavata.registry.api.exception.RegistryServiceException in project airavata by apache.
the class RegistryServerHandler method registerStorageResource.
/**
* Register a Storage Resource.
*
* @param storageResourceDescription Storge Resource Object created from the datamodel.
* @return storageResourceId
* Returns a server-side generated airavata storage resource globally unique identifier.
*/
@Override
public String registerStorageResource(StorageResourceDescription storageResourceDescription) throws RegistryServiceException, TException {
try {
appCatalog = RegistryFactory.getAppCatalog();
String storageResource = appCatalog.getStorageResource().addStorageResource(storageResourceDescription);
logger.debug("Airavata registered storage resource with storage resource Id : " + storageResource);
return storageResource;
} catch (AppCatalogException e) {
logger.error("Error while saving storage resource...", e);
RegistryServiceException exception = new RegistryServiceException();
exception.setMessage("Error while saving storage resource. More info : " + e.getMessage());
throw exception;
}
}
use of org.apache.airavata.registry.api.exception.RegistryServiceException in project airavata by apache.
the class RegistryServerHandler method getApplicationInterface.
/**
* Fetch an Application Interface.
*
* @param appInterfaceId The identifier for the requested application interface.
* @return applicationInterface
* Returns an application Interface Object.
*/
@Override
public ApplicationInterfaceDescription getApplicationInterface(String appInterfaceId) throws RegistryServiceException, TException {
try {
appCatalog = RegistryFactory.getAppCatalog();
ApplicationInterfaceDescription interfaceDescription = appCatalog.getApplicationInterface().getApplicationInterface(appInterfaceId);
logger.debug("Airavata retrieved application interface with interface id : " + appInterfaceId);
return interfaceDescription;
} catch (AppCatalogException e) {
logger.error(appInterfaceId, "Error while retrieving application interface...", e);
RegistryServiceException exception = new RegistryServiceException();
exception.setMessage("Error while retrieving application interface. More info : " + e.getMessage());
throw exception;
}
}
Aggregations