com.esri.adf.web.faces.event
Class ToolItem

java.lang.Object
  extended bycom.esri.adf.web.faces.event.ToolItem
All Implemented Interfaces:
java.io.Serializable

public class ToolItem
extends java.lang.Object
implements java.io.Serializable

An object which contains information pertaining to a map or page tool item. A ToolItem stores a tool key, a server-side action class name which will execute, and a client-side Javascript method which will be called when the tool is activated.

See Also:
Serialized Form

Field Summary
static int TASK_TOOL_METHOD
           
static int TOOL_ACTION_CLASS
           
static int TOOL_ACTION_METHOD
           
 
Constructor Summary
ToolItem(java.lang.String key, java.lang.String taskControlId, java.lang.String clientAction, boolean showLoading, java.lang.String cursor, java.util.Map attributes)
           
ToolItem(java.lang.String key, java.lang.String actionClass, java.lang.String actionMethodExpr, java.lang.String clientAction, boolean showLoading, java.lang.String cursor, java.util.Map attributes)
          Constructs a ToolItem object and verifies if action class represents an object of type ToolAction.
 
Method Summary
 java.lang.String getActionMethodExpressionString()
          Returns the expression string for the MethodBinding associated with the action method
 java.util.Map getAttributes()
          Returns the name-value (String, String) pairs of tool attributes.
 java.lang.String getClientAction()
          Returns the client action to perform.
 java.lang.String getCursor()
          Returns the cursor type.
 java.lang.String getKey()
          Returns the tool key.
 java.lang.String getTaskControlId()
           
 ToolAction getToolAction()
          Instantiates an object using the action class.
 java.lang.String getToolClass()
          Returns the class name to invoke for the tool.
 int getToolType()
           
 boolean isShowLoading()
          Indicates whether show loading image is shown when tool action is performed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOOL_ACTION_CLASS

public static final int TOOL_ACTION_CLASS
See Also:
Constant Field Values

TOOL_ACTION_METHOD

public static final int TOOL_ACTION_METHOD
See Also:
Constant Field Values

TASK_TOOL_METHOD

public static final int TASK_TOOL_METHOD
See Also:
Constant Field Values
Constructor Detail

ToolItem

public ToolItem(java.lang.String key,
                java.lang.String actionClass,
                java.lang.String actionMethodExpr,
                java.lang.String clientAction,
                boolean showLoading,
                java.lang.String cursor,
                java.util.Map attributes)
Constructs a ToolItem object and verifies if action class represents an object of type ToolAction.

Parameters:
key - the tool key
actionClass - the class to perform the action's business logic
clientAction - the client side action to perform
showLoading - if true, the loading image is shown when tool action is performed
cursor - the type of cursor to be shown when tool action is performed
attributes - the name-value (String, String) pairs of tool attributes

ToolItem

public ToolItem(java.lang.String key,
                java.lang.String taskControlId,
                java.lang.String clientAction,
                boolean showLoading,
                java.lang.String cursor,
                java.util.Map attributes)
Method Detail

getKey

public java.lang.String getKey()
Returns the tool key.

Returns:
String- the tool key value

getToolClass

public java.lang.String getToolClass()
Returns the class name to invoke for the tool.

Returns:
String- the class name

getClientAction

public java.lang.String getClientAction()
Returns the client action to perform.

Returns:
String- the client action

isShowLoading

public boolean isShowLoading()
Indicates whether show loading image is shown when tool action is performed.

Returns:
boolean- if true, the loading image is shown when tool action is performed

getCursor

public java.lang.String getCursor()
Returns the cursor type.

Returns:
String- the type of cursor

getAttributes

public java.util.Map getAttributes()
Returns the name-value (String, String) pairs of tool attributes.

Returns:
Map- the name-value pairs

getToolAction

public ToolAction getToolAction()
Instantiates an object using the action class.

Returns:
ToolAction- an object representing the tool action

getActionMethodExpressionString

public java.lang.String getActionMethodExpressionString()
Returns the expression string for the MethodBinding associated with the action method

Returns:
String- the expression string for the MethodBinding associated with the action method

getTaskControlId

public java.lang.String getTaskControlId()

getToolType

public int getToolType()

toString

public java.lang.String toString()