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
Interface BrowsingAdapter

All Known Implementing Classes:
VFSBrowsingAdapter

public interface BrowsingAdapter

defines the interface for BrowsingAdapters, which are a bridge between file stores and the FileBrowser.

Version:
$Revision: 1430 $
Author:
Thomas Weber

Method Summary
 java.util.List<? extends DirectoryDescriptor> getChildDirectories(DirectoryDescriptor d, User u)
          returns the child directories of the DirectoryDescriptor.
 DirectoryDescriptor getDirectoryDescriptor(java.net.URI dirUri, User user)
          returns a DirectoryDescriptor for the given URI .
 FileDescriptor getFileDescriptor(java.net.URI fileUri, User user)
          returns a FileDescriptor for the given URI.
 java.util.List<? extends FileDescriptor> getFiles(DirectoryDescriptor d, User u)
          returns the files of the DirectoryDescriptor.
 java.util.List<? extends DirectoryDescriptor> getRootDirectories(User u)
          returns the root directories of the BrowsingAdapter.
 void setBaseURI(java.net.URI uri)
          sets the base URI for the adapter.
 

Method Detail

setBaseURI

void setBaseURI(java.net.URI uri)
sets the base URI for the adapter.

The base URI can be used as a "jail root" to restrict access to a specified part of the file store.

Parameters:
uri - the base URI

getRootDirectories

java.util.List<? extends DirectoryDescriptor> getRootDirectories(User u)
                                                                 throws java.io.IOException
returns the root directories of the BrowsingAdapter.

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

getChildDirectories

java.util.List<? extends DirectoryDescriptor> getChildDirectories(DirectoryDescriptor d, User u)
returns the child directories of the DirectoryDescriptor.

Parameters:
d - the DirectoryDescriptor
u - the User used for access
Returns:
the child directories of the DirectoryDescriptor

getFiles

java.util.List<? extends FileDescriptor> getFiles(DirectoryDescriptor d, User u)
returns the files of the DirectoryDescriptor.

Parameters:
d - the DirectoryDescriptor
u - the User used for access
Returns:
the files directories of the DirectoryDescriptor

getDirectoryDescriptor

DirectoryDescriptor getDirectoryDescriptor(java.net.URI dirUri, User user)
returns a DirectoryDescriptor for the given URI .

Parameters:
dirUri - the URI
user - the User used for access
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

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

Parameters:
fileUri - the URI
user - 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.