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

E13403-04

oracle.jdeveloper.db
Class DatabaseActions

java.lang.Object
  extended by oracle.jdeveloper.db.DatabaseActions
All Implemented Interfaces:
Controller

public class DatabaseActions
extends java.lang.Object
implements Controller

Actions specific to databases for use in the IDE.


Field Summary
static java.lang.String CONNECTION_STORE
          Key for the name of the current connection store.
static int DISONNECT_ID
           
static java.lang.String EDIT_CONNECTION
          Key for the name of the connection to edit.
static int EXPORT_ID
           
static int IMPORT_ID
           
static int NEW_CONNECTION_ID
           
 
Fields inherited from interface oracle.ide.controller.Controller
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED
 
Constructor Summary
protected DatabaseActions()
           
 
Method Summary
static IdeAction getConnectionEditorAction()
          Gets the IdeAction for invoking the connection editor.
static IdeAction getDisconnectAction()
           
static IdeAction getExportAction()
          The export action is used to export database connections into the DatabaseConnections.getInstance()
static IdeAction getImportAction()
          The import action is used to import database connections into the DatabaseConnections.getInstance()
protected  void handleConnectionEditor(java.lang.String storeName, java.lang.String name, Context c)
           
protected  boolean handleDisconnect(Context context)
           
 boolean handleEvent(IdeAction action, Context context)
          This method is called when a user interaction with a View triggers the execution of a command.
 boolean update(IdeAction action, Context context)
          This method updates the enabled status of the specified action within the specified context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_CONNECTION_ID

public static final int NEW_CONNECTION_ID

DISONNECT_ID

public static final int DISONNECT_ID

IMPORT_ID

public static final int IMPORT_ID

EXPORT_ID

public static final int EXPORT_ID

EDIT_CONNECTION

public static final java.lang.String EDIT_CONNECTION
Key for the name of the connection to edit. Used with the connection editor action to allow the user to edit a specific connection.

See Also:
getConnectionEditorAction(), Constant Field Values

CONNECTION_STORE

public static final java.lang.String CONNECTION_STORE
Key for the name of the current connection store. If this is not provided, DatabaseConnectionStores.getInstance().getCurrentStore() will be used to determine the appropriate store.

See Also:
Constant Field Values
Constructor Detail

DatabaseActions

protected DatabaseActions()
Method Detail

getConnectionEditorAction

public static IdeAction getConnectionEditorAction()
Gets the IdeAction for invoking the connection editor. If a name is put into the action under the EDIT_CONNECTION key that connection name will be preselected in the editor (if it exists).


getDisconnectAction

public static IdeAction getDisconnectAction()
Returns:
the IdeAction for disconnecting from the current database connection.

getImportAction

public static IdeAction getImportAction()
The import action is used to import database connections into the DatabaseConnections.getInstance()

Returns:
the import connections IdeAction

getExportAction

public static IdeAction getExportAction()
The export action is used to export database connections into the DatabaseConnections.getInstance()

Returns:
the export connections IdeAction

handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
Description copied from interface: Controller
This method is called when a user interaction with a View triggers the execution of a command.

Specified by:
handleEvent in interface Controller
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

handleDisconnect

protected boolean handleDisconnect(Context context)

handleConnectionEditor

protected void handleConnectionEditor(java.lang.String storeName,
                                      java.lang.String name,
                                      Context c)

update

public boolean update(IdeAction action,
                      Context context)
Description copied from interface: Controller
This method updates the enabled status of the specified action within the specified context. It should generally be called on the controller associated with the active view to allow that controller to take the first crack at determining its enabled status. If that controller wants to update its enabled status, it does so and returns true to indicate that further controllers do not need to be consulted. If the controller does not deal with setting the enabled status of an action, it delegates the request to its supervising controller, all the way up to the Ide. The Ide has a special implementation of update(xx) that further delegates the request to root controllers, until one of them returns true indicating the request was handled by the controller.

Specified by:
update in interface Controller
Parameters:
action - action whose command is to be executed.
context - the current context
Returns:
true if the controller handles the specified command.

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

E13403-04

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