Examples of RegistryConfig


Examples of org.wso2.carbon.application.deployer.config.RegistryConfig

    public static RegistryConfig populateRegistryConfig(OMElement resourcesElement) {
        if (resourcesElement == null) {
            return null;
        }

        RegistryConfig regConfig = new RegistryConfig();

        // read Item elements under Resources
        Iterator itemItr = resourcesElement.getChildrenWithLocalName(RegistryConfig.ITEM);
        while (itemItr.hasNext()) {
            OMElement itemElement = (OMElement) itemItr.next();
            regConfig.addResource(readChildText(itemElement, RegistryConfig.PATH),
                    readChildText(itemElement, RegistryConfig.FILE),
                    readChildText(itemElement, RegistryConfig.REGISTRY_TYPE));
        }

        // read Collection elements under Resources
        Iterator collectionItr = resourcesElement.getChildrenWithLocalName(RegistryConfig.COLLECTION);
        while (collectionItr.hasNext()) {
            OMElement collElement = (OMElement) collectionItr.next();
            regConfig.addCollection(readChildText(collElement, RegistryConfig.PATH),
                    readChildText(collElement, RegistryConfig.DIRECTORY),
                    readChildText(collElement, RegistryConfig.REGISTRY_TYPE));
        }

        // read Association elements under Resources
        Iterator associationItr = resourcesElement.getChildrenWithLocalName(RegistryConfig.ASSOCIATION);
        while (associationItr.hasNext()) {
            OMElement assoElement = (OMElement) associationItr.next();
            regConfig.addAssociation(readChildText(assoElement, RegistryConfig.SOURCE_PATH),
                    readChildText(assoElement, RegistryConfig.TARGET_PATH),
                    readChildText(assoElement, RegistryConfig.TYPE),
                    readChildText(assoElement, RegistryConfig.REGISTRY_TYPE));
        }
        return regConfig;
View Full Code Here

Examples of org.wso2.carbon.application.deployer.config.RegistryConfig

    private void undeployRegistryArtifacts(CarbonAppPersistenceManager capm,
                                           List<Artifact> artifacts, String parentAppName) {
        for (Artifact artifact : artifacts) {
            if (RegistryResourceDeployer.REGISTRY_RESOURCE_TYPE.equals(artifact.getType())) {
                try {
                    RegistryConfig regConfig = artifact.getRegConfig();
                    if (regConfig == null) {
                        regConfig = capm.loadRegistryConfig(AppDeployerConstants.APPLICATIONS +
                                parentAppName + AppDeployerConstants.APP_DEPENDENCIES +
                                artifact.getName());
                    }
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.