Search in sources :

Example 1 with StageExecutor

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());
    }
}
Also used : JsonSerializableExecutor(pipelite.executor.JsonSerializableExecutor) StageEntity(pipelite.entity.StageEntity) StageExecutor(pipelite.stage.executor.StageExecutor)

Aggregations

StageEntity (pipelite.entity.StageEntity)1 JsonSerializableExecutor (pipelite.executor.JsonSerializableExecutor)1 StageExecutor (pipelite.stage.executor.StageExecutor)1