at.ac.tuwien.infosys.rnue.helpers.http
Class DocumentEntry

java.lang.Object
  |
  +--at.ac.tuwien.infosys.rnue.helpers.http.DocumentEntry
All Implemented Interfaces:
IHTTPServerEntry

public class DocumentEntry
extends java.lang.Object
implements IHTTPServerEntry

An object of the DocumentEntry class is a HTTP server entry which is used to access files in the file system (HTML files as well as other (shareable) files). Objects of this class can be registered in the HTTP server's document base using the IHTTPServer.register method.


Constructor Summary
DocumentEntry(java.lang.String docBase)
          Constructs an object of the type DocumentEntry.
 
Method Summary
 java.lang.String getDescription()
          A textual description of the entry.
 IDocument getDocument(java.lang.String path)
          Return the IDocument document which is referenced by path.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentEntry

public DocumentEntry(java.lang.String docBase)
              throws ShareMeException
Constructs an object of the type DocumentEntry.

Parameters:
docBase - java.lang.String indicating the location of the document base for this DocumentEntry on the file system of the locale HTTP server.
Throws:
ShareMeException - Can be thrown if some error occurs.
Method Detail

getDocument

public IDocument getDocument(java.lang.String path)
                      throws HTTPException,
                             ShareMeException
Return the IDocument document which is referenced by path. It tries to access the file at "docBase + path". The docBase is set in the constructor.

Specified by:
getDocument in interface IHTTPServerEntry
Parameters:
path - java.lang.String path to the document.
Returns:
IDocument document that is referenced by path.
Throws:
HTTPException - If the file path can't be found .
ShareMeException - If an error occurs.

getDescription

public java.lang.String getDescription()
A textual description of the entry.

Specified by:
getDescription in interface IHTTPServerEntry
Returns:
description