/** * @see io.apiman.manager.api.core.IStorage#getClient(java.lang.String, java.lang.String) */ @Override public ClientBean getClient(String organizationId, String id) throws StorageException { return this.delegate.getClient(organizationId, id); }
try { storage.beginTx(); ClientBean client = storage.getClient(organizationId, clientId); if (client == null) { throw ExceptionFactory.clientNotFoundException(clientId);
try { storage.beginTx(); ClientBean client = storage.getClient(organizationId, clientId); if (client == null) { throw ExceptionFactory.clientNotFoundException(clientId);
ClientBean client = storage.getClient(organizationId, clientId); if (client == null) { throw ExceptionFactory.clientNotFoundException(clientId);
ClientBean client = storage.getClient(organizationId, clientId); if (client == null) { throw ExceptionFactory.clientNotFoundException(clientId);
/** * @see io.apiman.manager.api.rest.contract.IOrganizationResource#getClient(java.lang.String, java.lang.String) */ @Override public ClientBean getClient(String organizationId, String clientId) throws ClientNotFoundException, NotAuthorizedException { try { storage.beginTx(); ClientBean clientBean = storage.getClient(organizationId, clientId); if (clientBean == null) { throw ExceptionFactory.clientNotFoundException(clientId); } storage.commitTx(); log.debug(String.format("Got client %s: %s", clientBean.getName(), clientBean)); //$NON-NLS-1$ return clientBean; } catch (AbstractRestException e) { storage.rollbackTx(); throw e; } catch (Exception e) { storage.rollbackTx(); throw new SystemErrorException(e); } }
/** * @see io.apiman.manager.api.rest.contract.IOrganizationResource#getClient(java.lang.String, java.lang.String) */ @Override public ClientBean getClient(String organizationId, String clientId) throws ClientNotFoundException, NotAuthorizedException { try { storage.beginTx(); ClientBean clientBean = storage.getClient(organizationId, clientId); if (clientBean == null) { throw ExceptionFactory.clientNotFoundException(clientId); } storage.commitTx(); log.debug(String.format("Got client %s: %s", clientBean.getName(), clientBean)); //$NON-NLS-1$ return clientBean; } catch (AbstractRestException e) { storage.rollbackTx(); throw e; } catch (Exception e) { storage.rollbackTx(); throw new SystemErrorException(e); } }
try { storage.beginTx(); ClientBean clientForUpdate = storage.getClient(organizationId, clientId); if (clientForUpdate == null) { throw ExceptionFactory.clientNotFoundException(clientId);
try { storage.beginTx(); ClientBean clientForUpdate = storage.getClient(organizationId, clientId); if (clientForUpdate == null) { throw ExceptionFactory.clientNotFoundException(clientId);
if (storage.getClient(org.getId(), newClient.getId()) != null) { throw ExceptionFactory.organizationAlreadyExistsException(bean.getName());
if (storage.getClient(org.getId(), newClient.getId()) != null) { throw ExceptionFactory.organizationAlreadyExistsException(bean.getName());