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)
ComponentServiceopenInputFile in interface ComponentServicefileReference - A reference to the file to be opened.public java.sql.Connection openJdbcConnection(@Nonnull
JdbcReference jdbcReference)
ComponentServiceConnection 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 ComponentServicejdbcReference - A JdbcReference object to provide the jdbc connection
information.Connection object.public java.sql.Connection openMappingConnection(@Nonnull
MappingSetReference mappingSetReference)
ComponentServiceopenMappingConnection in interface ComponentServicemappingSetReference - 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)
ComponentServiceMaskingAlgorithm.MaskingMode value as the caller.getAlgorithmByName in interface ComponentServiceU - 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)
ComponentServiceMaskingAlgorithm.MaskingMode value as the caller.getAlgorithmByName in interface ComponentServiceU - 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)
ComponentServicegetMaskingTypeForInstanceReference in interface ComponentServicereference - The reference to the algorithm instance from which to get the
masking type.public CryptoService getCryptoService(KeyReference reference)
ComponentServicegetCryptoService in interface ComponentServicereference - 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()
ComponentServicecreateJaninoExpressionEvaluator in interface ComponentServicepublic void cookJaninoExpression(org.codehaus.janino.ExpressionEvaluator evaluator,
java.lang.String expression)
throws java.lang.Exception
ComponentServicecookJaninoExpression in interface ComponentServiceevaluator - 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()
ComponentServicegetLogService in interface ComponentServiceMaskingLogService object.public java.sql.Connection getTargetConnection()
ComponentServicegetTargetConnection in interface ComponentServiceConnection objectpublic JobInfo getJobInfo()
ComponentServicegetJobInfo in interface ComponentServicepublic java.lang.String getInstanceName()
ComponentServicegetInstanceName in interface ComponentServicepublic SingleOperationTaskInfo getSingleOperationTaskInfo()
ComponentServiceSingleOperationTaskInfo objectgetSingleOperationTaskInfo in interface ComponentServiceSingleOperationTaskInfo object (null by default)public MaskValueMetadata getMaskValueMetadata()
ComponentServicegetMaskValueMetadata in interface ComponentService