org.apache.cocoon.components.url
Class ResourceURLFactory

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.components.url.ResourceURLFactory
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.Loggable, URLFactory

public class ResourceURLFactory
extends org.apache.avalon.framework.logger.AbstractLoggable
implements URLFactory, org.apache.avalon.framework.context.Contextualizable

Version:
$Id: ResourceURLFactory.java,v 1.3 2002/02/22 07:00:14 cziegeler Exp $
Author:
Giacomo Pati

Field Summary
protected  org.apache.avalon.framework.context.Context context
          The context
 
Fields inherited from interface org.apache.cocoon.components.url.URLFactory
ROLE
 
Constructor Summary
ResourceURLFactory()
           
 
Method Summary
 void contextualize(org.apache.avalon.framework.context.Context context)
          Get the context
 java.net.URL getURL(java.lang.String location)
          Create a URL from a location.
 java.net.URL getURL(java.net.URL base, java.lang.String location)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected org.apache.avalon.framework.context.Context context
The context
Constructor Detail

ResourceURLFactory

public ResourceURLFactory()
Method Detail

getURL

public java.net.URL getURL(java.lang.String location)
                    throws java.net.MalformedURLException
Create a URL from a location. This method supports the resource:// pseudo-protocol for loading resources accessible to this same class' ClassLoader
Specified by:
getURL in interface URLFactory
Parameters:
location - The location
Returns:
The URL pointed to by the location
Throws:
java.net.MalformedURLException - If the location is malformed

getURL

public java.net.URL getURL(java.net.URL base,
                           java.lang.String location)
                    throws java.net.MalformedURLException
Specified by:
getURL in interface URLFactory

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Get the context
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.