JPF 1.5.1

org.java.plugin
Interface PathResolver

All Known Implementing Classes:
ShadingPathResolver, StandardPathResolver

public interface PathResolver

This interface is intended to establish correspondence between relative path and absolute URL in context of plug-in or plug-in fragment.

Version:
$Id$
See Also:
ObjectFactory.createPathResolver()

Method Summary
 void configure(ExtendedProperties config)
          Configures this resolver instance.
 java.net.URL getRegisteredContext(java.lang.String id)
          Returns URL of registered plug-in element context.
 boolean isContextRegistered(java.lang.String id)
           
 void registerContext(Identity idt, java.net.URL url)
          Registers "home" URL for given plug-in element.
 java.net.URL resolvePath(Identity identity, java.lang.String path)
          Should resolve given path to URL for a given identity.
 void unregisterContext(java.lang.String id)
          Unregisters plug-in element from this path resolver.
 

Method Detail

configure

void configure(ExtendedProperties config)
               throws java.lang.Exception
Configures this resolver instance. Usually this method is called from object factory implementation.

Parameters:
config - path resolver configuration data
Throws:
java.lang.Exception - if any error has occurred

registerContext

void registerContext(Identity idt,
                     java.net.URL url)
Registers "home" URL for given plug-in element.

Parameters:
idt - plug-in element
url - "home" URL for a given plug-in element

unregisterContext

void unregisterContext(java.lang.String id)
Unregisters plug-in element from this path resolver.

Parameters:
id - plug-in element identifier

getRegisteredContext

java.net.URL getRegisteredContext(java.lang.String id)
Returns URL of 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.

Parameters:
id - plug-in element identifier
Returns:
registered context "home" location

isContextRegistered

boolean isContextRegistered(java.lang.String id)
Parameters:
id - plug-in element identifier
Returns:
true if context for plug-in element with given ID registered

resolvePath

java.net.URL resolvePath(Identity identity,
                         java.lang.String path)
Should resolve given path to URL for a given identity.

Parameters:
identity - plug-in element for which to resolve path
path - path to be resolved
Returns:
resolved absolute URL

JPF 1.5.1

Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.