Examples of ProjectNotFoundException


Examples of edu.ubb.warp.exception.ProjectNotFoundException

      statement.setInt(1, projectID);
      ResultSet result = statement.executeQuery();
      if (result.next()) {
        project = getProjectFromResult(result);
      } else {
        throw new ProjectNotFoundException();
      }
    } catch (SQLException e) {
      throw new DAOException();
    }
    return project;
View Full Code Here

Examples of edu.ubb.warp.exception.ProjectNotFoundException

      statement.setString(1, projectName);
      ResultSet result = statement.executeQuery();
      if (result.next()) {
        project = getProjectFromResult(result);
      } else {
        throw new ProjectNotFoundException();
      }
    } catch (SQLException e) {
      throw new DAOException();
    }
    return project;
View Full Code Here

Examples of org.apache.airavata.model.error.ProjectNotFoundException

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

    }
View Full Code Here

Examples of org.apache.airavata.model.error.ProjectNotFoundException

                                                       TException {
        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;
            }
            return (Project)registry.get(RegistryModelType.PROJECT, projectId);
        } catch (RegistryException e) {
            logger.error("Error while updating the project", e);
            ProjectNotFoundException exception = new ProjectNotFoundException();
            exception.setMessage("Error while updating the project. More info : " + e.getMessage());
            throw exception;
        }
    }
View Full Code Here

Examples of org.apache.airavata.model.error.ProjectNotFoundException

        }
        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;
            }
            List<Experiment> experiments = new ArrayList<Experiment>();
            List<Object> list = registry.get(RegistryModelType.EXPERIMENT, Constants.FieldConstants.ExperimentConstants.PROJECT_ID, projectId);
            if (list != null && !list.isEmpty()) {
                for (Object o : list) {
                    experiments.add((Experiment) o);
                }
            }
            return experiments;
        } catch (Exception e) {
            logger.error("Error while retrieving the experiments", e);
            AiravataSystemException exception = new AiravataSystemException();
            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
            exception.setMessage("Error while retrieving the experiments. More info : " + e.getMessage());
            throw exception;
        }
    }
View Full Code Here

Examples of org.hudsonci.service.ProjectNotFoundException


    public AbstractProject<?, ?> getProject(final UUID id) {
        AbstractProject<?, ?> project = findProject(id);
        if (project == null) {
            throw new ProjectNotFoundException(String.format("No project with UUID '%s' found.", id));
        }
        return project;
    }
View Full Code Here

Examples of org.hudsonci.service.ProjectNotFoundException

    }

    public AbstractProject<?, ?> getProject(final String projectName) {
        AbstractProject<?, ?> project = findProject(projectName);
        if (project == null) {
            throw new ProjectNotFoundException(String.format("Project %s not found.", projectName));
        }
        return project;
    }
View Full Code Here

Examples of org.hudsonci.service.ProjectNotFoundException

    }

    public AbstractProject<?, ?> getProjectByFullName(final String projectName) {
        AbstractProject<?, ?> p = findProjectByFullName(projectName);
        if (p == null) {
            throw new ProjectNotFoundException(String.format("Project %s not found.", projectName));
        }
        return p;
    }
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.