public interface

PluginArtifact

com.atlassian.plugin.PluginArtifact
Known Indirect Subclasses

Class Overview

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

See Also

Summary

Public Methods
abstract boolean doesResourceExist(String name)
abstract InputStream getInputStream()
abstract String getName()
abstract InputStream getResourceAsStream(String name)
abstract File toFile()

Public Methods

public abstract boolean doesResourceExist (String name)

Returns
  • true if the resource exists in this artifact, otherwise false

public abstract InputStream getInputStream ()

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

public abstract String getName ()

Returns
  • the original name of the plugin artifact file. Typically used for persisting it to disk with a meaningful name.

public abstract InputStream getResourceAsStream (String name)

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

public abstract File toFile ()

Returns
  • the artifact as a file, or its underlying file if it is already one