forked from open-feature/java-sdk-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! feat: Update in-process resolver to support flag metadata open…
…-feature#1102 Signed-off-by: christian.lutnik <[email protected]>
- Loading branch information
Showing
11 changed files
with
222 additions
and
76 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
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
22 changes: 22 additions & 0 deletions
22
...in/java/dev/openfeature/contrib/providers/flagd/resolver/process/model/ParsingResult.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,22 @@ | ||
package dev.openfeature.contrib.providers.flagd.resolver.process.model; | ||
|
||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; | ||
import java.util.Map; | ||
import lombok.Getter; | ||
|
||
/** | ||
* The result of the parsing of a json string containing feature flag definitions. | ||
*/ | ||
@Getter | ||
@SuppressFBWarnings( | ||
value = {"EI_EXPOSE_REP"}, | ||
justification = "Feature flag comes as a Json configuration, hence they must be exposed") | ||
public class ParsingResult { | ||
private final Map<String, FeatureFlag> flags; | ||
private final Map<String, Object> globalFlagMetadata; | ||
|
||
public ParsingResult(Map<String, FeatureFlag> flags, Map<String, Object> globalFlagMetadata) { | ||
this.flags = flags; | ||
this.globalFlagMetadata = globalFlagMetadata; | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
.../dev/openfeature/contrib/providers/flagd/resolver/process/storage/StorageQueryResult.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 dev.openfeature.contrib.providers.flagd.resolver.process.storage; | ||
|
||
import dev.openfeature.contrib.providers.flagd.resolver.process.model.FeatureFlag; | ||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; | ||
import java.util.Map; | ||
import lombok.Getter; | ||
|
||
/** | ||
* To be returned by the storage when a flag is queried. Contains the flag (iff a flag associated with the given key | ||
* exists, null otherwise) and global flag metadata | ||
*/ | ||
@Getter | ||
@SuppressFBWarnings( | ||
value = {"EI_EXPOSE_REP"}, | ||
justification = "The storage provides access to both feature flags and global metadata") | ||
public class StorageQueryResult { | ||
private final FeatureFlag featureFlag; | ||
private final Map<String, Object> globalFlagMetadata; | ||
|
||
public StorageQueryResult(FeatureFlag featureFlag, Map<String, Object> globalFlagMetadata) { | ||
this.featureFlag = featureFlag; | ||
this.globalFlagMetadata = globalFlagMetadata; | ||
} | ||
} |
Oops, something went wrong.