pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.vfs.filebrowser
Class VFSBrowsingAdapter

java.lang.Object
  extended by org.torweg.pulse.vfs.filebrowser.VFSBrowsingAdapter
All Implemented Interfaces:
BrowsingAdapter

public class VFSBrowsingAdapter
extends java.lang.Object
implements BrowsingAdapter

Version:
$Revision: 1518 $
Author:
Thomas Weber

Constructor Summary
VFSBrowsingAdapter()
           
 
Method Summary
 java.util.List<VFSDirectoryDescriptor> getChildDirectories(DirectoryDescriptor d, User u)
          returns the DirectoryDescriptors for the given DirectoryDescriptor.
 VFSDirectoryDescriptor getDirectoryDescriptor(java.net.URI dirUri, User u)
          returns a DirectoryDescriptor for the given URI .
 FileDescriptor getFileDescriptor(java.net.URI fileUri, User u)
          returns a FileDescriptor for the given URI.
 java.util.List<? extends FileDescriptor> getFiles(DirectoryDescriptor d, User u)
          returns the FileDescriptors for the DirectoryDescriptor.
 java.util.List<VFSDirectoryDescriptor> getRootDirectories(User u)
          returns the root directories of the VFSBrowsingAdapter.
 void setBaseURI(java.net.URI uri)
          sets the base URI for the VFSBrowsingAdapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VFSBrowsingAdapter

public VFSBrowsingAdapter()
Method Detail

setBaseURI

public final void setBaseURI(java.net.URI uri)
sets the base URI for the VFSBrowsingAdapter.

Specified by:
setBaseURI in interface BrowsingAdapter
Parameters:
uri - the base URI for the VFSBrowsingAdapter
See Also:
BrowsingAdapter.setBaseURI(java.net.URI)

getRootDirectories

public final java.util.List<VFSDirectoryDescriptor> getRootDirectories(User u)
                                                                throws java.io.IOException
returns the root directories of the VFSBrowsingAdapter.

Specified by:
getRootDirectories in interface BrowsingAdapter
Parameters:
u - the User used for access
Returns:
the root directories of the VFSBrowsingAdapter
Throws:
java.io.IOException - on I/O errors

getChildDirectories

public final java.util.List<VFSDirectoryDescriptor> getChildDirectories(DirectoryDescriptor d, User u)
returns the DirectoryDescriptors for the given DirectoryDescriptor.

Specified by:
getChildDirectories in interface BrowsingAdapter
Parameters:
d - the directory
u - the user for access checks
Returns:
the DirectoryDescriptors for the given DirectoryDescriptor

getFiles

public final java.util.List<? extends FileDescriptor> getFiles(DirectoryDescriptor d, User u)
returns the FileDescriptors for the DirectoryDescriptor.

Specified by:
getFiles in interface BrowsingAdapter
Parameters:
d - the directory
u - the user for access checks
Returns:
the FileDescriptors for the DirectoryDescriptor.

getDirectoryDescriptor

public final VFSDirectoryDescriptor getDirectoryDescriptor(java.net.URI dirUri, User u)
returns a DirectoryDescriptor for the given URI .

Specified by:
getDirectoryDescriptor in interface BrowsingAdapter
Parameters:
dirUri - the URI
u - the user for access checks
Returns:
a DirectoryDescriptor for the given URI , or null, if either the URI does not denote a directory, the URI does not exist or the URI is not below the base path.

getFileDescriptor

public final FileDescriptor getFileDescriptor(java.net.URI fileUri, User u)
returns a FileDescriptor for the given URI.

Specified by:
getFileDescriptor in interface BrowsingAdapter
Parameters:
fileUri - the URI
u - the User used for access
Returns:
a FileDescriptor for the given URI, or null, if either the URI does not denote a file, the URI does not exist or the URI is not below the base path.