com.atlassian.plugin
Class XmlPluginArtifact

java.lang.Object
  extended by com.atlassian.plugin.XmlPluginArtifact
All Implemented Interfaces:
PluginArtifact

public class XmlPluginArtifact
extends java.lang.Object
implements PluginArtifact

An XML plugin artifact that is just the atlassian-plugin.xml file

Since:
2.1.0

Constructor Summary
XmlPluginArtifact(java.io.File xmlFile)
           
 
Method Summary
 java.io.InputStream getInputStream()
          Returns an InputStream for the entire plugin artifact.
 java.lang.String getName()
           
 java.io.InputStream getResourceAsStream(java.lang.String name)
          Always returns null, since it doesn't make sense for an XML artifact
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlPluginArtifact

public XmlPluginArtifact(java.io.File xmlFile)
Method Detail

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String name)
                                        throws PluginParseException
Always returns null, since it doesn't make sense for an XML artifact

Specified by:
getResourceAsStream in interface PluginArtifact
Returns:
an input stream of the resource specified inside the artifact. Null if the resource cannot be found.
Throws:
PluginParseException - if the there was an exception retrieving the resource from the artifact

getName

public java.lang.String getName()
Specified by:
getName in interface PluginArtifact
Returns:
the original name of the plugin artifact file. Typically used for persisting it to disk with a meaningful name.

getInputStream

public java.io.InputStream getInputStream()
Description copied from interface: PluginArtifact
Returns an InputStream for the entire plugin artifact. Calling this multiple times will return a fresh input stream each time.

Specified by:
getInputStream in interface PluginArtifact
Returns:
a buffered file input stream of the file on disk. This input stream is not resettable.


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.