@Transactional
    public void reorderClientPolicies(String organizationId, String clientId, String version,
        PolicyChainBean policyChain) throws OrganizationNotFoundException,
        ClientVersionNotFoundException, NotAuthorizedException {

        // Make sure the client version exists.
        ClientVersionBean cvb = getClientVersionInternal(organizationId, clientId, version);

        tryAction(() -> {
            List<Long> newOrder = new ArrayList<>(policyChain.getPolicies().size());
            for (PolicySummaryBean psb : policyChain.getPolicies()) {
                newOrder.add(psb.getId());
            }
            storage.reorderPolicies(PolicyType.Client, organizationId, clientId, version, newOrder);
            storage.createAuditEntry(AuditUtils.policiesReordered(cvb, PolicyType.Client, securityContext));

            cvb.setModifiedBy(securityContext.getCurrentUser());
            cvb.setModifiedOn(new Date());
            storage.updateClientVersion(cvb);
        });
    }
Gets the client version internally
which lets callers dictate whether the user has clientView permission for the org.
@param organizationId the organizationId
@param clientId the clientId
@param version the version
@return the client version
@throws ClientVersionNotFoundException if client not found
manager/api/rest-impl/src/main/java/io/apiman/manager/api/service/ClientAppService.java