org.jboss.virtual.spi
Interface VFSContext

All Known Implementing Classes:
AbstractVFSContext, FileSystemContext, JarContext

public interface VFSContext

A virtual file context

Version:
$Revision: 55466 $
Author:
Scott.Stark@jboss.org, adrian@jboss.org

Method Summary
 VirtualFileHandler findChild(VirtualFileHandler parent, java.lang.String path)
          Find a child
 java.util.List<VirtualFileHandler> getChildren(VirtualFileHandler parent, boolean ignoreErrors)
          Get the children
 java.util.Map<java.lang.String,java.lang.String> getOptions()
          Get the context option settings
 VirtualFileHandler getRoot()
          Return the root virtual file
 java.net.URI getRootURI()
          Get the root uri
 VFS getVFS()
          Get the VFS for this context
 void visit(VirtualFileHandler handler, VirtualFileHandlerVisitor visitor)
          Visit the virtual file system
 

Method Detail

getRootURI

java.net.URI getRootURI()
Get the root uri

Returns:
the root uri

getVFS

VFS getVFS()
Get the VFS for this context

Returns:
the vfs

getRoot

VirtualFileHandler getRoot()
                           throws java.io.IOException
Return the root virtual file

Returns:
the root
Throws:
java.io.IOException - for any problem accessing the VFS

getOptions

java.util.Map<java.lang.String,java.lang.String> getOptions()
Get the context option settings

Returns:
a map of the context options

getChildren

java.util.List<VirtualFileHandler> getChildren(VirtualFileHandler parent,
                                               boolean ignoreErrors)
                                               throws java.io.IOException
Get the children

Parameters:
parent - the parent
ignoreErrors - whether to ignore errors
Returns:
the children
Throws:
java.io.IOException - for any problem accessing the VFS
java.lang.IllegalArgumentException - for a null parent

findChild

VirtualFileHandler findChild(VirtualFileHandler parent,
                             java.lang.String path)
                             throws java.io.IOException
Find a child

Parameters:
parent - the parent
path - the path
Returns:
the child
Throws:
java.io.IOException - for any problem accessing the VFS
java.lang.IllegalArgumentException - for a null parent or name

visit

void visit(VirtualFileHandler handler,
           VirtualFileHandlerVisitor visitor)
           throws java.io.IOException
Visit the virtual file system

Parameters:
handler - the reference handler
visitor - the visitor
Throws:
java.io.IOException - for any error
java.lang.IllegalArgumentException - if the handler or visitor is null