Examples of GovernanceArtifact


Examples of org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

                return o1.compareToIgnoreCase(o2);
            }
        });
        List<Wsdl> wsdls = new ArrayList<Wsdl>();
        for (String wsdlPath : wsdlPaths) {
            GovernanceArtifact artifact =
                    GovernanceUtils.retrieveGovernanceArtifactByPath(registry, wsdlPath);
            wsdls.add((Wsdl) artifact);
        }
        return wsdls.toArray(new Wsdl[wsdls.size()]);
    }
View Full Code Here

Examples of org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

     *
     * @return the service artifact.
     * @throws GovernanceException if the operation failed.
     */
    public Service getService(String serviceId) throws GovernanceException {
        GovernanceArtifact artifact =
                GovernanceUtils.retrieveGovernanceArtifactById(registry, serviceId);
        if (artifact != null && !(artifact instanceof Service)) {
            String msg = "The artifact request is not a " + type + ". id: " + serviceId + ".";
            log.error(msg);
            throw new GovernanceException(msg);
View Full Code Here

Examples of org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

                return (l1 > l2) ? -1 : 1;
            }
        });
        List<Service> services = new ArrayList<Service>();
        for (String servicePath : servicePaths) {
            GovernanceArtifact artifact =
                    GovernanceUtils.retrieveGovernanceArtifactByPath(registry, servicePath);
            services.add((Service) artifact);
        }
        return services.toArray(new Service[services.size()]);
    }
View Full Code Here

Examples of org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

        try {
            Association[] associations =
                    registry.getAssociations(path, GovernanceConstants.DEPENDS);
            for (Association association : associations) {
                String destinationPath = association.getDestinationPath();
                GovernanceArtifact governanceArtifact =
                        GovernanceUtils.retrieveGovernanceArtifactByPath(registry, destinationPath);
                if (governanceArtifact instanceof Schema) {
                    schemas.add((Schema) governanceArtifact);
                }
            }
View Full Code Here

Examples of org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

     *
     * @return the schema artifact.
     * @throws GovernanceException if the operation failed.
     */
    public Schema getSchema(String schemaId) throws GovernanceException {
        GovernanceArtifact artifact =
                GovernanceUtils.retrieveGovernanceArtifactById(registry, schemaId);
        if (artifact != null && !(artifact instanceof Schema)) {
            String msg = "The artifact request is not a Schema. id: " + schemaId + ".";
            log.error(msg);
            throw new GovernanceException(msg);
View Full Code Here

Examples of org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

        try {
            Association[] associations =
                    registry.getAssociations(path, GovernanceConstants.DEPENDS);
            for (Association association : associations) {
                String destinationPath = association.getDestinationPath();
                GovernanceArtifact governanceArtifact =
                        GovernanceUtils.retrieveGovernanceArtifactByPath(registry, destinationPath);
                if (governanceArtifact instanceof Endpoint) {
                    endpoints.add((Endpoint) governanceArtifact);
                }
            }
View Full Code Here

Examples of org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

                return o1.compareToIgnoreCase(o2);
            }
        });
        List<Schema> schemas = new ArrayList<Schema>();
        for (String schemaPath : schemaPaths) {
            GovernanceArtifact artifact =
                    GovernanceUtils.retrieveGovernanceArtifactByPath(registry, schemaPath);
            schemas.add((Schema) artifact);
        }
        return schemas.toArray(new Schema[schemas.size()]);
    }
View Full Code Here

Examples of org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

                    currentPath = CommonUtil.computeServicePathWithVersion(currentPath, "1.0.0-SNAPSHOT");
                }else{
                    currentPath = CommonUtil.computeServicePathWithVersion(currentPath, version);
                }
                if (registry.resourceExists(currentPath)) {
                    GovernanceArtifact oldArtifact =
                            GovernanceUtils.retrieveGovernanceArtifactByPath(registry, currentPath);
                    if (!(oldArtifact instanceof Service)) {
                        String msg = "The updated path is occupied by a non-service. path: " +
                                currentPath + ".";
                        log.error(msg);
                        throw new Exception(msg);
                    }
                    // id is used to differentiate the service
                    String id = oldArtifact.getId();
                    service.setId(id);
                    serviceManager.updateService(service);
                    Resource serviceResource = registry.get(service.getPath());
                    String oldLifeCycleName = serviceResource.getProperty("registry.LC.name");
                    if (lifeCycleName == null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.