This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88c756e
commit 519a106
Showing
22 changed files
with
920 additions
and
22 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
parodos-model-api/src/main/java/com/redhat/parodos/workflow/enums/LogType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.redhat.parodos.workflow.enums; | ||
|
||
import lombok.Getter; | ||
|
||
public enum LogType { | ||
|
||
TEXT(""), INFO("\u001B[32m"), WARNING("\u001B[33m"), ERROR("\u001B[34m"), END("\u001B[39m"); | ||
|
||
// Ansi code | ||
@Getter | ||
private final String code; | ||
|
||
LogType(String code) { | ||
this.code = code; | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
parodos-model-api/src/main/java/com/redhat/parodos/workflow/log/WorkFlowLogService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.redhat.parodos.workflow.log; | ||
|
||
import java.util.UUID; | ||
|
||
public interface WorkFlowLogService { | ||
|
||
String getLog(UUID workflowExecutionId, String taskName); | ||
|
||
void writeLog(UUID workflowExecutionId, String taskName, WorkFlowTaskLog log); | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
parodos-model-api/src/main/java/com/redhat/parodos/workflow/log/WorkFlowTaskLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.redhat.parodos.workflow.log; | ||
|
||
import com.redhat.parodos.workflow.enums.LogType; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class WorkFlowTaskLog { | ||
|
||
private String logText; | ||
|
||
private LogType logType = LogType.TEXT; | ||
|
||
@Override | ||
public String toString() { | ||
return logType.getCode() + logText + (logType.getCode().isEmpty() ? "" : LogType.END.getCode()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.