org.apache.james.context
Class AvalonContextUtilities

java.lang.Object
  extended by org.apache.james.context.AvalonContextUtilities

public class AvalonContextUtilities
extends java.lang.Object

This class is essentially a set of static functions for extracting information from the Avalon context. This class should never be instantiated. Each function takes the context as a first argument.


Method Summary
static java.io.File getFile(org.apache.avalon.framework.context.Context context, java.lang.String fileURL)
          Gets the file or directory described by the argument file URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFile

public static java.io.File getFile(org.apache.avalon.framework.context.Context context,
                                   java.lang.String fileURL)
                            throws java.lang.Exception
Gets the file or directory described by the argument file URL.

Parameters:
context - the Avalon context
fileURL - an appropriately formatted URL describing a file on the filesystem on which the server is running. The URL is evaluated as a location relative to the application home, unless it begins with a slash. In the latter case the file location is evaluated relative to the underlying file system root.
Throws:
java.lang.IllegalArgumentException - if the arguments are null or the file URL is not appropriately formatted.
org.apache.avalon.framework.context.ContextException - if the underlying context generates a ContextException, if the application home is not correct, or if an IOException is generated while accessing the file.
java.lang.Exception


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.