Package org.lilyproject.repository.model.api

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


        }
    }

    private void disallowDefaultRepository(String repositoryName) throws RepositoryModelException {
        if (DEFAULT_REPOSITORY.getName().equals(repositoryName)) {
            throw new RepositoryModelException("This operation is not allowed on the default repository.");
        }
    }
View Full Code Here


            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

            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

            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

    @Override
    public Set<RepositoryDefinition> getRepositories() throws RepositoryModelException, InterruptedException {
        try {
            return new HashSet<RepositoryDefinition>(loadRepositories(false).values());
        } catch (KeeperException e) {
            throw new RepositoryModelException("Error loading repositories.", e);
        }
    }
View Full Code Here

        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

            zk.create(REPOSITORY_COLLECTION_PATH + "/" + repositoryName, repoBytes, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
        } catch (KeeperException.NodeExistsException e) {
            throw new RepositoryExistsException("Can't create repository, a repository with this name already exists: "
                    + repositoryName);
        } catch (KeeperException e) {
            throw new RepositoryModelException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.model.api.RepositoryModelException

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.