Interface IPromptConnectionBean<ConnectionConfig>
- Type Parameters:
ConnectionConfig- Type of the configuration object that is used to store the connection's properties.
- All Superinterfaces:
Serializable
Base interface for GUI beans that manage prompt connections.
- Since:
- 8.5.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled each time when a prompt connection is selected, e.g. when the user clicks on a connection in the list of connections.Called each time the connection currently being edited needs to be retrieved, and possibly persisted.
-
Field Details
-
GENERIC_TYPE
-
-
Method Details
-
prepareViewForConnection
default void prepareViewForConnection(IPrepareViewForConnectionParams<ConnectionConfig> params) throws Exception Called each time when a prompt connection is selected, e.g. when the user clicks on a connection in the list of connections. This method is passed the connection, and should perform whatever initialization is necessary in order for the user to start editing its properties.- Parameters:
params- The current connection to be edited and its properties.- Throws:
Exception- When the initialization failed. If an exception is thrown, the user is shown an error indicating that the properties cannot be edited.
-
retrieveConnectionModel
default IRetrieveConnectionModelRetVal<ConnectionConfig> retrieveConnectionModel(IRetrieveConnectionModelParams<ConnectionConfig> params) Called each time the connection currently being edited needs to be retrieved, and possibly persisted. Usually this is called when the user saves the connection.Note, however, that you may not assume the editing process for the connection is done. Do not perform any clean up work here. Use
PreDestroyfor cleanup.This method is passed the same properties model that was passed to
prepareViewForConnection. The default implementation returnsnull, which results in the same model being used. One possible use case for this method is when you need to store part of the state inside your bean, outside the model, and need to merge that state back into the model.- Parameters:
params- The parameters with the current model, the same instance that was passed toprepareViewForQuery.- Returns:
- The current model to use. You can reuse the current model instance, or create a new instance. If you return null, the current model instance is used.
-