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,ExportIdentitiesPartition,ExportLinksPartition,OracleGatherStatsPartition
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.ConfigurationconfigurationThe configuration loaded inexecute(SailPointContext, Log)protected longcutoffDateThe cutoff date, milliseconds.protected longexportTimestampThe export timestamp in epoch milliseconds.protected StringfilterStringThe filter stringprotected StringfilterString2The second filter string if any-
Fields inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
monitor, MULTI_SERIALIZED_WORKERS_ATTR, outcome
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedExportPartition()Constructs a new ExportPartition
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static voidaddCommonDateFields(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.Objectexecute(sailpoint.api.SailPointContext context, org.apache.commons.logging.Log _logger)The worker entrypointabstract voidexport(sailpoint.api.SailPointContext context, Connection connection, org.apache.commons.logging.Log logger)Exports the data required to the listed databasestatic ConnectionopenConnection(sailpoint.api.SailPointContext context, ExportConnectionInfo connectionInfo)Opens the connection to the target database using the provided connection infovoidsetConnectionInfo(ExportConnectionInfo connectionInfo)Sets the filter stringvoidtestExportSingleObject(sailpoint.api.SailPointContext context, org.apache.commons.logging.Log logger, String taskDefinitionName, String id)Tests the export of a single object.StringtoString()-
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
-
-
-
-
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 in epoch 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
protected ExportPartition()
Constructs a new 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:
executein classSailPointWorker- Parameters:
context- The private context to use for this thread worker_logger- The log attached to this Worker- Returns:
- Always null, nothing required here
- Throws:
Exception- if anything goes wrong
-
export
public 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
-
setConnectionInfo
public void setConnectionInfo(ExportConnectionInfo connectionInfo)
Sets the filter string- Parameters:
connectionInfo- The connection info
-
testExportSingleObject
public void testExportSingleObject(sailpoint.api.SailPointContext context, org.apache.commons.logging.Log logger, String taskDefinitionName, String id) throws Exception
Tests the export of a single object.The subclass will determine which object type it is. This can be invoked via a Run Rule task, the Debug page, or the Rule Runner plugin.
Each test will use a unique “run key” so that it doesn’t interfere with the incremental export mechanism used by the main task.
- Parameters:
context- The IIQ contextlogger- The loggertaskDefinitionName- The name of the existing TaskDefinitionid- The ID of the object to export- Throws:
Exception- if any failures occur
-
toString
public String toString()
- Overrides:
toStringin classSailPointWorker- See Also:
Object.toString()
-
-