/** * Finds all the service path and used to list services * * @return all the service paths * @throws GovernanceException if the operation failed */ public String[] getAllServicePaths() throws GovernanceException { return GovernanceUtils.getResultPaths(registry, GovernanceConstants.SERVICE_MEDIA_TYPE); }
/** * Finds all policy artifacts on the registry. * * @return all policy artifacts on the registry. * @throws GovernanceException if the operation failed. */ public Policy[] getAllPolicies() throws GovernanceException { List<String> policyPaths = Arrays.asList(GovernanceUtils.getResultPaths(registry, GovernanceConstants.POLICY_XML_MEDIA_TYPE)); Collections.sort(policyPaths, new Comparator<String>() { public int compare(String o1, String o2) { return RegistryUtils.getResourceName(o1).compareToIgnoreCase( RegistryUtils.getResourceName(o2)); } }); List<Policy> policies = new ArrayList<Policy>(); for (String policyPath : policyPaths) { GovernanceArtifact artifact = GovernanceUtils.retrieveGovernanceArtifactByPath(registry, policyPath); policies.add((Policy) artifact); } return policies.toArray(new Policy[policies.size()]); } }
Arrays.asList(GovernanceUtils.getResultPaths(registry, GovernanceConstants.ENDPOINT_MEDIA_TYPE)); Collections.sort(endpointPaths, new Comparator<String>() {
Arrays.asList(GovernanceUtils.getResultPaths(registry, GovernanceConstants.SCHEMA_MEDIA_TYPE)); Collections.sort(schemaPaths, new Comparator<String>() {
Arrays.asList(GovernanceUtils.getResultPaths(registry, GovernanceConstants.WSDL_MEDIA_TYPE)); Collections.sort(wsdlPaths, new Comparator<String>() {
@Paginate("getPaginatedGovernanceArtifacts") public List<String> getPaginatedGovernanceArtifacts() throws GovernanceException { List<String> paths = Arrays.asList(GovernanceUtils.getResultPaths(registry, mediaType)); Collections.sort(paths, new Comparator<String>() {