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

Public Methods

public boolean doesResourceExist (String name)

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

public InputStream getInputStream ()

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

public String getName ()

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

public 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 File toFile ()

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