Class ConnectOptions
- java.lang.Object
-
- com.identityworksllc.iiq.common.query.ConnectOptions
-
public class ConnectOptions extends Object
Encapsulates a variety of ways of opening connections to a database, from Beanshell callbacks to connection info to specifying that we should use the IIQ or Plugin DB.This is mainly an attempt to reduce parameter explosion in other classes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConnectOptions.ConnectOptionsBuilder
A builder for this object
-
Constructor Summary
Constructors Constructor Description ConnectOptions(ConnectOptions other)
Copy constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConnectOptions.ConnectOptionsBuilder
builder()
Creates a new builder for aConnectOptions
static ConnectOptions
fromApplication(sailpoint.object.Application application)
Gets connect options from an Application, where they ought to be stored in the standard IIQ format expected byJdbcUtil.getConnection(Map)
.static ConnectOptions
fromMap(Map<String,Object> input)
Gets connect options from a Map, i.e., one stored in configurationConnection
openConnection()
Opens a connection to the database.
-
-
-
Constructor Detail
-
ConnectOptions
public ConnectOptions(ConnectOptions other)
Copy constructor- Parameters:
other
- The other object
-
-
Method Detail
-
builder
public static ConnectOptions.ConnectOptionsBuilder builder()
Creates a new builder for aConnectOptions
- Returns:
- The connect options object
-
fromApplication
public static ConnectOptions fromApplication(sailpoint.object.Application application)
Gets connect options from an Application, where they ought to be stored in the standard IIQ format expected byJdbcUtil.getConnection(Map)
.- Parameters:
application
- The application object- Returns:
- A populated ConnectOptions
-
fromMap
public static ConnectOptions fromMap(Map<String,Object> input)
Gets connect options from a Map, i.e., one stored in configuration- Parameters:
input
- The input connect options- Returns:
- if anything fails
-
openConnection
public Connection openConnection() throws sailpoint.tools.GeneralException
Opens a connection to the database.The caller is responsible for closing it.
- Returns:
- The connection to the database
- Throws:
sailpoint.tools.GeneralException
- if anything fails
-
-