-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data deprecation & metadata stale (#1399)
Co-authored-by: nikitadementev <[email protected]> Co-authored-by: alexeykozyurov <[email protected]>
- Loading branch information
1 parent
15a2829
commit 002f415
Showing
172 changed files
with
3,909 additions
and
1,206 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
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
...platform-api/src/main/java/org/opendatadiscovery/oddplatform/dto/DataEntityStatusDto.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; | ||
|
||
public enum DataEntityStatusDto { | ||
UNASSIGNED(1, false), | ||
DRAFT(2, true), | ||
STABLE(3, false), | ||
DEPRECATED(4, true), | ||
DELETED(5, false); | ||
|
||
@Getter | ||
private final short id; | ||
@Getter | ||
private final boolean isSwitchable; | ||
|
||
DataEntityStatusDto(final int id, | ||
final boolean isSwitchable) { | ||
this.id = (short) id; | ||
this.isSwitchable = isSwitchable; | ||
} | ||
|
||
private static final Map<Short, DataEntityStatusDto> MAP = Arrays | ||
.stream(DataEntityStatusDto.values()) | ||
.collect(Collectors.toMap(DataEntityStatusDto::getId, identity())); | ||
|
||
public static Optional<DataEntityStatusDto> findById(final short id) { | ||
return Optional.ofNullable(MAP.get(id)); | ||
} | ||
} |
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
8 changes: 8 additions & 0 deletions
8
.../main/java/org/opendatadiscovery/oddplatform/dto/activity/DataEntityStatusUpdatedDto.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,8 @@ | ||
package org.opendatadiscovery.oddplatform.dto.activity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.time.LocalDateTime; | ||
|
||
public record DataEntityStatusUpdatedDto(String status, | ||
@JsonProperty("status_switch_time") LocalDateTime statusSwitchTime) { | ||
} |
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.