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 TypeMethodDescriptionvoid
close()
boolean
exists()
Checks if the underlying resource actually exists.getId()
Returns a string identifying the artifact.Retrieves aPluginManifest
from 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:PluginArtifact
Returns the resource located in the artifact.- Specified by:
getResource
in 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:PluginArtifact
Returns a string identifying the artifact.- Specified by:
getId
in interfacePluginArtifact
- Returns:
- string identifying the artifact e.g. 'jar:/path/to/file.jar'
-
exists
public boolean exists()Description copied from interface:PluginArtifact
Checks if the underlying resource actually exists.- Specified by:
exists
in interfacePluginArtifact
- Returns:
- does the underlying resource actually exists.
-
getManifest
Description copied from interface:PluginArtifact
Retrieves aPluginManifest
from the artifact.- Specified by:
getManifest
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-