Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support additonal FF and entitlements (ConfigurationResult) #94

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

public enum AppFlags {
UPLOAD_SCA_LOGS("UPLOAD_SCA_LOGS"),
ASYNC_CHECK_POLICIES_ENABLED("ASYNC_CHECK_POLICIES_ENABLED");


ASYNC_CHECK_POLICIES_ENABLED("ASYNC_CHECK_POLICIES_ENABLED"),
SBT_SUPPORT_ENABLED("SBT_SUPPORT_ENABLED"),
AI_BOM_SUPPORT_ENABLED("AI_BOM_SUPPORT_ENABLED"),
SWIFT_SUPPORT_ENABLED("SWIFT_SUPPORT_ENABLED"),
REACHABILITY_SUPPORT_ENABLED("REACHABILITY_SUPPORT_ENABLED"),
REACHABILITY_SUPPORT_LANGUAGES("REACHABILITY_SUPPORT_LANGUAGES");
private final String value;

AppFlags(String value) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.whitesource.agent.api.dispatch;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -36,11 +38,15 @@ public class ConfigurationResult extends BaseResult {
private FsaConfiguration fsaConfiguration;

private Map<AppFlags, Object> flags;

private Collection<EntitlementType> entitlements;

/* --- Constructors --- */

public ConfigurationResult() {
fsaConfiguration = new FsaConfiguration();
flags = new HashMap<>();
entitlements = new ArrayList<>();
}

public ConfigurationResult(boolean checkPolicies, boolean forceCheckAllDependencies, boolean forceUpdate, String includes,
Expand Down Expand Up @@ -174,8 +180,16 @@ public void setFsaConfiguration(FsaConfiguration fsaConfiguration) {
public void setFlags(Map<AppFlags, Object> flags) {
this.flags = flags;
}

public Map<AppFlags, Object> getFlags() {
return this.flags;
}

public Collection<EntitlementType> getEntitlements() {
return entitlements;
}

public void setEntitlements(Collection<EntitlementType> entitlements) {
this.entitlements = entitlements;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.whitesource.agent.api.dispatch;

public enum EntitlementType {
CORE("CORE"),
API_1("API_1"),
API_2("API_2"),
ESSENTIALS("ESSENTIALS"),
SCA("SCA"),
SAST("SAST"),
CN("CN"),
LLM("LLM"),
IMG("IMG"),
IAC("IAC"),
CONTAINER_SECURITY("CONTAINER_SECURITY");

ChenLuigi marked this conversation as resolved.
Show resolved Hide resolved
private final String value;

EntitlementType(String value) {
this.value = value;
}

public String getValue() {
return value;
}
}