net.fckeditor.response
Class XmlResponse

java.lang.Object
  extended by net.fckeditor.response.XmlResponse

public class XmlResponse
extends java.lang.Object

Creates an XML response for every GET request of the Connector servlet. This class maps directly to the XML layout descibed here.

Version:
$Id: XmlResponse.java 3840 2009-07-08 20:29:46Z mosipov $

Field Summary
static int EN_ALREADY_EXISTS
          Error number ALREADY EXISTS
static int EN_ERROR
          Error number ERROR
static int EN_INVALID_FOLDER_NAME
          Error number INVALID FOLDER NAME
static int EN_OK
          Error number OK
static int EN_SECURITY_ERROR
          Error number SECURITY ERROR
static int EN_UKNOWN
          Error number UNKNOWN ERROR
 
Constructor Summary
XmlResponse(CommandHandler command, ResourceTypeHandler resourceType, java.lang.String currentFolder, java.lang.String constructedUrl)
          Use this contructor if want to respond a positive message.
XmlResponse(int number)
          Use this contructor if want to respond a negative/error message only.
XmlResponse(int number, java.lang.String text)
          Use this contructor if want to respond a negative/error message with custom text.
 
Method Summary
 void setError(int number)
          Sets an error number.
 void setError(int number, java.lang.String text)
          Sets an error number with a custom message.
 void setFiles(java.io.File dir)
          Lists all files in the given dir as XML tags.
 void setFolders(java.io.File dir)
          Lists all folders in the given dir as XML tags.
 void setFoldersAndFiles(java.io.File dir)
          Lists all folders and files in the given dir as XML tags.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EN_OK

public static final int EN_OK
Error number OK

See Also:
Constant Field Values

EN_ERROR

public static final int EN_ERROR
Error number ERROR

See Also:
Constant Field Values

EN_ALREADY_EXISTS

public static final int EN_ALREADY_EXISTS
Error number ALREADY EXISTS

See Also:
Constant Field Values

EN_INVALID_FOLDER_NAME

public static final int EN_INVALID_FOLDER_NAME
Error number INVALID FOLDER NAME

See Also:
Constant Field Values

EN_SECURITY_ERROR

public static final int EN_SECURITY_ERROR
Error number SECURITY ERROR

See Also:
Constant Field Values

EN_UKNOWN

public static final int EN_UKNOWN
Error number UNKNOWN ERROR

See Also:
Constant Field Values
Constructor Detail

XmlResponse

public XmlResponse(CommandHandler command,
                   ResourceTypeHandler resourceType,
                   java.lang.String currentFolder,
                   java.lang.String constructedUrl)
Use this contructor if want to respond a positive message.

Parameters:
command -
resourceType -
currentFolder -
constructedUrl -

XmlResponse

public XmlResponse(int number,
                   java.lang.String text)
Use this contructor if want to respond a negative/error message with custom text.

Parameters:
number -
text -

XmlResponse

public XmlResponse(int number)
Use this contructor if want to respond a negative/error message only.

Parameters:
number -
Method Detail

setError

public void setError(int number,
                     java.lang.String text)
Sets an error number with a custom message.

Parameters:
number -
text -

setError

public void setError(int number)
Sets an error number.

Parameters:
number -

setFolders

public void setFolders(java.io.File dir)
Lists all folders in the given dir as XML tags.

Parameters:
dir -

setFiles

public void setFiles(java.io.File dir)
Lists all files in the given dir as XML tags.

Parameters:
dir -

setFoldersAndFiles

public void setFoldersAndFiles(java.io.File dir)
Lists all folders and files in the given dir as XML tags.

Parameters:
dir -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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