geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r686088 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginXmlUtil.java
Date Thu, 14 Aug 2008 23:35:27 GMT
Author: djencks
Date: Thu Aug 14 16:35:27 2008
New Revision: 686088

URL: http://svn.apache.org/viewvc?rev=686088&view=rev
Log:
GERONIMO-4248 additional method to write plugin instance

Modified:
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginXmlUtil.java

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginXmlUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginXmlUtil.java?rev=686088&r1=686087&r2=686088&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginXmlUtil.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginXmlUtil.java
Thu Aug 14 16:35:27 2008
@@ -40,6 +40,7 @@
 import javax.xml.parsers.SAXParserFactory;
 import javax.xml.parsers.SAXParser;
 import javax.xml.transform.sax.SAXSource;
+import javax.xml.namespace.QName;
 
 import org.xml.sax.helpers.XMLFilterImpl;
 import org.xml.sax.XMLReader;
@@ -63,6 +64,7 @@
     public static final JAXBContext PLUGIN_CONTEXT;
     public static final JAXBContext PLUGIN_LIST_CONTEXT;
     public static final JAXBContext PLUGIN_ARTIFACT_CONTEXT;
+    private final static QName _PluginArtifact_QNAME = new QName("http://geronimo.apache.org/xml/ns/plugins-1.3",
"plugin-artifact");
 
     static {
         try {
@@ -81,6 +83,13 @@
         marshaller.marshal(element, out);
     }
 
+    public static void writePluginArtifact(PluginArtifactType value, Writer out) throws XMLStreamException,
JAXBException {
+        Marshaller marshaller = PLUGIN_ARTIFACT_CONTEXT.createMarshaller();
+        marshaller.setProperty("jaxb.formatted.output", true);
+        JAXBElement<PluginArtifactType> element = new JAXBElement<PluginArtifactType>(_PluginArtifact_QNAME,
PluginArtifactType.class, null, value);
+        marshaller.marshal(element, out);
+    }
+
     public static void writePluginList(PluginListType metadata, Writer out) throws XMLStreamException,
JAXBException {
         Marshaller marshaller = PLUGIN_LIST_CONTEXT.createMarshaller();
         marshaller.setProperty("jaxb.formatted.output", true);



Mime
View raw message