Package org.java.plugin.standard
Class ShadingPathResolver
java.lang.Object
org.java.plugin.standard.StandardPathResolver
org.java.plugin.standard.ShadingPathResolver
- All Implemented Interfaces:
PathResolver
This implementation of path resolver makes "shadow copy" of plug-in resources
before resolving paths to them, this helps avoid locking of local resources
and run native code from remote locations.
Configuration parameters
This path resolver implementation supports following configuration parameters:
- shadowFolder
- Path to the folder where to copy resources to prevent their locking. By
default this will be
System.getProperty("java.io.tmpdir") + "/.jpf-shadow". Please note that this folder will be maintained automatically by the Framework and might be cleared without any confirmation or notification. So it is strongly not recommended to use plug-ins folder (or other sensitive application directory) as shadow folder, this may lead to losing your data. - unpackMode
- If
always, "JAR'ed" or "ZIP'ed" plug-ins will be un-compressed to the shadow folder, ifnever, they will be just copied, ifsmart, the processing depends on plug-in content - if plug-in contains JAR libraries, it will be un-packed, otherwise just copied to shadow folder. It is also possible to add boolean "unpack" attribute to plug-in manifest, in this case, it's value will be taken into account. The default parameter value issmart.
- Version:
- $Id: ShadingPathResolver.java,v 1.5 2007/05/13 16:31:48 ddimon Exp $
-
Field Summary
Fields inherited from class org.java.plugin.standard.StandardPathResolver
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(ExtendedProperties config) No configuration parameters expected in this implementation.protected URLgetBaseUrl(UniqueIdentity uid) voidregisterContext(Identity idt, URL url) This implementation acceptsPluginDescriptororPluginFragmentas valid plug-in elements.resolvePath(Identity idt, String path) Should resolve given path to URL for a given identity.voidUnregisters plug-in element from this path resolver.Methods inherited from class org.java.plugin.standard.StandardPathResolver
getRegisteredContext, isContextRegistered, maybeJarUrl, resolvePath
-
Constructor Details
-
ShadingPathResolver
public ShadingPathResolver()
-
-
Method Details
-
configure
Description copied from class:StandardPathResolverNo configuration parameters expected in this implementation.- Specified by:
configurein interfacePathResolver- Overrides:
configurein classStandardPathResolver- Parameters:
config- path resolver configuration data- Throws:
Exception- if any error has occurred- See Also:
-
registerContext
Description copied from class:StandardPathResolverThis implementation acceptsPluginDescriptororPluginFragmentas valid plug-in elements.- Specified by:
registerContextin interfacePathResolver- Overrides:
registerContextin classStandardPathResolver- Parameters:
idt- plug-in elementurl- "home" URL for a given plug-in element- See Also:
-
unregisterContext
Description copied from interface:PathResolverUnregisters plug-in element from this path resolver.- Specified by:
unregisterContextin interfacePathResolver- Overrides:
unregisterContextin classStandardPathResolver- Parameters:
id- plug-in element identifier- See Also:
-
resolvePath
Description copied from interface:PathResolverShould resolve given path to URL for a given identity.- Specified by:
resolvePathin interfacePathResolver- Overrides:
resolvePathin classStandardPathResolver- Parameters:
idt- plug-in element for which to resolve pathpath- path to be resolved- Returns:
- resolved absolute URL
- See Also:
-
getBaseUrl
-