@Override public boolean namespaceExists(String namespace) throws IOException { try { return namespaceQueryAdmin.exists(new NamespaceId(namespace)); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOException(e); } } }
/** * Validates if secret manager is loaded and the provided namespace exists. */ private void validate(String namespace) throws Exception { if (secretManager == null) { throw new RuntimeException("Secret manager is either not initialized or not loaded. "); } NamespaceId namespaceId = new NamespaceId(namespace); if (!namespaceQueryAdmin.exists(namespaceId)) { throw new NamespaceNotFoundException(namespaceId); } }
@Override public void ensureExists(NamespaceId namespaceId) throws NotFoundException { if (!NamespaceId.SYSTEM.equals(namespaceId)) { boolean exists = false; try { exists = namespaceQueryAdmin.exists(namespaceId); } catch (Exception e) { throw Throwables.propagate(e); } if (!exists) { throw new NamespaceNotFoundException(namespaceId); } } } }
private void checkNamespaceExists(String namespace) throws Exception { NamespaceId namespaceId = new NamespaceId(namespace); if (!namespaceQueryAdmin.exists(namespaceId)) { throw new NamespaceNotFoundException(namespaceId); } }
@Override public void ensureExists(NamespaceId namespaceId) throws NotFoundException { if (!NamespaceId.SYSTEM.equals(namespaceId)) { boolean exists = false; try { exists = namespaceQueryAdmin.exists(namespaceId); } catch (Exception e) { throw Throwables.propagate(e); } if (!exists) { throw new NamespaceNotFoundException(namespaceId); } } } }
/** * Throws an exception if the specified namespace is not the system namespace and does not exist */ private void ensureNamespaceExists(NamespaceId namespaceId) throws Exception { if (!NamespaceId.SYSTEM.equals(namespaceId)) { if (!namespaceQueryAdmin.exists(namespaceId)) { throw new NamespaceNotFoundException(namespaceId); } } } }
/** * Throws an exception if the specified namespace is not the system namespace and does not exist */ private void ensureNamespaceExists(NamespaceId namespaceId) throws Exception { if (!NamespaceId.SYSTEM.equals(namespaceId)) { if (!namespaceQueryAdmin.exists(namespaceId)) { throw new NamespaceNotFoundException(namespaceId); } } } }
/** * Throws an exception if the specified namespace is not the system namespace and does not exist */ private void ensureNamespaceExists(NamespaceId namespaceId) throws Exception { if (!NamespaceId.SYSTEM.equals(namespaceId)) { if (!namespaceQueryAdmin.exists(namespaceId)) { throw new NamespaceNotFoundException(namespaceId); } } }
private void checkNamespaceExists(String namespace) throws Exception { NamespaceId namespaceId = new NamespaceId(namespace); if (!namespaceQueryAdmin.exists(namespaceId)) { throw new NamespaceNotFoundException(namespaceId); } }
/** * Throws an exception if the specified namespace is not the system namespace and does not exist */ private void ensureNamespaceExists(NamespaceId namespaceId) throws Exception { if (!NamespaceId.SYSTEM.equals(namespaceId)) { if (!namespaceQueryAdmin.exists(namespaceId)) { throw new NamespaceNotFoundException(namespaceId); } } }