Skip to content

Commit

Permalink
Merge pull request #12 from statisticsnorway/change-variable-name-sna…
Browse files Browse the repository at this point in the history
…pshot

Change SID catalogue variable to "SNAPSHOT_DATE"
  • Loading branch information
mallport authored Oct 12, 2023
2 parents 98083f5 + 4e52d1e commit dc200e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>no.ssb.dapla.dlp.pseudo.func</groupId>
<artifactId>dapla-dlp-pseudo-func</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.6-SNAPSHOT</version>
<name>dapla-dlp-pseudo-func</name>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
@Builder
public class MapFuncConfig {
private final String context;
private final String versionTimestamp;
private final String snapshotDate;

@UtilityClass
public static class Param {
public static final String CONTEXT = "context";
public static final String VERSION_TIMESTAMP = "versionTimestamp";
public static final String SNAPSHOT_DATE = "snapshotDate";
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package no.ssb.dapla.dlp.pseudo.func.map;
import no.ssb.dapla.dlp.pseudo.func.PseudoFuncConfig;
import static no.ssb.dapla.dlp.pseudo.func.map.MapFuncConfig.Param.VERSION_TIMESTAMP;
import static no.ssb.dapla.dlp.pseudo.func.map.MapFuncConfig.Param.SNAPSHOT_DATE;

public class MapFuncConfigService {
public MapFuncConfig resolve(PseudoFuncConfig genericConfig) {
String context = genericConfig.getRequired(MapFuncConfig.Param.CONTEXT, String.class);

return MapFuncConfig.builder()
.versionTimestamp(genericConfig.get(VERSION_TIMESTAMP, String.class).orElse(null))
.snapshotDate(genericConfig.get(SNAPSHOT_DATE, String.class).orElse(null))
.context(context)
.build();
}
Expand Down

0 comments on commit dc200e7

Please sign in to comment.