Class ExportPartition
- java.lang.Object
-
- com.identityworksllc.iiq.common.threads.SailPointWorker
-
- com.identityworksllc.iiq.common.task.export.ExportPartition
-
- All Implemented Interfaces:
Serializable
,Runnable
- Direct Known Subclasses:
CleanupLinksPartition
,ExportFinishPartition
,ExportIdentitiesPartition
,ExportLinksPartition
public abstract class ExportPartition extends SailPointWorker implements Serializable
An abstract superclass for all export partitions.It will open a connection to the target database and then invoke export() on the subclass.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
SailPointWorker.ExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected sailpoint.object.Configuration
configuration
The configuration loaded inexecute(SailPointContext, Log)
protected long
cutoffDate
The cutoff date, milliseconds.protected long
exportTimestamp
The export timestamp, milliseconds.protected String
filterString
The filter stringprotected String
filterString2
The second filter string if any-
Fields inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
monitor, MULTI_SERIALIZED_WORKERS_ATTR, outcome
-
-
Constructor Summary
Constructors Constructor Description ExportPartition()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static void
addCommonDateFields(NamedParameterStatement statement, Date exportDate, Date created, Date modified, Date lastRefresh)
Adds the common date fields (which must have the given names) to the given prepared statement.Object
execute(sailpoint.api.SailPointContext context, org.apache.commons.logging.Log logger)
The worker entrypointprotected abstract void
export(sailpoint.api.SailPointContext context, Connection connection, org.apache.commons.logging.Log logger)
Exports the data required to the listed databasesailpoint.object.Configuration
getConfiguration()
String
getConfigurationName()
long
getCutoffDate()
long
getExportTimestamp()
String
getFilterString()
String
getFilterString2()
String
getName()
static Connection
openConnection(sailpoint.api.SailPointContext context, ExportConnectionInfo connectionInfo)
Opens the connection to the target database using the provided connection infovoid
setConfigurationName(String configurationName)
void
setConnectionInfo(ExportConnectionInfo connectionInfo)
void
setCutoffDate(long cutoffDate)
void
setExportTimestamp(long exportTimestamp)
void
setFilterString(String filterString)
void
setFilterString2(String filterString2)
void
setName(String name)
-
Methods inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
addChild, addDependency, addTaskCallback, checkCancel, getDependencyOutput, getDependentPhase, getExceptionHandler, getMonitor, getParent, getPhase, getWorkerName, isTerminated, isTimedOut, run, runnable, setCompletedCounter, setDependentPhase, setExceptionHandler, setFailedCounter, setMonitor, setParent, setPhase, setTimeout, submitWithListeners, terminate, toCallable, toForkJoinTask, toFutureTask, toRequest, toRequest, toString
-
-
-
-
Field Detail
-
configuration
protected transient sailpoint.object.Configuration configuration
The configuration loaded inexecute(SailPointContext, Log)
-
cutoffDate
protected long cutoffDate
The cutoff date, milliseconds.We should not export records older than this date.
-
exportTimestamp
protected long exportTimestamp
The export timestamp, milliseconds.We should not export records newer than this date.
-
filterString
protected String filterString
The filter string
-
filterString2
protected String filterString2
The second filter string if any
-
-
Constructor Detail
-
ExportPartition
public ExportPartition()
-
-
Method Detail
-
addCommonDateFields
protected static void addCommonDateFields(NamedParameterStatement statement, Date exportDate, Date created, Date modified, Date lastRefresh) throws SQLException
Adds the common date fields (which must have the given names) to the given prepared statement.The modified and last refresh dates can be null.
- Parameters:
statement
- The named parameter statementexportDate
- The export datecreated
- The creation datemodified
- The modified date (which can be null)lastRefresh
- The last refresh date (which can be null)- Throws:
SQLException
- if any failures occur (unlikely)
-
openConnection
public static Connection openConnection(sailpoint.api.SailPointContext context, ExportConnectionInfo connectionInfo) throws sailpoint.tools.GeneralException
Opens the connection to the target database using the provided connection info- Parameters:
context
- The sailpoint context, used to decrypt the passwordconnectionInfo
- The provided connection info, extracted from the export task def- Returns:
- The open connection
- Throws:
sailpoint.tools.GeneralException
- if any failures occur
-
execute
public final Object execute(sailpoint.api.SailPointContext context, org.apache.commons.logging.Log logger) throws Exception
The worker entrypoint- Specified by:
execute
in classSailPointWorker
- Parameters:
context
- The private context to use for this thread workerlogger
- The log attached to this Worker- Returns:
- Always null, nothing required here
- Throws:
Exception
- if anything goes wrong
-
export
protected abstract void export(sailpoint.api.SailPointContext context, Connection connection, org.apache.commons.logging.Log logger) throws sailpoint.tools.GeneralException
Exports the data required to the listed database- Parameters:
context
- The contextconnection
- The connection to the target databaselogger
- The logger- Throws:
sailpoint.tools.GeneralException
- if any failures occur
-
getConfiguration
public sailpoint.object.Configuration getConfiguration()
-
getConfigurationName
public String getConfigurationName()
-
getCutoffDate
public long getCutoffDate()
-
getExportTimestamp
public long getExportTimestamp()
-
getFilterString
public String getFilterString()
-
getFilterString2
public String getFilterString2()
-
setConfigurationName
public void setConfigurationName(String configurationName)
-
setConnectionInfo
public void setConnectionInfo(ExportConnectionInfo connectionInfo)
-
setCutoffDate
public void setCutoffDate(long cutoffDate)
-
setExportTimestamp
public void setExportTimestamp(long exportTimestamp)
-
setFilterString
public void setFilterString(String filterString)
-
setFilterString2
public void setFilterString2(String filterString2)
-
-