Package com.pnfsoftware.jeb.core.actions
Class ActionData
java.lang.Object
com.pnfsoftware.jeb.core.actions.ActionData
- All Implemented Interfaces:
IActionData
- Direct Known Subclasses:
ActionAutoRenameAllData
,ActionCollapseData
,ActionCommentData
,ActionConvertData
,ActionCreatePackageData
,ActionDeleteData
,ActionMoveToData
,ActionMoveToPackageData
,ActionOverridesData
,ActionRenameData
,ActionReplaceData
,ActionSetTypeData
,ActionTypeHierarchyData
,ActionXrefsData
Base action data class. This class is meant to be subclassed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The error code 0 means that no error code was set-up. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine whether this action data object may be safely reused after areset()
invocation.Retrieve the description string provided by the plugins.int
The client may retrieve the optionally-set execution error code after a failed call toexecuteAction()
The client may retrieve the optionally-set execution error message after a failed call toexecuteAction()
Convenience method used to store any object.boolean
void
reset()
Reset this action data object.void
setDescription
(String description) Set the description string to be provided to the clients.void
setExecutionError
(int code, String msg) The plugin may set an execution error code and message on a failedexecuteAction()
invocation.void
setExecutionErrorCode
(int code) The plugin may set an execution error code on a failedexecuteAction()
invocation.void
The plugin may set an execution error message on a failedexecuteAction()
invocation.void
Convenience method used to retrieve previously stored objects.
-
Field Details
-
ERRCODE_UNKNOWN
public static final int ERRCODE_UNKNOWNThe error code 0 means that no error code was set-up. Meaningful error codes must be non-zero, and are defined within specific action data classes (sub-classes of this class).- See Also:
-
-
Constructor Details
-
ActionData
public ActionData() -
ActionData
public ActionData(boolean hintNoInfoRequest) - Parameters:
hintNoInfoRequest
- if true, informeprepareAction()
that only minimal action needs to be needed, i.e. the client code wants to execute an action regardless of the current state of things
-
-
Method Details
-
isNoInfoRequest
public boolean isNoInfoRequest() -
reset
public void reset()Reset this action data object. Sub-classes should override this method and invoke it as well. -
canReuseObject
public boolean canReuseObject()Determine whether this action data object may be safely reused after areset()
invocation.- Returns:
-
setDescription
Set the description string to be provided to the clients. To be used by plugins.- Parameters:
description
-
-
getDescription
Retrieve the description string provided by the plugins. To be used by clients.- Returns:
-
setExecutionError
The plugin may set an execution error code and message on a failedexecuteAction()
invocation.- Parameters:
code
-msg
-
-
setExecutionErrorCode
public void setExecutionErrorCode(int code) The plugin may set an execution error code on a failedexecuteAction()
invocation.- Parameters:
code
-
-
getExecutionErrorCode
public int getExecutionErrorCode()The client may retrieve the optionally-set execution error code after a failed call toexecuteAction()
- Returns:
-
setExecutionErrorMessage
The plugin may set an execution error message on a failedexecuteAction()
invocation.- Parameters:
msg
-
-
getExecutionErrorMessage
The client may retrieve the optionally-set execution error message after a failed call toexecuteAction()
- Returns:
-
getValue
Description copied from interface:IActionData
Convenience method used to store any object. Objects may be stored by the client or the plugin.- Specified by:
getValue
in interfaceIActionData
- Parameters:
key
- object key- Returns:
- object or null
-
setValue
Description copied from interface:IActionData
Convenience method used to retrieve previously stored objects.- Specified by:
setValue
in interfaceIActionData
- Parameters:
key
- object keyvalue
- object value
-