public class DriverComponentService extends java.lang.Object implements ComponentService
Constructor and Description |
---|
DriverComponentService(JobInfo jobInfoIn,
java.sql.Connection connection,
java.lang.String instanceName) |
DriverComponentService(JobInfo jobInfoIn,
java.sql.Connection connection,
java.lang.String instanceNameIn,
MaskingLogService.MaskingLogServiceConfig maskingLogServiceConfig) |
DriverComponentService(SingleOperationTaskInfo taskInfo) |
DriverComponentService(SingleOperationTaskInfo taskInfo,
java.sql.Connection connection,
java.lang.String instanceName) |
DriverComponentService(SingleOperationTaskInfo taskInfo,
java.sql.Connection connection,
java.lang.String instanceNameIn,
MaskingLogService.MaskingLogServiceConfig maskingLogServiceConfig) |
DriverComponentService(SingleOperationTaskInfo taskInfo,
MaskingLogService.MaskingLogServiceConfig maskingLogServiceConfig) |
Modifier and Type | Method and Description |
---|---|
void |
cookJaninoExpression(org.codehaus.janino.ExpressionEvaluator evaluator,
java.lang.String expression)
"Cooks" (reads, scans, parses, and compiles) a one-line Java expression with the given Janino
expression evaluator.
|
org.codehaus.janino.ExpressionEvaluator |
createJaninoExpressionEvaluator()
Creates a Janino expression evaluator.
|
<U> MaskingAlgorithm<U> |
getAlgorithmByName(AlgorithmInstanceReference reference,
MaskingAlgorithm.MaskingType type)
Get a MaskingAlgorithm object for the algorithm specified by the reference and type.
|
<U> MaskingAlgorithm<U> |
getAlgorithmByName(AlgorithmInstanceReference reference,
MaskingAlgorithm.MaskingType type,
MaskValueMetadata metadata)
Get a MaskingAlgorithm object for the algorithm specified by the reference and type.
|
CryptoService |
getCryptoService(KeyReference reference)
Get a cryptographic service provider that wraps the key assigned to this component.
|
java.lang.String |
getInstanceName()
Get the name of this component instance.
|
JobInfo |
getJobInfo()
Get a JobInfo object, which contains references to the schema, table names, and column names
in a masking rule set.
|
LogService |
getLogService()
Get a Logger object that can be used to log messages.
|
MaskingAlgorithm.MaskingType |
getMaskingTypeForInstanceReference(AlgorithmInstanceReference reference)
Useful for confirming masking type on algorithms from JSON configuration of chaining
algorithms.
|
MaskValueMetadata |
getMaskValueMetadata()
Retrieve the metadata access interface for the masked field.
|
SingleOperationTaskInfo |
getSingleOperationTaskInfo()
Returns a SingleOperationTaskInfo object for SingleOperationTask where
SingleOperationTaskInfo is a class to provide the input values/information table wise for
specific SingleOperationTask.
|
java.sql.Connection |
getTargetConnection()
Get a Connection object, through which a DriverSupport Task will execute prepared statements
on the target database.
|
java.io.InputStream |
openInputFile(FileReference fileReference)
Method to open a file resource by URI.
|
java.sql.Connection |
openJdbcConnection(JdbcReference jdbcReference)
Method to open a JDBC resource.
|
java.sql.Connection |
openMappingConnection(MappingSetReference mappingSetReference)
Method to open a connection to mapping database.
|
public DriverComponentService(SingleOperationTaskInfo taskInfo, MaskingLogService.MaskingLogServiceConfig maskingLogServiceConfig)
public DriverComponentService(SingleOperationTaskInfo taskInfo, java.sql.Connection connection, java.lang.String instanceNameIn, MaskingLogService.MaskingLogServiceConfig maskingLogServiceConfig)
public DriverComponentService(SingleOperationTaskInfo taskInfo)
public DriverComponentService(JobInfo jobInfoIn, java.sql.Connection connection, java.lang.String instanceNameIn, MaskingLogService.MaskingLogServiceConfig maskingLogServiceConfig)
public DriverComponentService(JobInfo jobInfoIn, java.sql.Connection connection, java.lang.String instanceName)
public DriverComponentService(SingleOperationTaskInfo taskInfo, java.sql.Connection connection, java.lang.String instanceName)
public java.io.InputStream openInputFile(@Nonnull FileReference fileReference)
ComponentService
openInputFile
in interface ComponentService
fileReference
- A reference to the file to be opened.public java.sql.Connection openJdbcConnection(@Nonnull JdbcReference jdbcReference)
ComponentService
Connection
remains valid for the life
of the calling MaskingAlgorithm object, but may be closed be when no longer needed to free
resources.openJdbcConnection
in interface ComponentService
jdbcReference
- A JdbcReference
object to provide the jdbc connection
information.Connection
object.public java.sql.Connection openMappingConnection(@Nonnull MappingSetReference mappingSetReference)
ComponentService
openMappingConnection
in interface ComponentService
mappingSetReference
- A MappingSetReference
object which provides all the needed
information to establish the connection.Connection
object.public <U> MaskingAlgorithm<U> getAlgorithmByName(@Nonnull AlgorithmInstanceReference reference, @Nonnull MaskingAlgorithm.MaskingType type, @Nonnull MaskValueMetadata metadata)
ComponentService
MaskingAlgorithm.MaskingMode
value as the caller.getAlgorithmByName
in interface ComponentService
U
- The data type masked by the returned algorithm, must exactly match what is
requested in typereference
- A reference describing the algorithm instance to gettype
- The masking data type the named algorithm is expected maskmetadata
- The mask value metadata for the values that will be passed to the instance
being createdpublic <U> MaskingAlgorithm<U> getAlgorithmByName(@Nonnull AlgorithmInstanceReference reference, @Nonnull MaskingAlgorithm.MaskingType type)
ComponentService
MaskingAlgorithm.MaskingMode
value as the caller.getAlgorithmByName
in interface ComponentService
U
- The data type masked by the returned algorithm, must exactly match what is
requested in typereference
- A reference describing the algorithm instance to gettype
- The masking data type the named algorithm is expected maskpublic MaskingAlgorithm.MaskingType getMaskingTypeForInstanceReference(@Nonnull AlgorithmInstanceReference reference)
ComponentService
getMaskingTypeForInstanceReference
in interface ComponentService
reference
- The reference to the algorithm instance from which to get the
masking type.public CryptoService getCryptoService(KeyReference reference)
ComponentService
getCryptoService
in interface ComponentService
reference
- A reference to the key to use. Currently, the reference value must be "",
referring to the default algorithm key assigned to this algorithm.public org.codehaus.janino.ExpressionEvaluator createJaninoExpressionEvaluator()
ComponentService
createJaninoExpressionEvaluator
in interface ComponentService
public void cookJaninoExpression(org.codehaus.janino.ExpressionEvaluator evaluator, java.lang.String expression) throws java.lang.Exception
ComponentService
cookJaninoExpression
in interface ComponentService
evaluator
- The Janino expression evaluator that will cook the expressionexpression
- The expression to be cooked by the Janino expression evaluatorjava.lang.Exception
- If the expression cannot be evaluatedpublic LogService getLogService()
ComponentService
getLogService
in interface ComponentService
MaskingLogService
object.public java.sql.Connection getTargetConnection()
ComponentService
getTargetConnection
in interface ComponentService
Connection
objectpublic JobInfo getJobInfo()
ComponentService
getJobInfo
in interface ComponentService
public java.lang.String getInstanceName()
ComponentService
getInstanceName
in interface ComponentService
public SingleOperationTaskInfo getSingleOperationTaskInfo()
ComponentService
SingleOperationTaskInfo
objectgetSingleOperationTaskInfo
in interface ComponentService
SingleOperationTaskInfo
object (null by default)public MaskValueMetadata getMaskValueMetadata()
ComponentService
getMaskValueMetadata
in interface ComponentService