Package com.atlassian.plugin
Class JarPluginArtifact
java.lang.Object
com.atlassian.plugin.JarPluginArtifact
- All Implemented Interfaces:
PluginArtifact,PluginArtifact.HasExtraModuleDescriptors
public final class JarPluginArtifact
extends Object
implements PluginArtifact, PluginArtifact.HasExtraModuleDescriptors
The implementation of PluginArtifact that is backed by a jar file.
- Since:
- 2.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.plugin.PluginArtifact
PluginArtifact.HasExtraModuleDescriptors -
Constructor Summary
ConstructorsConstructorDescriptionJarPluginArtifact(File jarFile) Construct a PluginArtifact for a jar file which does not allow reference installation.JarPluginArtifact(File jarFile, ReferenceMode referenceMode) Construct a PluginArtifact for a jar file and specify whether reference installation is supported. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleandoesResourceExist(String name) extraModuleDescriptorFiles(String rootFolder) getName()getResourceAsStream(String fileName) toFile()toString()
-
Constructor Details
-
JarPluginArtifact
Construct a PluginArtifact for a jar file which does not allow reference installation.- Parameters:
jarFile- the jar file comprising the artifact.
-
JarPluginArtifact
Construct a PluginArtifact for a jar file and specify whether reference installation is supported.- Parameters:
jarFile- the jar file comprising the artifact.referenceMode- specifies whether this artifact may be installed by reference.
-
-
Method Details
-
doesResourceExist
- Specified by:
doesResourceExistin interfacePluginArtifact
-
getResourceAsStream
- Specified by:
getResourceAsStreamin interfacePluginArtifact- Returns:
- an input stream for the this file in the jar. Closing this stream also closes the jar file this stream comes from.
-
getName
- Specified by:
getNamein interfacePluginArtifact
-
toString
-
getInputStream
- Specified by:
getInputStreamin interfacePluginArtifact- Returns:
- a buffered file input stream of the file on disk. This input stream is not resettable.
-
toFile
- Specified by:
toFilein interfacePluginArtifact
-
containsJavaExecutableCode
public boolean containsJavaExecutableCode()- Specified by:
containsJavaExecutableCodein interfacePluginArtifact
-
containsSpringContext
public boolean containsSpringContext()- Specified by:
containsSpringContextin interfacePluginArtifact
-
extraModuleDescriptorFiles
- Specified by:
extraModuleDescriptorFilesin interfacePluginArtifact.HasExtraModuleDescriptors
-
getReferenceMode
- Specified by:
getReferenceModein interfacePluginArtifact
-