com.lightdev.app.fileserver.http
Class HttpFileManager

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by redstone.xmlrpc.XmlRpcServlet
              extended by com.lightdev.app.fileserver.http.HttpFileManager
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class HttpFileManager
extends XmlRpcServlet

Class HttpFileManager is a Servlet for file management via HTTP based on the Light Development File System library.

It extends the Redstone XML-RPC servlet and inherits the capability to communicate through the Hypertext Transfer Protocol (HTTP) this way, using remote procedure calls formatted in a flavor of the extensible markup language (XML-RPC).

It also uses the Light Development Simple Authentication and Authorisation Framework (SAM) so that remote method calls via XML-RPC are not exposed to users that are not allowed to use the file server.

Version:
2, 11.9.2008
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software
See Also:
Serialized Form

Field Summary
static String FILE_MANAGER_HANDLER_NAME
          name of XML-RPC handler for file management
static String FILE_SERVER_USERS
          name of xml file with users and roles to use for authentication
static String USER_FILE
          name of file having user names, etc.
static String USER_HOME_PROPERTY_NAME
          property name of user home directory
 
Constructor Summary
HttpFileManager()
          create a new instance of class RedstoneFileServer
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          override the doGet method to implement some service methods: reloadUsers causes the servlet to load the user xml file again.
 void init(ServletConfig servletConfig)
          initialise this servlet, i.e.
 void setGatekeeper(Gatekeeper gatekeeper)
          set the gatekeeper of this servlet.
 
Methods inherited from class redstone.xmlrpc.XmlRpcServlet
doPost, getContentType, getStreamMessages, getXmlRpcServer
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_FILE

public static final String USER_FILE
name of file having user names, etc.

See Also:
Constant Field Values

FILE_MANAGER_HANDLER_NAME

public static final String FILE_MANAGER_HANDLER_NAME
name of XML-RPC handler for file management

See Also:
Constant Field Values

USER_HOME_PROPERTY_NAME

public static final String USER_HOME_PROPERTY_NAME
property name of user home directory

See Also:
Constant Field Values

FILE_SERVER_USERS

public static final String FILE_SERVER_USERS
name of xml file with users and roles to use for authentication

See Also:
Constant Field Values
Constructor Detail

HttpFileManager

public HttpFileManager()
create a new instance of class RedstoneFileServer

Method Detail

setGatekeeper

public void setGatekeeper(Gatekeeper gatekeeper)
set the gatekeeper of this servlet. This method can be used to change the backing user data store.

Parameters:
gatekeeper - the gatekeeper to use

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws IOException,
                  ServletException
override the doGet method to implement some service methods: reloadUsers causes the servlet to load the user xml file again. getUserHomeDir shows the name of the user home directory

Overrides:
doGet in class HttpServlet
Throws:
IOException
ServletException

init

public void init(ServletConfig servletConfig)
          throws ServletException

initialise this servlet, i.e.

The gatekeeper assumes an XML file with user and role information on the server.

Specified by:
init in interface Servlet
Overrides:
init in class XmlRpcServlet
Throws:
ServletException