|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.java.plugin.standard.StandardPathResolver
public class StandardPathResolver
Standard simple implementation of path resolver. For resolving it uses
plug-in element registration (see registerContext(Identity, URL)
)
procedure.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
StandardPathResolver()
|
Method Summary | |
---|---|
void |
configure(ExtendedProperties config)
No configuration parameters expected in this implementation. |
java.net.URL |
getRegisteredContext(java.lang.String id)
Returns URL of registered plug-in
element context. |
boolean |
isContextRegistered(java.lang.String id)
|
protected java.net.URL |
maybeJarUrl(java.net.URL url)
|
void |
registerContext(Identity idt,
java.net.URL url)
This implementation accepts PluginDescriptor or
PluginFragment as valid plug-in elements. |
java.net.URL |
resolvePath(Identity identity,
java.lang.String path)
Should resolve given path to URL for a given identity. |
protected java.net.URL |
resolvePath(java.net.URL baseUrl,
java.lang.String path)
Resolves given path against given base URL. |
void |
unregisterContext(java.lang.String id)
Unregisters plug-in element from this path resolver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.commons.logging.Log log
Constructor Detail |
---|
public StandardPathResolver()
Method Detail |
---|
public void registerContext(Identity idt, java.net.URL url)
PluginDescriptor
or
PluginFragment
as valid plug-in elements.
registerContext
in interface PathResolver
idt
- plug-in elementurl
- "home" URL for a given plug-in elementPathResolver.registerContext(
org.java.plugin.registry.Identity, java.net.URL)
public void unregisterContext(java.lang.String id)
PathResolver
unregisterContext
in interface PathResolver
id
- plug-in element identifierPathResolver.unregisterContext(java.lang.String)
public java.net.URL resolvePath(Identity identity, java.lang.String path)
PathResolver
resolvePath
in interface PathResolver
identity
- plug-in element for which to resolve pathpath
- path to be resolved
PathResolver.resolvePath(
org.java.plugin.registry.Identity, java.lang.String)
public java.net.URL getRegisteredContext(java.lang.String id)
PathResolver
registered
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 PathResolver
id
- plug-in element identifier
PathResolver.getRegisteredContext(java.lang.String)
public boolean isContextRegistered(java.lang.String id)
isContextRegistered
in interface PathResolver
id
- plug-in element identifier
true
if context for plug-in element with given ID
registeredPathResolver.isContextRegistered(java.lang.String)
protected java.net.URL resolvePath(java.net.URL baseUrl, java.lang.String path)
baseUrl
- base URL to resolve given pathpath
- path to be resolved
protected java.net.URL maybeJarUrl(java.net.URL url) throws java.net.MalformedURLException
java.net.MalformedURLException
public void configure(ExtendedProperties config) throws java.lang.Exception
configure
in interface PathResolver
config
- path resolver configuration data
java.lang.Exception
- if any error has occurredPathResolver.configure(ExtendedProperties)
|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |