Package com.lucidworks.apollo.pipeline
Class PipelineDefinitionMergeUtil
java.lang.Object
com.lucidworks.apollo.pipeline.PipelineDefinitionMergeUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>>
voidclearRedactionFromPipeline(T targetPipeline, com.lucidworks.apollo.pipeline.schema.SchemaProcessorFactory schemaProcessorFactory) Traverse a Pipeline's stages and their properties, removing "xXx-Redacted-xXx" as they are found.static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>>
TcopyPipelineSecretsFromOldSelf(T oldPipeline, T newPipeline) Traverse into the Pipeline's stages and copy secrets over from an existing copy.static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>>
TcopyPipelineSecretsFromOldSelf(T oldPipeline, T newPipeline, com.fasterxml.jackson.databind.ObjectMapper mapper) static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>>
voidcopySecretsFromOther(T sourcePipeline, T targetPipeline) Copy decrypted secrets from one pipelines to another.static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>>
voidcopySecretsFromOther(T sourcePipeline, T targetPipeline, com.fasterxml.jackson.databind.ObjectMapper mapper, com.lucidworks.apollo.pipeline.schema.SchemaProcessorFactory schemaProcessorFactory) static voidcopyStageSecretsFromOldSelf(com.fasterxml.jackson.databind.node.ObjectNode oldNode, com.fasterxml.jackson.databind.node.ObjectNode newNode) Copy the secrets from oldNode onto newNode, recursively.static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>>
Map<String,com.lucidworks.apollo.pipeline.StageConfig> stagesAsMap(T pipeline) Index StageConfigs into a Map for easy lookup
-
Constructor Details
-
PipelineDefinitionMergeUtil
public PipelineDefinitionMergeUtil()
-
-
Method Details
-
stagesAsMap
public static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>> Map<String,com.lucidworks.apollo.pipeline.StageConfig> stagesAsMap(T pipeline) Index StageConfigs into a Map for easy lookup- Parameters:
pipeline-- Returns:
-
copyStageSecretsFromOldSelf
public static void copyStageSecretsFromOldSelf(com.fasterxml.jackson.databind.node.ObjectNode oldNode, com.fasterxml.jackson.databind.node.ObjectNode newNode) Copy the secrets from oldNode onto newNode, recursively. newNode is modified in place- Parameters:
oldNode- The "old" version of this object, typically whatever is persistednewNode- The "new" version of this object, typically coming from the API
-
copyPipelineSecretsFromOldSelf
public static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>> T copyPipelineSecretsFromOldSelf(T oldPipeline, T newPipeline) Traverse into the Pipeline's stages and copy secrets over from an existing copy. This methods creates a newPipelineDefinitioninstance- Parameters:
oldPipeline- the "old" version of the pipeline, typically whatever is persistednewPipeline- the "new" version of the pipeline, typically from the API
-
copyPipelineSecretsFromOldSelf
public static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>> T copyPipelineSecretsFromOldSelf(T oldPipeline, T newPipeline, com.fasterxml.jackson.databind.ObjectMapper mapper) -
copySecretsFromOther
public static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>> void copySecretsFromOther(@Nullable T sourcePipeline, T targetPipeline) Copy decrypted secrets from one pipelines to another. The target stage must have an extra "secretSourceStageId" property which must match the stage ID of the source pipeline stage- Parameters:
sourcePipeline- Pipeline to source secrets fromtargetPipeline- Pipeline to copy secrets into
-
copySecretsFromOther
public static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>> void copySecretsFromOther(@Nullable T sourcePipeline, T targetPipeline, com.fasterxml.jackson.databind.ObjectMapper mapper, com.lucidworks.apollo.pipeline.schema.SchemaProcessorFactory schemaProcessorFactory) -
clearRedactionFromPipeline
public static <T extends com.lucidworks.apollo.pipeline.PipelineDefinition<T>> void clearRedactionFromPipeline(T targetPipeline, com.lucidworks.apollo.pipeline.schema.SchemaProcessorFactory schemaProcessorFactory) Traverse a Pipeline's stages and their properties, removing "xXx-Redacted-xXx" as they are found. The pipeline is modified in place This prevents the redacted string from being persisted in cases where the secrets copying or merging have missed any.- Parameters:
targetPipeline-
-