use of pipelite.stage.executor.StageExecutor in project pipelite by enasequence.
the class StageService method prepareSaveStage.
public static void prepareSaveStage(Stage stage) {
StageExecutor stageExecutor = stage.getExecutor();
StageEntity stageEntity = stage.getStageEntity();
stageEntity.setExecutorName(stageExecutor.getClass().getName());
if (stageExecutor instanceof JsonSerializableExecutor) {
stageEntity.setExecutorData(((JsonSerializableExecutor) stageExecutor).serialize());
}
if (stageExecutor.getExecutorParams() != null) {
stageEntity.setExecutorParams(stageExecutor.getExecutorParams().serialize());
}
}
Aggregations