Package org.apache.cocoon.components.source.helpers

Examples of org.apache.cocoon.components.source.helpers.SourceCredential


        credentialMap = new HashMap();

        Configuration[] xmldbConfigs = conf.getChildren("driver");

        for (int i = 0; i < xmldbConfigs.length; i++) {
            SourceCredential credential = new SourceCredential(null, null);

            driverMap.put(xmldbConfigs[i].getAttribute("type"),
                          xmldbConfigs[i].getAttribute("class"));

            credential.setPrincipal(xmldbConfigs[i].getAttribute("user", null));
            credential.setPassword(xmldbConfigs[i].getAttribute("password", null));
            credentialMap.put(xmldbConfigs[i].getAttribute("type"), credential);
        }
    }
View Full Code Here


        Configuration[] drivers = conf.getChildren("driver");
        for (int i = 0; i < drivers.length; i++) {
            String type = drivers[i].getAttribute("type");
            String driver = drivers[i].getAttribute("class");

            SourceCredential credential = new SourceCredential(null, null);
            credential.setPrincipal(drivers[i].getAttribute("user", null));
            credential.setPassword(drivers[i].getAttribute("password", null));
            credentialMap.put(type, credential);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Initializing XML:DB connection, using driver " + driver);
            }
View Full Code Here

            throw new MalformedURLException("Mispelled XML:DB URL. " +
                                            "The syntax is \"xmldb:databasetype://host/collection/resource\"");
        }

        String type = location.substring(start, end);
        SourceCredential credential = (SourceCredential)credentialMap.get(type);

        return new XMLDBSource(this.getLogger(),
                               credential, location,
                               this.m_manager,
                               this.context);
View Full Code Here

        Configuration[] drivers = conf.getChildren("driver");
        for (int i = 0; i < drivers.length; i++) {
            String type = drivers[i].getAttribute("type");
            String driver = drivers[i].getAttribute("class");

            SourceCredential credential = new SourceCredential(null, null);
            credential.setPrincipal(drivers[i].getAttribute("user", null));
            credential.setPassword(drivers[i].getAttribute("password", null));
            credentialMap.put(type, credential);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Initializing XML:DB connection, using driver " + driver);
            }
View Full Code Here

            throw new MalformedURLException("Mispelled XML:DB URL. " +
                                            "The syntax is \"xmldb:databasetype://host/collection/resource\"");
        }

        String type = location.substring(start, end);
        SourceCredential credential = (SourceCredential)credentialMap.get(type);

        return new XMLDBSource(this.getLogger(),
                               credential, location,
                               this.m_manager);
    }
View Full Code Here

        String branch = queryParameters.getParameter("cocoon-source-branch",
                            null);

        getLogger().debug("Used prinical '"+principal+"' for source");

        SourceCredential credential;

        if (password!=null) {
            credential = new SourceCredential(principal, password);
        } else {
            credential = new SourceCredential(principal);
        }

        if (path.length()==0) {
            path = "/";
        }
View Full Code Here

        for (int i = 0; i < xmldbConfigs.length; i++) {
            String type = xmldbConfigs[i].getAttribute("type");
            String driver = xmldbConfigs[i].getAttribute("class");

            SourceCredential credential = new SourceCredential(null, null);
            credential.setPrincipal(xmldbConfigs[i].getAttribute("user", null));
            credential.setPassword(xmldbConfigs[i].getAttribute("password", null));
            credentialMap.put(type, credential);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Initializing XML:DB connection, using driver " + driver);
            }
View Full Code Here

            throw new MalformedURLException("Mispelled XML:DB URL. " +
                                            "The syntax is \"xmldb:databasetype://host/collection/resource\"");
        }

        String type = location.substring(start, end);
        SourceCredential credential = (SourceCredential)credentialMap.get(type);

        return new XMLDBSource(this.getLogger(),
                               credential, location,
                               this.m_manager);
    }
View Full Code Here

        for (int i = 0; i < xmldbConfigs.length; i++) {
            String type = xmldbConfigs[i].getAttribute("type");
            String driver = xmldbConfigs[i].getAttribute("class");

            SourceCredential credential = new SourceCredential(null, null);
            credential.setPrincipal(xmldbConfigs[i].getAttribute("user", null));
            credential.setPassword(xmldbConfigs[i].getAttribute("password", null));
            credentialMap.put(type, credential);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Initializing XML:DB connection, using driver " + driver);
            }
View Full Code Here

            throw new MalformedURLException("Mispelled XML:DB URL. " +
                                            "The syntax is \"xmldb:databasetype://host/collection/resource\"");
        }

        String type = location.substring(start, end);
        SourceCredential credential = (SourceCredential)credentialMap.get(type);

        return new XMLDBSource(this.getLogger(),
                               credential, location,
                               this.m_manager);
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.source.helpers.SourceCredential

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.