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

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


        try {
            PluginInstallerGBean installer = new PluginInstallerGBean(targetRepositoryPath, targetServerPath, installedPluginsList, servers, pluginRepoList, kernel, bundleContext);
            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);
                }
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Could not use plugin installer bean", e);
View Full Code Here


            input.close();
        }
    }

    static ServerOverride read(Reader input, JexlExpressionParser expressionParser) throws ParserConfigurationException, IOException, SAXException, JAXBException, XMLStreamException, InvalidGBeanException {
        AttributesType attributes = AttributesXmlUtil.loadAttributes(input);
        return new ServerOverride(attributes, expressionParser);
    }
View Full Code Here

        }
    }

    void write(Writer writer) throws XMLStreamException, JAXBException,
            IOException {
        AttributesType attributes = serverOverride.writeXml();
        AttributesXmlUtil.writeAttributes(attributes, writer);
        writer.flush();
    }
View Full Code Here

            log.error("Unable to write config.xml", e);
        }
   }

    static void write(ServerOverride serverOverride, Writer writer) throws XMLStreamException, JAXBException, IOException {
        AttributesType attributes = serverOverride.writeXml();
        AttributesXmlUtil.writeAttributes(attributes, writer);
        writer.flush();
    }
View Full Code Here

    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

    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

            input.close();
        }
    }

    static ServerOverride read(Reader input, JexlExpressionParser expressionParser) throws ParserConfigurationException, IOException, SAXException, JAXBException, XMLStreamException, InvalidGBeanException {
        AttributesType attributes = AttributesXmlUtil.loadAttributes(input);
        return new ServerOverride(attributes, expressionParser);
    }
View Full Code Here

        }
    }

    void write(Writer writer) throws XMLStreamException, JAXBException,
            IOException {
        AttributesType attributes = serverOverride.writeXml();
        AttributesXmlUtil.writeAttributes(attributes, writer);
        writer.flush();
    }
View Full Code Here

            log.error("Unable to write config.xml", e);
        }
   }

    static void write(ServerOverride serverOverride, Writer writer) throws XMLStreamException, JAXBException, IOException {
        AttributesType attributes = serverOverride.writeXml();
        AttributesXmlUtil.writeAttributes(attributes, writer);
        writer.flush();
    }
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.