public final class JarPluginArtifact extends Object implements PluginArtifact, PluginArtifact.AllowsReference
PluginArtifactPluginArtifact.AllowsReferencePluginArtifact.AllowsReference.Default, PluginArtifact.AllowsReference.ReferenceMode| Constructor and Description |
|---|
JarPluginArtifact(File jarFile)
Construct a PluginArtifact for a jar file which does not allow reference installation.
|
JarPluginArtifact(File jarFile,
PluginArtifact.AllowsReference.ReferenceMode referenceMode)
Construct a PluginArtifact for a jar file and specify whether reference installation is supported.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsReference()
Query whether or not the PluginArtifact may be reference installed.
|
boolean |
containsJavaExecutableCode() |
boolean |
doesResourceExist(String name) |
InputStream |
getInputStream() |
String |
getName() |
InputStream |
getResourceAsStream(String fileName) |
File |
toFile() |
String |
toString() |
public JarPluginArtifact(File jarFile)
jarFile - the jar file comprising the artifact.public JarPluginArtifact(File jarFile, PluginArtifact.AllowsReference.ReferenceMode referenceMode)
jarFile - the jar file comprising the artifact.referenceMode - The ReferenceMode used to implement allowsReference().public boolean doesResourceExist(String name)
doesResourceExist in interface PluginArtifactpublic InputStream getResourceAsStream(String fileName) throws PluginParseException
getResourceAsStream in interface PluginArtifactPluginParseException - if the there was an exception retrieving the resource from the artifactpublic String getName()
getName in interface PluginArtifactpublic InputStream getInputStream()
getInputStream in interface PluginArtifactpublic File toFile()
toFile in interface PluginArtifactpublic boolean containsJavaExecutableCode()
containsJavaExecutableCode in interface PluginArtifacttrue if the plugin contains or references java executable code.public boolean allowsReference()
PluginArtifact.AllowsReferenceallowsReference in interface PluginArtifact.AllowsReferenceCopyright © 2014 Atlassian. All rights reserved.