/** * @see io.apiman.manager.api.core.IStorageQuery#getClientVersions(java.lang.String, java.lang.String) */ @Override public List<ClientVersionSummaryBean> getClientVersions(String organizationId, String clientId) throws StorageException { refresh(); return this.delegate.getClientVersions(organizationId, clientId); }
/** * @see io.apiman.manager.api.rest.contract.IOrganizationResource#listClientVersions(java.lang.String, java.lang.String) */ @Override public List<ClientVersionSummaryBean> listClientVersions(String organizationId, String clientId) throws ClientNotFoundException, NotAuthorizedException { // Try to get the client first - will throw a ClientNotFoundException if not found. getClient(organizationId, clientId); try { List<ClientVersionSummaryBean> clientVersions = query.getClientVersions(organizationId, clientId); boolean hasPermission = securityContext.hasPermission(PermissionType.clientView, organizationId); if (!hasPermission) { for (ClientVersionSummaryBean clientVersionSummaryBean : clientVersions) { clientVersionSummaryBean.setApiKey(null); } } return clientVersions; } catch (StorageException e) { throw new SystemErrorException(e); } }
/** * @see io.apiman.manager.api.rest.contract.IOrganizationResource#listClientVersions(java.lang.String, java.lang.String) */ @Override public List<ClientVersionSummaryBean> listClientVersions(String organizationId, String clientId) throws ClientNotFoundException, NotAuthorizedException { // Try to get the client first - will throw a ClientNotFoundException if not found. getClient(organizationId, clientId); try { List<ClientVersionSummaryBean> clientVersions = query.getClientVersions(organizationId, clientId); boolean hasPermission = securityContext.hasPermission(PermissionType.clientView, organizationId); if (!hasPermission) { for (ClientVersionSummaryBean clientVersionSummaryBean : clientVersions) { clientVersionSummaryBean.setApiKey(null); } } return clientVersions; } catch (StorageException e) { throw new SystemErrorException(e); } }