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

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

public class ToolItem
extends Object
implements 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(String key, String taskControlId, String clientAction, boolean showLoading, String cursor, Map<?,?> attributes)
           
ToolItem(String key, String actionClass, String actionMethodExpr, String clientAction, boolean showLoading, String cursor, Map<?,?> attributes)
          Constructs a ToolItem object and verifies if action class represents an object of type ToolAction.
 
Method Summary
 String getActionMethodExpressionString()
          Returns the expression string for the MethodBinding associated with the action method
 Map<?,?> getAttributes()
          Returns the name-value (String, String) pairs of tool attributes.
 String getClientAction()
          Returns the client action to perform.
 String getCursor()
          Returns the cursor type.
 String getKey()
          Returns the tool key.
 String getTaskControlId()
           
 ToolAction getToolAction()
          Instantiates an object using the action class.
 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.
 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(String key,
                String actionClass,
                String actionMethodExpr,
                String clientAction,
                boolean showLoading,
                String cursor,
                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
actionMethodExpr - the binding for the method to perform the tool'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(String key,
                String taskControlId,
                String clientAction,
                boolean showLoading,
                String cursor,
                Map<?,?> attributes)
Method Detail

getKey

public String getKey()
Returns the tool key.

Returns:
String- the tool key value

getToolClass

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

Returns:
String- the class name

getClientAction

public 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 String getCursor()
Returns the cursor type.

Returns:
String- the type of cursor

getAttributes

public 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 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 String getTaskControlId()

getToolType

public int getToolType()

toString

public String toString()
Overrides:
toString in class Object