Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.ide.cmd
Class RevertNodeCommand

java.lang.Object
  extended by oracle.ide.controller.Command
      extended by oracle.ide.cmd.RevertNodeCommand
Direct Known Subclasses:
RestoreHistoryCommand

public class RevertNodeCommand
extends Command

The RevertNodeCommand is used to revert the contents of a node to its persistent storage, and to send the appropriate notification. This command cannot be undone.

See Also:
Command

Field Summary
 
Fields inherited from class oracle.ide.controller.Command
CANCEL, context, EXECUTING, MULTI_NODE, NO_CHANGE, NO_UNDO, NORMAL, OK, type
 
Constructor Summary
RevertNodeCommand()
          Constructs a new RevertNodeCommand to run without confirmation.
RevertNodeCommand(boolean confirm)
          Constructs a new RevertNodeCommand to run with optional confirmation.
 
Method Summary
 int doit()
          Executes the actions associated with the revert command to revert the specified node.
 boolean isNeedConfirm()
          Returns true if the command requires user confirmation before executing, otherwise returns false.
static int reload(Context context)
          Utility method to reload the Node specified in the context with confirmation; the Node must be an instance of Node.
static int reload(Context context, boolean confirm)
          Utility method to reload the Node specified in the context with optional confirmation; the Node must be an instance of Node.
static int reload(Node node)
          Utility method to reload a specified Node without confirmation.
static int reload(Node node, boolean confirm)
          Utility method to reload a specified Node with optional confirmation.
 void setNeedConfirm(boolean confirm)
          Sets whether the command requires user confirmation before executing.
 
Methods inherited from class oracle.ide.controller.Command
getAffectedNodes, getContext, getData, getId, getName, getType, isGlobal, setContext, setData, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RevertNodeCommand

public RevertNodeCommand()
Constructs a new RevertNodeCommand to run without confirmation. This command cannot be undone.


RevertNodeCommand

public RevertNodeCommand(boolean confirm)
Constructs a new RevertNodeCommand to run with optional confirmation. This command cannot be undone.

Parameters:
confirm - if true, a confirmation dialog is displayed before the command is executed; if false, the command is run without confirmation
Method Detail

doit

public int doit()
         throws java.lang.Exception
Executes the actions associated with the revert command to revert the specified node.

Specified by:
doit in class Command
Returns:
Command.OK if the reload was successful, otherwise Command.CANCEL
Throws:
java.lang.Exception

isNeedConfirm

public boolean isNeedConfirm()
Returns true if the command requires user confirmation before executing, otherwise returns false.


setNeedConfirm

public void setNeedConfirm(boolean confirm)
Sets whether the command requires user confirmation before executing.

Parameters:
confirm - if true, a confirmation dialog is displayed before the command is executed; if false, the command is run without confirmation

reload

public static int reload(Node node)
Utility method to reload a specified Node without confirmation.

Parameters:
node - the Node to reload
Returns:
Command.OK if the reload was successful, otherwise Command.CANCEL

reload

public static int reload(Node node,
                         boolean confirm)
Utility method to reload a specified Node with optional confirmation.

Parameters:
node - the Node to reload
confirm - if true, a confirmation dialog is displayed; if false, the Node is reloaded without confirmation
Returns:
Command.OK if the reload was successful, otherwise Command.CANCEL

reload

public static int reload(Context context)
Utility method to reload the Node specified in the context with confirmation; the Node must be an instance of Node.

Parameters:
context - the Context containing the Node to be reloaded.
Returns:
Command.OK if the reload was successful, otherwise Command.CANCEL

reload

public static int reload(Context context,
                         boolean confirm)
Utility method to reload the Node specified in the context with optional confirmation; the Node must be an instance of Node.

Parameters:
context - the Context containing the Node to be reloaded.
confirm - if true, a confirmation dialog is displayed; if false, the Node is reloaded without confirmation
Returns:
Command.OK if the reload was successful, otherwise Command.CANCEL
See Also:
Context.getNode()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.