AiravataSystemException,
ProjectNotFoundException,
TException {
if (!validateString(projectId) || !validateString(projectId)){
logger.error("Project id cannot be empty...");
AiravataSystemException exception = new AiravataSystemException();
exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
exception.setMessage("Project id cannot be empty...");
throw exception;
}
try {
registry = RegistryFactory.getDefaultRegistry();
if (!registry.isExist(RegistryModelType.PROJECT, projectId)){
logger.error("Project does not exist in the system. Please provide a valid project ID...");
ProjectNotFoundException exception = new ProjectNotFoundException();
exception.setMessage("Project does not exist in the system. Please provide a valid project ID...");
throw exception;
}
registry.update(RegistryModelType.PROJECT, updatedProject, projectId);
} catch (RegistryException e) {
logger.error("Error while updating the project", e);
AiravataSystemException exception = new AiravataSystemException();
exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
exception.setMessage("Error while updating the project. More info : " + e.getMessage());
throw exception;
}
}