@Override
    public Response getApiRegistryJSON(String organizationId, String clientId, String version, String download)
            throws ClientNotFoundException, NotAuthorizedException {
        securityContext.checkPermissions(PermissionType.clientView, organizationId);
        if (BooleanUtils.toBoolean(download)) { //$NON-NLS-1$
            String path = String.format("%s/%s/%s", organizationId, clientId, version); //$NON-NLS-1$
            DownloadBean dbean = tryAction(() ->  downloadManager.createDownload(DownloadType.apiRegistryJson, path));
            return Response.ok(dbean, MediaType.APPLICATION_JSON).build();
        } else {
            return getApiRegistryJSONInternal(organizationId, clientId, version);
        }
    }
REST layer for Organization

TODO(msavy): split this into multiple interfaces & impls (ApiResource, ClientAppResource, etc).

@author eric.wittmann@redhat.com
@author marc@blackparrotlabs.io
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/OrganizationResourceImpl.java