Package org.apache.geronimo.system.plugin.model

Examples of org.apache.geronimo.system.plugin.model.AttributesType


    public static AttributesType loadAttributes(Reader in) throws ParserConfigurationException, IOException, SAXException, JAXBException, XMLStreamException {
        Unmarshaller unmarshaller = ATTRIBUTES_CONTEXT.createUnmarshaller();
        XMLStreamReader xmlStream = XMLINPUT_FACTORY.createXMLStreamReader(in);
        JAXBElement<AttributesType> element = unmarshaller.unmarshal(xmlStream, AttributesType.class);
        AttributesType pluginList = element.getValue();
        return pluginList;
    }
View Full Code Here


    public void setComment(String comment) {
        this.comment = comment;
    }

    public AttributesType writeXml() {
        AttributesType attributes = new AttributesType();
        if (comment != null) {
            attributes.setComment(comment);
        } else {
            // by default, include the comment that the file is regenerated
            // and that only one comment is allowable at any level
            StringBuilder cmnt = new StringBuilder();

            cmnt.append("\n");
            cmnt.append("==================================================================\n");
            cmnt.append("Warning - This XML file is regenerated by Geronimo whenever\n");
            cmnt.append("changes are made to Geronimo's configuration.\n");
            cmnt.append("\n");
            cmnt.append("If you want to include comments, create a single comment element\n");
            cmnt.append("element.  They are allowable at any level of the configuration.\n");
            cmnt.append("\n");
            cmnt.append("!!!! Do not edit this file while Geronimo is running !!!!\n");
            cmnt.append("==================================================================");

            attributes.setComment(cmnt.toString());
        }
        for (ConfigurationOverride module: configurations.values()) {
            ModuleType moduleType = module.writeXml();
            attributes.getModule().add(moduleType);
        }
        return attributes;
    }
View Full Code Here

        try {
            PluginInstallerGBean installer = new PluginInstallerGBean(targetRepositoryPath, targetServerPath, servers, kernel, getClass().getClassLoader());
            installer.install(pluginList, sourceRepo, true, null, null, downloadPoller);
            if (overrides != null) {
                for (Override override: this.overrides) {
                    AttributesType attributes = override.getOverrides(overridesDir);
                    installer.mergeOverrides(override.getServer(), attributes);
                }
            }
        } finally {
            kernel.shutdown();
View Full Code Here

TOP

Related Classes of org.apache.geronimo.system.plugin.model.AttributesType

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.