Examples of HavaloUUID


Examples of com.kolich.havalo.entities.types.HavaloUUID

    private final HavaloUUID adminUUID_;

    @Injectable
    public RepositoryApi(final RepositoryManagerComponent component) {
        super(component.getRepositoryManager());
        adminUUID_ = new HavaloUUID(getHavaloAdminUUID());
    }
View Full Code Here

Examples of com.kolich.havalo.entities.types.HavaloUUID

        if(!userKp.isAdmin()) {
            throw new RepositoryForbiddenException("Authenticated " +
                "user does not have permission to delete repositories: " +
                "(userId=" + userKp.getKey() + ", repoId=" + key + ")");
        }
        final HavaloUUID toDelete = new HavaloUUID(key.getDecodedKey());
        // Admin users cannot delete the root "admin" repository.
        if(adminUUID_.equals(toDelete)) {
            throw new RepositoryForbiddenException("Authenticated " +
                "admin user attempted to delete admin repository: " +
                toDelete.getId());
        }
        // Attempt to delete the repository, its meta data, and all
        // objects inside of it.
        deleteRepository(toDelete);
        return new StatusCodeOnlyCuracaoEntity(SC_NO_CONTENT);
View Full Code Here

Examples of com.kolich.havalo.entities.types.HavaloUUID

                throw new BootstrapException(msg);
            }
            logger__.debug("Admin API account initialized (uuid=" + adminUUID +
                ", secret=" + abbreviate(adminSecret, 8) + ")");
            // Create a new keypair for the default ADMIN level user.
            final KeyPair adminKeyPair = new KeyPair(new HavaloUUID(adminUUID),
                adminSecret, Arrays.asList(new UserRole[]{ADMIN}));
            // Actually attempt to create a new Repository for the Admin user.
            // This should work, if not, bail the whole app.
            repoManager.createRepository(adminKeyPair.getKey(), adminKeyPair);
            return repoManager;
View Full Code Here

Examples of com.kolich.havalo.entities.types.HavaloUUID

  }
 
  public KeyPair loadKeyPairById(final UUID id) {
    try {
      final KeyPair kp = repoManager_.getRepository(
        new HavaloUUID(id)).getKeyPair();
      if(kp.getSecret() == null) {
        throw new NullorEmptySecretException("Oops, KeyPair secret " +
          "for user (" + id + ") was null or unknown.");
      }
      return kp;
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.