|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.fckeditor.response.GetResponse
public class GetResponse
Represents the XML response for the File Browser GET
requests.
Field Summary | |
---|---|
protected Document |
document
Underlying DOM document |
static int |
EN_CREATE_FOLDER_SECURITY_ERROR
Error number SECURITY ERROR |
static int |
EN_CUSTOM_ERROR
Error number CUSTOM ERROR |
static int |
EN_FOLDER_ALREADY_EXISTS_ERROR
Error number FOLDER ALREADY EXISTS |
static int |
EN_INVALID_NEW_FOLDER_NAME_ERROR
Error number INVALID NEW FOLDER NAME |
static int |
EN_OK
Error number OK |
static int |
EN_UKNOWN_CREATE_FOLDER_ERROR
Error number UNKNOWN ERROR |
protected Element |
errorElement
Error element, in case of an invalid request |
protected Element |
filesElement
Files element, in case of a GetResources request |
protected Element |
foldersElement
Folders element, in case of a GetResources request |
Constructor Summary | |
---|---|
GetResponse(Command command,
ResourceType type,
String currentFolder,
String constructedUrl)
Constructs a successful response for a specific command and resource type. |
|
GetResponse(int number)
Constructs a response with a specific error number only. |
|
GetResponse(int number,
String message)
Constructs a response with a specific error number and message. |
Method Summary | |
---|---|
static GetResponse |
getCreateFolderDisabledError()
Creates a CREATE FOLDER DISABLED error. |
static GetResponse |
getCreateFolderWriteError()
Creates a CREATE FOLDER WRITE error. |
static GetResponse |
getFolderAlreadyExistsError()
Creates a FOLDER ALREADY EXISTS error. |
static GetResponse |
getGetResourcesDisabledError()
Creates a GET RESOURCES DISABLED error. |
static GetResponse |
getGetResourcesReadError()
Creates a GET RESOURCES READ error. |
static GetResponse |
getInvalidCommandError()
Creates an INVALID COMMAND error. |
static GetResponse |
getInvalidCurrentFolderError()
Creates an INVALID CURRENT FOLDER error. |
static GetResponse |
getInvalidNewFolderNameError()
Creates an INVALID NEW FOLDER NAME error. |
static GetResponse |
getInvalidResourceTypeError()
Creates an INVALID RESOURCE TYPE error. |
static GetResponse |
getOK()
Creates an OK response. |
void |
setError(int number)
Sets the error number of this get response. |
void |
setError(int number,
String message)
Sets the error number and specific message of this get response. |
void |
setFiles(List<Map<String,Object>> files)
Sets the folders of this get response. |
void |
setFolders(List<String> folders)
Sets the folders of this get response. |
String |
toString()
Creates the XML representation of this get response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Document document
protected Element errorElement
protected Element foldersElement
GetResources
request
protected Element filesElement
GetResources
request
public static final int EN_OK
public static final int EN_CUSTOM_ERROR
public static final int EN_FOLDER_ALREADY_EXISTS_ERROR
public static final int EN_INVALID_NEW_FOLDER_NAME_ERROR
public static final int EN_CREATE_FOLDER_SECURITY_ERROR
public static final int EN_UKNOWN_CREATE_FOLDER_ERROR
Constructor Detail |
---|
public GetResponse(int number, String message)
number
- the error number of the new get responsemessage
- the specific message of the new get response
RuntimeException
- if creation of the underlying DOM document failedpublic GetResponse(Command command, ResourceType type, String currentFolder, String constructedUrl)
command
- the current command of the new get responsetype
- the current resource type of the new get responsecurrentFolder
- the current folder of the new get responseconstructedUrl
- the final URL of the new get response
RuntimeException
- if creation of the underlying DOM document failedpublic GetResponse(int number)
number
- the error number of the new get response
RuntimeException
- if creation of the underlying DOM document failedMethod Detail |
---|
public void setError(int number, String message)
number
- the error number of this get responsemessage
- the specific message of this get responsepublic void setError(int number)
number
- the error number of this get responsepublic void setFolders(List<String> folders)
folders
- the folders of this get responseConnector.getFolders(ResourceType, String)
public void setFiles(List<Map<String,Object>> files)
files
- the files of this get responseConnector.getFiles(ResourceType, String)
public String toString()
toString
in class Object
RuntimeException
- if creation failedpublic static GetResponse getOK()
OK
response.
public static GetResponse getInvalidCommandError()
INVALID COMMAND
error.
public static GetResponse getInvalidResourceTypeError()
INVALID RESOURCE TYPE
error.
public static GetResponse getInvalidCurrentFolderError()
INVALID CURRENT FOLDER
error.
public static GetResponse getGetResourcesDisabledError()
GET RESOURCES DISABLED
error.
public static GetResponse getGetResourcesReadError()
GET RESOURCES READ
error.
public static GetResponse getCreateFolderDisabledError()
CREATE FOLDER DISABLED
error.
public static GetResponse getInvalidNewFolderNameError()
INVALID NEW FOLDER NAME
error.
public static GetResponse getFolderAlreadyExistsError()
FOLDER ALREADY EXISTS
error.
public static GetResponse getCreateFolderWriteError()
CREATE FOLDER WRITE
error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |