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.
static interface PluginArtifact.HasExtraModuleDescriptors
           
 
Method Summary
 boolean containsJavaExecutableCode()
           
 boolean doesResourceExist(String name)
           
 InputStream getInputStream()
           
 String getName()
           
 InputStream getResourceAsStream(String name)
           
 File toFile()
           
 

Method Detail

doesResourceExist

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

getResourceAsStream

InputStream getResourceAsStream(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

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

getInputStream

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

toFile

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 © 2015 Atlassian. All rights reserved.