FELIX-4025 Cleanup InventoryPrinter API
- and of course the implementation fixes required for ZipAttachmentPrinter
method argument rearrangement
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1470029 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/inventory/src/main/java/org/apache/felix/inventory/impl/AbstractWebConsolePlugin.java b/inventory/src/main/java/org/apache/felix/inventory/impl/AbstractWebConsolePlugin.java
index 51855c3..5753be7 100644
--- a/inventory/src/main/java/org/apache/felix/inventory/impl/AbstractWebConsolePlugin.java
+++ b/inventory/src/main/java/org/apache/felix/inventory/impl/AbstractWebConsolePlugin.java
@@ -647,7 +647,7 @@
flush();
zip.closeEntry();
- handler.addAttachments(handler.getName().concat("/"), this.zip);
+ handler.addAttachments(this.zip, handler.getName().concat("/"));
}
else if (format == Format.JSON)
{
@@ -661,7 +661,7 @@
zip.closeEntry();
if (!handler.supports(Format.TEXT))
{
- handler.addAttachments(handler.getName().concat("/"), this.zip);
+ handler.addAttachments(this.zip, handler.getName().concat("/"));
}
}
}
diff --git a/inventory/src/main/java/org/apache/felix/inventory/impl/DefaultWebConsolePlugin.java b/inventory/src/main/java/org/apache/felix/inventory/impl/DefaultWebConsolePlugin.java
index be50540..1b2eca1 100644
--- a/inventory/src/main/java/org/apache/felix/inventory/impl/DefaultWebConsolePlugin.java
+++ b/inventory/src/main/java/org/apache/felix/inventory/impl/DefaultWebConsolePlugin.java
@@ -97,10 +97,10 @@
}
/**
- * @see org.apache.felix.inventory.ZipAttachmentProvider#addAttachments(java.lang.String,
- * java.util.zip.ZipOutputStream)
+ * @see org.apache.felix.inventory.ZipAttachmentProvider#addAttachments(java.util.zip.ZipOutputStream,
+ * java.lang.String)
*/
- public void addAttachments(String namePrefix, ZipOutputStream zos) throws IOException
+ public void addAttachments(ZipOutputStream zos, String namePrefix) throws IOException
{
// no attachments support
}
diff --git a/inventory/src/main/java/org/apache/felix/inventory/impl/InventoryPrinterAdapter.java b/inventory/src/main/java/org/apache/felix/inventory/impl/InventoryPrinterAdapter.java
index a5a5a6a..429e075 100644
--- a/inventory/src/main/java/org/apache/felix/inventory/impl/InventoryPrinterAdapter.java
+++ b/inventory/src/main/java/org/apache/felix/inventory/impl/InventoryPrinterAdapter.java
@@ -119,14 +119,14 @@
}
/**
- * @see org.apache.felix.inventory.ZipAttachmentProvider#addAttachments(java.lang.String,
- * java.util.zip.ZipOutputStream)
+ * @see org.apache.felix.inventory.ZipAttachmentProvider#addAttachments(java.util.zip.ZipOutputStream,
+ * java.lang.String)
*/
- public void addAttachments(final String namePrefix, final ZipOutputStream zos) throws IOException
+ public void addAttachments(final ZipOutputStream zos, final String namePrefix) throws IOException
{
if (printer instanceof ZipAttachmentProvider)
{
- ((ZipAttachmentProvider) printer).addAttachments(namePrefix, zos);
+ ((ZipAttachmentProvider) printer).addAttachments(zos, namePrefix);
}
}
diff --git a/inventory/src/main/java/org/apache/felix/inventory/impl/webconsole/WebConsoleAdapter.java b/inventory/src/main/java/org/apache/felix/inventory/impl/webconsole/WebConsoleAdapter.java
index 6b79cb1..1c35a4a 100644
--- a/inventory/src/main/java/org/apache/felix/inventory/impl/webconsole/WebConsoleAdapter.java
+++ b/inventory/src/main/java/org/apache/felix/inventory/impl/webconsole/WebConsoleAdapter.java
@@ -217,10 +217,10 @@
}
/**
- * @see org.apache.felix.inventory.ZipAttachmentProvider#addAttachments(java.lang.String,
- * java.util.zip.ZipOutputStream)
+ * @see org.apache.felix.inventory.ZipAttachmentProvider#addAttachments(java.util.zip.ZipOutputStream,
+ * java.lang.String)
*/
- public void addAttachments(final String namePrefix, final ZipOutputStream zos) throws IOException
+ public void addAttachments(final ZipOutputStream zos, final String namePrefix) throws IOException
{
final URL[] attachments = cpa.getAttachments();
if (attachments != null)