Package org.apache.stratos.cloud.controller.pojo

Examples of org.apache.stratos.cloud.controller.pojo.DataPublisherConfig


            OMElement childElement =
                    AxiomXpathParserUtil.getFirstChildElement(element,
                            CloudControllerConstants.BAM_SERVER_ELEMENT);
            OMElement elt;

            DataPublisherConfig config = new DataPublisherConfig();
            dataHolder.setDataPubConfig(config);
           
            if (childElement != null) {
                // set bam user name
                elt =
                        AxiomXpathParserUtil.getFirstChildElement(childElement,
                                CloudControllerConstants.BAM_SERVER_ADMIN_USERNAME_ELEMENT);
                if (elt != null) {
                    config.setBamUsername(elt.getText());
                }
                // set bam password
                elt =
                        AxiomXpathParserUtil.getFirstChildElement(childElement,
                                CloudControllerConstants.BAM_SERVER_ADMIN_PASSWORD_ELEMENT);
                if (elt != null) {
                    String password = AxiomXpathParserUtil.resolveSecret(rootElt, elt);
                    if (password == null) {
                        AxiomXpathParserUtil.plainTextWarn(CloudControllerConstants.BAM_SERVER_ADMIN_PASSWORD_ELEMENT);
                        password = elt.getText();
                    }

                    if (password != null) {
                        config.setBamPassword(password);
                    }
                }
            }

            // set cron
            childElement = AxiomXpathParserUtil.getFirstChildElement(element, CloudControllerConstants.CRON_ELEMENT);
            if (childElement != null) {
                config.setDataPublisherCron(childElement.getText());
            }

            // set cassandra info
            childElement = AxiomXpathParserUtil.getFirstChildElement(element, CloudControllerConstants.CASSANDRA_INFO_ELEMENT);

            if (childElement != null) {
                // set connection url
                elt = AxiomXpathParserUtil.getFirstChildElement(childElement, CloudControllerConstants.CONNECTION_URL_ELEMENT);
                if (elt != null) {
                    config.setCassandraConnUrl(elt.getText());
                }

                // set user name
                elt = AxiomXpathParserUtil.getFirstChildElement(childElement, CloudControllerConstants.USER_NAME_ELEMENT);
                if (elt != null) {
                    config.setCassandraUser(elt.getText());
                }
                // set password
                elt = AxiomXpathParserUtil.getFirstChildElement(childElement, CloudControllerConstants.PASSWORD_ELEMENT);
                if (elt != null) {
                    String password = AxiomXpathParserUtil.resolveSecret(rootElt, elt);
                    if (password == null) {
                        AxiomXpathParserUtil.plainTextWarn(CloudControllerConstants.PASSWORD_ELEMENT);
                        password = elt.getText();
                    }

                    if (password != null) {
                        config.setCassandraPassword(password);
                    }
                }
            }

        }
View Full Code Here

TOP

Related Classes of org.apache.stratos.cloud.controller.pojo.DataPublisherConfig

Copyright © 2018 www.massapicom. 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.