org.edg.security.authorization.admin
Class GUIConfigFileServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.edg.security.authorization.admin.GUIConfigFileServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class GUIConfigFileServlet
extends javax.servlet.http.HttpServlet

Web Interface for the Authorization Manager. This class implements a servlet that receives a new AuthorizationManager configuration file, evaluates if the file contains a valid definition and substitutes the old configuration file with the new one.

Author:
Gian Luca Volpato (SRC)
See Also:
Serialized Form

Constructor Summary
GUIConfigFileServlet()
           
 
Method Summary
 void CopyFile(java.io.File source, java.io.File destination)
          Convenience method to copy a file.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Generates the html response to be sent back to the client.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Generates the html response to be sent back to the client.
 void init()
          Initializes the GUIConfigFileServlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUIConfigFileServlet

public GUIConfigFileServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Initializes the GUIConfigFileServlet. Fetches the configuration parameters from the configuration file.

Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException - In case of an initialization error

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException
Generates the html response to be sent back to the client.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - The HttpServletRequest
response - The HttpServletResponse
Throws:
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Generates the html response to be sent back to the client.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - The HttpServletRequest
response - The HttpServletResponse
Throws:
java.io.IOException
javax.servlet.ServletException

CopyFile

public void CopyFile(java.io.File source,
                     java.io.File destination)
              throws java.io.IOException
Convenience method to copy a file.

Parameters:
source - The source File
destination - The destination File
Throws:
java.io.IOException