net.fckeditor.connector
Class Dispatcher

java.lang.Object
  extended by net.fckeditor.connector.Dispatcher

public class Dispatcher
extends Object

File Browser request dispatcher. This class is the validating and managing instance between the connector servlet and the connector. It receives the requests, parses the parameters, validates/sanitizes them and mandates them to the connector. After the connector has processed the request, this dispatcher passes the response back to the connector servlet. More over, it intercepts all specified exceptions from a connector and emits appropriate (localized) messages to the user. The exceptions won't be logged, they simply indicate the connector state.

Version:
$Id: Dispatcher.java 4785 2009-12-21 20:10:28Z mosipov $

Constructor Summary
Dispatcher(ServletContext servletContext)
          Initializes this dispatcher.
 
Method Summary
(package private)  GetResponse doGet(HttpServletRequest request)
          Called by the connector servlet to handle a GET request.
(package private)  UploadResponse doPost(HttpServletRequest request)
          Called by the connector servlet to handle a POST request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dispatcher

Dispatcher(ServletContext servletContext)
     throws Exception
Initializes this dispatcher. It initializes the connector internally. Called at connector servlet initialization.

Parameters:
servletContext - reference to the ServletContext in which the caller is running
Throws:
Exception - if the dispatcher initialization fails due to some reason
Method Detail

doGet

GetResponse doGet(HttpServletRequest request)
Called by the connector servlet to handle a GET request. In particular, it handles the GetFolders, GetFoldersAndFiles and CreateFolder commands.

Parameters:
request - the current request instance
Returns:
the get response instance associated with this request

doPost

UploadResponse doPost(HttpServletRequest request)
Called by the connector servlet to handle a POST request. In particular, it handles the FileUpload and QuickUpload commands.

Parameters:
request - the current request instance
Returns:
the upload response instance associated with this request


Copyright © 2004-2010 Frederico Caldeira Knabben. All Rights Reserved.