org.jboss.osgi.vfs
Interface VFSAdaptor


public interface VFSAdaptor

The basic adaptor for the VFS that needs to be implemented for a specific jboss-vfs version. This abstraction should be removed once we settle on a single jboss-vfs version.

Since:
02-Mar-2010
Author:
thomas.diesler@jboss.com

Method Summary
 VirtualFile adapt(Object virtualFile)
          Adapt a concrete instance of a jboss-vfs VirtualFile.
 Object adapt(VirtualFile virtualFile)
          Adapt a VirtualFile to a concrete instance of a jboss-vfs VirtualFile.
 VirtualFile getRoot(URL url)
          Get the root virtual file
 

Method Detail

getRoot

VirtualFile getRoot(URL url)
                    throws IOException
Get the root virtual file

Parameters:
rootURL - the root url
Returns:
the virtual file
Throws:
IOException - if there is a problem accessing the VFS
IllegalArgumentException - if the rootURL

adapt

VirtualFile adapt(Object virtualFile)
Adapt a concrete instance of a jboss-vfs VirtualFile.

Parameters:
virtualFile - The VirtualFile instance
Returns:
The VirtualFile abstraction
Throws:
IllegalArgumentException - If the given virtualFile is not a VirtualFile supported by the VFSAdaptor implementation

adapt

Object adapt(VirtualFile virtualFile)
Adapt a VirtualFile to a concrete instance of a jboss-vfs VirtualFile.

Parameters:
virtualFile - The VirtualFile instance
Returns:
The jboss-vfs VirtualFile


Copyright © 2010. All Rights Reserved.