@Override
    public void updateApiDefinitionFromURL(String organizationId, String apiId, String version, NewApiDefinitionBean bean)
        throws ApiVersionNotFoundException, NotAuthorizedException, InvalidApiStatusException {
        securityContext.checkPermissions(PermissionType.apiEdit, organizationId);
        try {
            URL url = new URL(bean.getDefinitionUrl());
            InputStream is = url.openStream();
            apiService.setApiDefinition(organizationId, apiId, version, bean, is);
        } catch (IOException ioe) {
            throw new SystemErrorException(ioe);
        }
    }
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