public class StandardPathResolver extends Object implements PathResolver
registerContext(Identity, URL))
procedure.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
StandardPathResolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(ExtendedProperties config)
No configuration parameters expected in this implementation.
|
URL |
getRegisteredContext(String id)
Returns URL of
registered plug-in
element context. |
boolean |
isContextRegistered(String id) |
protected URL |
maybeJarUrl(URL url) |
void |
registerContext(Identity idt,
URL url)
This implementation accepts
PluginDescriptor or
PluginFragment as valid plug-in elements. |
URL |
resolvePath(Identity identity,
String path)
Should resolve given path to URL for a given identity.
|
protected URL |
resolvePath(URL baseUrl,
String path)
Resolves given path against given base URL.
|
void |
unregisterContext(String id)
Unregisters plug-in element from this path resolver.
|
public void registerContext(Identity idt, URL url)
PluginDescriptor or
PluginFragment as valid plug-in elements.registerContext in interface PathResolveridt - plug-in elementurl - "home" URL for a given plug-in elementPathResolver.registerContext(
org.java.plugin.registry.Identity, java.net.URL)public void unregisterContext(String id)
PathResolverunregisterContext in interface PathResolverid - plug-in element identifierPathResolver.unregisterContext(java.lang.String)public URL resolvePath(Identity identity, String path)
PathResolverresolvePath in interface PathResolveridentity - plug-in element for which to resolve pathpath - path to be resolvedPathResolver.resolvePath(
org.java.plugin.registry.Identity, java.lang.String)public URL getRegisteredContext(String id)
PathResolverregistered plug-in
element context. If context for plug-in element with given ID not
registered, this method should throw an IllegalArgumentException.
In other words, this method shouldn't return null.getRegisteredContext in interface PathResolverid - plug-in element identifierPathResolver.getRegisteredContext(java.lang.String)public boolean isContextRegistered(String id)
isContextRegistered in interface PathResolverid - plug-in element identifiertrue if context for plug-in element with given ID
registeredPathResolver.isContextRegistered(java.lang.String)protected URL resolvePath(URL baseUrl, String path)
baseUrl - base URL to resolve given pathpath - path to be resolvedprotected URL maybeJarUrl(URL url) throws MalformedURLException
MalformedURLExceptionpublic void configure(ExtendedProperties config) throws Exception
configure in interface PathResolverconfig - path resolver configuration dataException - if any error has occurredPathResolver.configure(ExtendedProperties)Copyright © 2016. All rights reserved.