net.fckeditor.handlers
Class CommandHandler

java.lang.Object
  extended by net.fckeditor.handlers.CommandHandler

public class CommandHandler
extends java.lang.Object

Handler for GET and POST commands.

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

Field Summary
static CommandHandler CREATE_FOLDER
           
static CommandHandler FILE_UPLOAD
           
static CommandHandler GET_FOLDERS
           
static CommandHandler GET_FOLDERS_AND_FILES
           
static CommandHandler QUICK_UPLOAD
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
static CommandHandler getCommand(java.lang.String name)
          A wrapper for valueOf(String).
 java.lang.String getName()
          Getter for the name.
 int hashCode()
           
static boolean isValidForGet(java.lang.String name)
          Checks if a specfied string represents a valid GET command.
static boolean isValidForPost(java.lang.String name)
          Checks if a specfied string represents a valid POST command.
 java.lang.String toString()
           
static CommandHandler valueOf(java.lang.String name)
          Getter for an CommandHandler of a specified string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GET_FOLDERS

public static final CommandHandler GET_FOLDERS

GET_FOLDERS_AND_FILES

public static final CommandHandler GET_FOLDERS_AND_FILES

CREATE_FOLDER

public static final CommandHandler CREATE_FOLDER

FILE_UPLOAD

public static final CommandHandler FILE_UPLOAD

QUICK_UPLOAD

public static final CommandHandler QUICK_UPLOAD
Method Detail

getName

public java.lang.String getName()
Getter for the name.

Returns:
The command name

valueOf

public static CommandHandler valueOf(java.lang.String name)
                              throws java.lang.IllegalArgumentException
Getter for an CommandHandler of a specified string.

Parameters:
name - A command to retrieve
Returns:
A CommandHandler object holding the value represented by the string argument.
Throws:
java.lang.IllegalArgumentException - If 'name' is null, empty, or does not exist.

isValidForGet

public static boolean isValidForGet(java.lang.String name)
Checks if a specfied string represents a valid GET command.

Parameters:
name - A command string to check
Returns:
true if the string representation is valid else false.

isValidForPost

public static boolean isValidForPost(java.lang.String name)
Checks if a specfied string represents a valid POST command.

Parameters:
name - A command string to check
Returns:
true if the string representation is valid else false.

getCommand

public static CommandHandler getCommand(java.lang.String name)
A wrapper for valueOf(String). It returns null instead of throwing an exception.

Parameters:
name - A command string to check
Returns:
A CommandHandler object holding the value represented by the string argument, or null.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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


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