-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1623 - added additional filterState last_runs_statuses, created API f…
…or generating SearchFacetsData
- Loading branch information
Showing
14 changed files
with
393 additions
and
68 deletions.
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
...m-api/src/main/java/org/opendatadiscovery/oddplatform/dto/DataEntityTaskRunStatusDto.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,36 @@ | ||
package org.opendatadiscovery.oddplatform.dto; | ||
|
||
import java.util.Arrays; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
import java.util.stream.Collectors; | ||
import lombok.Getter; | ||
|
||
import static java.util.function.Function.identity; | ||
|
||
@Getter | ||
public enum DataEntityTaskRunStatusDto { | ||
SUCCESS(1, "SUCCESS"), | ||
FAILED(2, "FAILED"), | ||
SKIPPED(3, "SKIPPED"), | ||
BROKEN(4, "BROKEN"), | ||
ABORTED(5, "ABORTED"), | ||
UNKNOWN(6, "UNKNOWN"); | ||
|
||
private final short id; | ||
private final String status; | ||
|
||
DataEntityTaskRunStatusDto(final int id, | ||
final String status) { | ||
this.id = (short) id; | ||
this.status = status; | ||
} | ||
|
||
private static final Map<String, DataEntityTaskRunStatusDto> MAP = Arrays | ||
.stream(DataEntityTaskRunStatusDto.values()) | ||
.collect(Collectors.toMap(DataEntityTaskRunStatusDto::getStatus, identity())); | ||
|
||
public static Optional<DataEntityTaskRunStatusDto> findByStatus(final String status) { | ||
return Optional.ofNullable(MAP.get(status)); | ||
} | ||
} |
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.