public final class JarPluginArtifact extends Object implements PluginArtifact, PluginArtifact.AllowsReference, PluginArtifact.HasExtraModuleDescriptors
PluginArtifactPluginArtifact.AllowsReference, PluginArtifact.HasExtraModuleDescriptorsPluginArtifact.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)
Deprecated.
since 4.0.0, to be removed in 5.0.0: Use
JarPluginArtifact(com.atlassian.plugin.ReferenceMode)
which uses the non legacy ReferenceMode. |
JarPluginArtifact(File jarFile,
ReferenceMode referenceMode)
Construct a PluginArtifact for a jar file and specify whether reference installation is supported.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsReference()
Deprecated.
since 4.0.0, to be removed in 5.0.0: Equivalent functionality is now provided via
getReferenceMode(). |
boolean |
containsJavaExecutableCode() |
boolean |
containsSpringContext() |
boolean |
doesResourceExist(String name) |
Set<String> |
extraModuleDescriptorFiles(String rootFolder) |
InputStream |
getInputStream() |
String |
getName() |
ReferenceMode |
getReferenceMode() |
InputStream |
getResourceAsStream(String fileName) |
File |
toFile() |
String |
toString() |
public JarPluginArtifact(File jarFile)
jarFile - the jar file comprising the artifact.public JarPluginArtifact(File jarFile, ReferenceMode referenceMode)
jarFile - the jar file comprising the artifact.referenceMode - specifies whether this artifact may be installed by reference.public JarPluginArtifact(File jarFile, PluginArtifact.AllowsReference.ReferenceMode referenceMode)
JarPluginArtifact(com.atlassian.plugin.ReferenceMode)
which uses the non legacy ReferenceMode.jarFile - the jar file comprising the artifact.referenceMode - The legacy PluginArtifact.AllowsReference.ReferenceMode whose
modern equivalent ReferenceMode specifies whether this artifact may be installed by reference.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 containsSpringContext()
containsSpringContext in interface PluginArtifacttrue if the plugin contains Spring context files or instructionspublic Set<String> extraModuleDescriptorFiles(String rootFolder)
extraModuleDescriptorFiles in interface PluginArtifact.HasExtraModuleDescriptorspublic ReferenceMode getReferenceMode()
getReferenceMode in interface PluginArtifactpublic boolean allowsReference()
getReferenceMode().getReferenceMode() and ReferenceMode.allowsReference.allowsReference in interface PluginArtifact.AllowsReferencegetReferenceMode().allowsReference()PluginArtifact#getReferenceMode} and {@link com.atlassian.plugin.ReferenceMode#allowsReference}Copyright © 2018 Atlassian. All rights reserved.