com.atlassian.plugin
Interface PluginArtifact

All Known Implementing Classes:
JarPluginArtifact, XmlPluginArtifact

public interface PluginArtifact

Allows the retrieval of files and/or an input stream of a plugin artifact. Implementations must allow multiple calls to getInputStream().

Since:
2.0.0
See Also:
PluginController

Nested Class Summary
static interface PluginArtifact.AllowsReference
          Additional interface for a plugin artifact which may support reference installation.
 
Method Summary
 boolean containsJavaExecutableCode()
           
 boolean doesResourceExist(java.lang.String name)
           
 java.io.InputStream getInputStream()
           
 java.lang.String getName()
           
 java.io.InputStream getResourceAsStream(java.lang.String name)
           
 java.io.File toFile()
           
 

Method Detail

doesResourceExist

boolean doesResourceExist(java.lang.String name)
Returns:
true if the resource exists in this artifact, otherwise false
Since:
2.2.0

getResourceAsStream

java.io.InputStream getResourceAsStream(java.lang.String name)
                                        throws PluginParseException
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

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

getInputStream

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

toFile

java.io.File toFile()
Returns:
the artifact as a file, or its underlying file if it is already one
Since:
2.2.0

containsJavaExecutableCode

boolean containsJavaExecutableCode()
Returns:
true if the plugin contains or references java executable code.
Since:
3.0


Copyright © 2013 Atlassian. All Rights Reserved.