Examples of RepositoryNotFoundException


Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

   */
  @SuppressWarnings("unchecked")
  public R build() throws IOException {
    R repo = (R) new FileRepository(setup());
    if (isMustExist() && !repo.getObjectDatabase().exists())
      throw new RepositoryNotFoundException(getGitDir());
    return repo;
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

   */
  @SuppressWarnings("unchecked")
  public R build() throws IOException {
    R repo = (R) new FileRepository(setup());
    if (isMustExist() && !repo.getObjectDatabase().exists())
      throw new RepositoryNotFoundException(getGitDir());
    return repo;
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

  }

  public Repository openRepository(String name)
      throws RepositoryNotFoundException {
    if (isUnreasonableName(name)) {
      throw new RepositoryNotFoundException("Invalid name: " + name);
    }

    try {
      final FileKey loc = FileKey.lenient(gitDirOf(name), FS.DETECTED);
      return RepositoryCache.open(loc);
    } catch (IOException e1) {
      final RepositoryNotFoundException e2;
      e2 = new RepositoryNotFoundException("Cannot open repository " + name);
      e2.initCause(e1);
      throw e2;
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

  }

  public Repository createRepository(String name)
      throws RepositoryNotFoundException {
    if (isUnreasonableName(name)) {
      throw new RepositoryNotFoundException("Invalid name: " + name);
    }

    try {
      File dir = FileKey.resolve(gitDirOf(name), FS.DETECTED);
      FileKey loc;
      if (dir != null) {
        // Already exists on disk, use the repository we found.
        //
        loc = FileKey.exact(dir, FS.DETECTED);
      } else {
        // It doesn't exist under any of the standard permutations
        // of the repository name, so prefer the standard bare name.
        //
        if (!name.endsWith(Constants.DOT_GIT_EXT)) {
          name = name + Constants.DOT_GIT_EXT;
        }
        loc = FileKey.exact(new File(basePath, name), FS.DETECTED);
      }
      return RepositoryCache.open(loc, false);
    } catch (IOException e1) {
      final RepositoryNotFoundException e2;
      e2 = new RepositoryNotFoundException("Cannot open repository " + name);
      e2.initCause(e1);
      throw e2;
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.RepositoryNotFoundException

                throws RepositoryNotFoundException,
                ServiceNotAuthorizedException, ServiceNotEnabledException,
                ServiceMayNotContinueException {
            final JGitFileSystem fs = fileSystems.get( name );
            if ( fs == null ) {
                throw new RepositoryNotFoundException( name );
            }
            return fs.gitRepo().getRepository();
        }
View Full Code Here

Examples of org.lilyproject.repository.model.api.RepositoryNotFoundException

        disallowDefaultRepository(repositoryName);
        RepositoryDefinition repoDef = new RepositoryDefinition(repositoryName, RepositoryLifecycleState.DELETE_REQUESTED);
        try {
            storeRepository(repoDef);
        } catch (KeeperException.NoNodeException e) {
            throw new RepositoryNotFoundException("Can't delete-request repository, a repository with this name doesn't exist: "
                    + repoDef.getName());
        } catch (KeeperException e) {
            throw new RepositoryModelException(e);
        }
    }
View Full Code Here

Examples of org.lilyproject.repository.model.api.RepositoryNotFoundException

            throws InterruptedException, RepositoryModelException, RepositoryNotFoundException {
        disallowDefaultRepository(repositoryName);
        try {
            zk.delete(REPOSITORY_COLLECTION_PATH + "/" + repositoryName, -1);
        } catch (KeeperException.NoNodeException e) {
            throw new RepositoryNotFoundException("Can't delete repository, a repository with this name doesn't exist: "
                    + repositoryName);
        } catch (KeeperException e) {
            throw new RepositoryModelException("Error deleting repository.", e);
        }
    }
View Full Code Here

Examples of org.lilyproject.repository.model.api.RepositoryNotFoundException

            throws InterruptedException, RepositoryModelException,RepositoryNotFoundException {
        disallowDefaultRepository(repoDef.getName());
        try {
            storeRepository(repoDef);
        } catch (KeeperException.NoNodeException e) {
            throw new RepositoryNotFoundException("Can't update repository, a repository with this name doesn't exist: "
                    + repoDef.getName());
        } catch (KeeperException e) {
            throw new RepositoryModelException(e);
        }
    }
View Full Code Here

Examples of org.lilyproject.repository.model.api.RepositoryNotFoundException

    public RepositoryDefinition getRepository(String repositoryName)
            throws InterruptedException, RepositoryModelException, RepositoryNotFoundException {
        try {
            return loadRepository(repositoryName, false);
        } catch (KeeperException.NoNodeException e) {
            throw new RepositoryNotFoundException("No repository named " + repositoryName, e);
        } catch (KeeperException e) {
            throw new RepositoryModelException("Error loading repository " + repositoryName, e);
        }
    }
View Full Code Here

Examples of org.lilyproject.repository.model.api.RepositoryNotFoundException

    @Override
    public boolean repositoryActive(String repositoryName) throws RepositoryNotFoundException {
        RepositoryDefinition repoDef = repos.get(repositoryName);
        if (repoDef == null) {
            throw new RepositoryNotFoundException("No repository named " + repositoryName);
        }
        return repoDef.getLifecycleState() == RepositoryLifecycleState.ACTIVE;
    }
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.