public class StandardPluginLocation extends Object implements PluginManager.PluginLocation
Inspired by Per Cederberg.
Constructor and Description |
---|
StandardPluginLocation(File file,
String manifestPath)
Creates a new plug-in location from a jar or a zip file or a folder.
|
StandardPluginLocation(URL aContext,
URL aManifest)
Creates a new plug-in location from a given context an manifest URL's.
|
Modifier and Type | Method and Description |
---|---|
static PluginManager.PluginLocation |
create(File file)
Creates plug-in location from a given file and checks that all required
resources are available.
|
URL |
getContextLocation() |
URL |
getManifestLocation() |
String |
toString() |
public StandardPluginLocation(URL aContext, URL aManifest)
aContext
- plug-in context URLaManifest
- plug-in manifest URLpublic StandardPluginLocation(File file, String manifestPath) throws MalformedURLException
file
- the plug-in zip file or plug-in foldermanifestPath
- the relative manifest pathMalformedURLException
- if the plug-in URL's couldn't be createdpublic static PluginManager.PluginLocation create(File file) throws MalformedURLException
file
- plug-in JAR or ZIP file or plug-in foldernull
if given file
doesn't points to a valid plug-in file or folderMalformedURLException
- if the plug-in URL's couldn't be createdpublic URL getManifestLocation()
getManifestLocation
in interface PluginManager.PluginLocation
PluginManager.PluginLocation.getManifestLocation()
public URL getContextLocation()
getContextLocation
in interface PluginManager.PluginLocation
PluginManager.PluginLocation.getContextLocation()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2019. All rights reserved.