net.sf.hermesftp.console
Class AbstractConsoleServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by net.sf.hermesftp.console.AbstractConsoleServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
LogServlet, OverviewServlet, SessionsServlet, UserServlet

public abstract class AbstractConsoleServlet
extends javax.servlet.http.HttpServlet

Abstract super class of the servlets of the FTP console.

Author:
Administrator
See Also:
Serialized Form

Constructor Summary
AbstractConsoleServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          
protected  void fillField(java.lang.StringBuffer sb, java.lang.String value)
          Creates an HTML table fied (TD element).
protected  void fillNumField(java.lang.StringBuffer sb, java.lang.String value)
          Creates an HTML table fied (TD element).
protected  java.lang.String formatDate(java.util.Date date)
          Formats a date value.
protected  java.lang.String formatNum(long num)
          Formats a long value.
protected  java.lang.String formatNum(java.lang.Object num)
          Formats a numeric value.
protected abstract  java.util.Properties getContentProperties()
          The content properties object.
 java.lang.String getContentResourceName()
          Getter methode for property contentResourceName.
 java.lang.String getFooterResourceName()
          Getter methode for property footerResourceName.
 java.lang.String getHeaderResourceName()
          Getter methode for property headerResourceName.
 int getRefreshInterval()
          Getter methode for property refreshInterval.
 void setContentResourceName(java.lang.String contentResourceName)
          Setter methode for property contentResourceName.
 void setFooterResourceName(java.lang.String footerResourceName)
          Setter methode for property footerResourceName.
 void setHeaderResourceName(java.lang.String headerResourceName)
          Setter methode for property headerResourceName.
 void setRefreshInterval(int refreshInterval)
          Setter methode for property refreshInterval.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConsoleServlet

public AbstractConsoleServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     java.io.IOException

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

fillField

protected void fillField(java.lang.StringBuffer sb,
                         java.lang.String value)
Creates an HTML table fied (TD element).

Parameters:
sb - The stringbuffer to write to.
value - The value to fill.

fillNumField

protected void fillNumField(java.lang.StringBuffer sb,
                            java.lang.String value)
Creates an HTML table fied (TD element).

Parameters:
sb - The stringbuffer to write to.
value - The numeric value to fill.

formatDate

protected java.lang.String formatDate(java.util.Date date)
Formats a date value.

Parameters:
date - The date to format.
Returns:
The formatted date.

formatNum

protected java.lang.String formatNum(java.lang.Object num)
Formats a numeric value.

Parameters:
num - The number to format.
Returns:
The formatted number.

formatNum

protected java.lang.String formatNum(long num)
Formats a long value.

Parameters:
num - The number to format.
Returns:
The formatted number.

getContentProperties

protected abstract java.util.Properties getContentProperties()
The content properties object. The properties object represents a mapping of placeholder keys and their corresponding values.

Returns:
The properties.

getContentResourceName

public java.lang.String getContentResourceName()
Getter methode for property contentResourceName.

Returns:
Property contentResourceName.

setContentResourceName

public void setContentResourceName(java.lang.String contentResourceName)
Setter methode for property contentResourceName.

Parameters:
contentResourceName - Value for content resource name.

getFooterResourceName

public java.lang.String getFooterResourceName()
Getter methode for property footerResourceName.

Returns:
Property footerResourceName.

setFooterResourceName

public void setFooterResourceName(java.lang.String footerResourceName)
Setter methode for property footerResourceName.

Parameters:
footerResourceName - Value for footerResourceName.

getHeaderResourceName

public java.lang.String getHeaderResourceName()
Getter methode for property headerResourceName.

Returns:
Property headerResourceName.

setHeaderResourceName

public void setHeaderResourceName(java.lang.String headerResourceName)
Setter methode for property headerResourceName.

Parameters:
headerResourceName - Value for headerResourceName.

getRefreshInterval

public int getRefreshInterval()
Getter methode for property refreshInterval.

Returns:
Property refreshInterval.

setRefreshInterval

public void setRefreshInterval(int refreshInterval)
Setter methode for property refreshInterval.

Parameters:
refreshInterval - Value for refreshInterval.


Copyright © 2005-2007 Lars Behnke. All Rights Reserved.