Class JarPluginArtifact
java.lang.Object
eu.rarogsoftware.rarog.platform.core.plugins.osgi.JarPluginArtifact
- All Implemented Interfaces:
PluginArtifact,Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionJarPluginArtifact(String location) JarPluginArtifact(URI uri) JarPluginArtifact(URL url) JarPluginArtifact(org.springframework.core.io.Resource resource) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanexists()Checks if the underlying resource actually exists.getId()Returns a string identifying the artifact.Retrieves aPluginManifestfrom the artifact.getResource(String location) Returns the resource located in the artifact.
-
Constructor Details
-
JarPluginArtifact
-
JarPluginArtifact
-
JarPluginArtifact
-
JarPluginArtifact
public JarPluginArtifact(org.springframework.core.io.Resource resource)
-
-
Method Details
-
getJarManifest
- Throws:
IOException
-
getInputStream
- Throws:
IOException
-
getResource
Description copied from interface:PluginArtifactReturns the resource located in the artifact.- Specified by:
getResourcein interfacePluginArtifact- Parameters:
location- determines the resource to be returned- Returns:
- stream of the requested resource
- Throws:
IOException- when problems accessing the resource occur.
-
getId
Description copied from interface:PluginArtifactReturns a string identifying the artifact.- Specified by:
getIdin interfacePluginArtifact- Returns:
- string identifying the artifact e.g. 'jar:/path/to/file.jar'
-
exists
public boolean exists()Description copied from interface:PluginArtifactChecks if the underlying resource actually exists.- Specified by:
existsin interfacePluginArtifact- Returns:
- does the underlying resource actually exists.
-
getManifest
Description copied from interface:PluginArtifactRetrieves aPluginManifestfrom the artifact.- Specified by:
getManifestin interfacePluginArtifact- Returns:
- plugin's manifest
- Throws:
IOException- when problems accessing the artifact occur.PluginException- when the artifact doesn't contain a valid manifest.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-