Commit bda64f97 authored by devesh bajpai's avatar devesh bajpai
Browse files

Update AutomationConstants.java

parent d77ff1ae
Pipeline #37757 failed with stages
in 49 seconds
package org.opengroup.osdu.wks.model;
import java.util.Arrays;
import java.util.List;
public class AutomationConstants {
public static final String CONTENT_TYPE = "Content-Type";
public static final String DATA_PARTITION_ID = "data-partition-id";
public static final String AUTHORIZATION = "Authorization";
public static final String ON_BEHALF_OF = "on-behalf-of";
public static final String CORRELATION_ID = "correlation-id";
public static final String APPLICATION_JSON = "application/json";
public static final String WKS_KIND = "wks";
public static final String APP_KEY = "AppKey";
public static final String DATA_PARTITION_ID_VALUE = System.getProperty("DATA_PARTITION_ID", System.getenv("DATA_PARTITION_ID")); // "opendes";
public static final String POST_SCHEMA_ENDPOINT = "/schema";
public static final String POST_ENDPOINT = "/records";
public static final String GET_ENDPOINT = "/records/";
public static final String DELETE_ENDPOINT = "/records/";
public static final long RECORD_SEARCH_MAX_TIMEOUT_SEC = 60;
public static final String RECORD_CREATED = "201";
public static final String REQUEST_SUCCESS = "200";
public static final String REQUEST_SUCCESS_NO_CONTENT = "204";
public static final String RECORD_NOT_FOUND = "404";
public static final String COLON_SEPARATOR = ":";
public static final String DASH = "-";
public static final String POINT = ".";
public static final String OS_TARGET_SCHEMA_KIND_TENANT = getEnvironmentVariableOrDefaultValue("OS_TARGET_SCHEMA_KIND_TENANT", "slb:wks:wellbore:1.4.0");
public static final String OS_TARGET_SCHEMA_KIND = getEnvironmentVariableOrDefaultValue("OS_TARGET_SCHEMA_KIND", "slb:wks:wellbore:1.3.1");
public static final List<String> OS_TARGET_SCHEMA_KIND_IHS = Arrays.asList("slb:wks:log:2.3.1", "abc:wks:log:3.2.1");
public static final List<String> OS_TARGET_SCHEMA_KIND_OGA = Arrays.asList("slb:wks:well:4.3.1", "slb:wks:well:5.1.0", "abc:wks:well:1.5.1");
public static final List<String> OS_TARGET_SCHEMA_KIND_IHS_WELL = Arrays.asList("abc:wks:log:3.2.1", "slb:wks:log:2.3.1", "slb:wks:well:2.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_IHS_WELLBORE = Arrays.asList("abc:wks:log:3.2.1", "npl:wks:log:2.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_PETREL_WELL = Arrays.asList("slb:wks:well:1.0.0", "abc:wks:well:1.5.1", "slb:wks:wellbore:1.0.0", "slb:wks:well:4.3.1");
public static final List<String> OS_TARGET_SCHEMA_KIND_AT_LOG = Arrays.asList("slb:wks:log:1.0.0", "abc:wks:log:1.0.7", "slb:wks:well:1.0.0", "slb:wks:log:4.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_AT_WELL = Arrays.asList("slb:wks:well:1.0.0", "slb:wks:wellbore:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_OGA_LOG = Arrays.asList("slb:wks:log:1.0.0", "slb:wks:well:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_PETREL_WELLSET = Arrays.asList("slb:wks:wellset:1.0.0", "slb:wks:wellbore:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_AT_LOGSET = Arrays.asList("slb:wks:logset:1.0.0", "slb:wks:well:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_PETREL_WELLSET1 = Arrays.asList("slb:wks:well:1.0.0", "abc:wks:well:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_AT_LOGSET1 = Arrays.asList("slb:wks:log:1.0.0", "abc:wks:log:1.0.0");
public static final long INDEXING_TIMEOUT = 60;
public static final String TENANT_NAME_PLACEHOLDER = "<tenant_name>";
public static final String ACL_VIEWERS_GROUP = "<acl_viewers>";
public static final String ACL_OWNERS_GROUP = "<acl_owners>";
public static final String CLOUD_DOMAIN = "<cloud_domain>";
public static final String LEGAL_TAGS = "<legal_tags>";
public static final String RECORD_ID = "<record_id.>";
public static final String TENANT_NAME_PLACEHOLDER_VALUE = System.getProperty("TENANT_NAME",
System.getenv("TENANT_NAME"));
public static final String ACL_VIEWERS_GROUP_VALUE = System.getProperty("ACL_VIEWERS",
System.getenv("ACL_VIEWERS"));
public static final String ACL_OWNERS_GROUP_VALUE = System.getProperty("ACL_OWNERS", System.getenv("ACL_OWNERS"));
public static final String CLOUD_DOMAIN_VALUE = System.getProperty("DOMAIN", System.getenv("DOMAIN"));
public static final String LEGAL_TAGS_VALUE = System.getProperty("LEGAL_TAG", System.getenv("LEGAL_TAG"));
public static final String SCHEMA_URL = System.getProperty("HOST", System.getenv("HOST")) + "/api/schema-service/v1";
private static String getEnvironmentVariableOrDefaultValue(String key, String defaultValue) {
String environmentVariable = System.getProperty(key, System.getenv(key));
if (environmentVariable == null) {
environmentVariable = defaultValue;
}
return environmentVariable;
}
}
package org.opengroup.osdu.wks.model;
import java.util.Arrays;
import java.util.List;
public class AutomationConstants {
public static final String CONTENT_TYPE = "Content-Type";
public static final String DATA_PARTITION_ID = "data-partition-id";
public static final String AUTHORIZATION = "Authorization";
public static final String ON_BEHALF_OF = "on-behalf-of";
public static final String CORRELATION_ID = "correlation-id";
public static final String APPLICATION_JSON = "application/json";
public static final String WKS_KIND = "wks";
public static final String APP_KEY = "AppKey";
public static final String DATA_PARTITION_ID_VALUE = System.getProperty("DATA_PARTITION_ID", System.getenv("DATA_PARTITION_ID")); // "opendes";
public static final String POST_SCHEMA_ENDPOINT = "/schema";
public static final String POST_ENDPOINT = "/records";
public static final String GET_ENDPOINT = "/records/";
public static final String DELETE_ENDPOINT = "/records/";
public static final long RECORD_SEARCH_MAX_TIMEOUT_SEC = 60;
public static final String RECORD_CREATED = "201";
public static final String REQUEST_SUCCESS = "200";
public static final String REQUEST_SUCCESS_NO_CONTENT = "204";
public static final String RECORD_NOT_FOUND = "404";
public static final String COLON_SEPARATOR = ":";
public static final String DASH = "-";
public static final String POINT = ".";
public static final String OS_TARGET_SCHEMA_KIND_TENANT = getEnvironmentVariableOrDefaultValue("OS_TARGET_SCHEMA_KIND_TENANT", "opendes:wks:wellbore:1.3.1");
public static final String OS_TARGET_SCHEMA_KIND = getEnvironmentVariableOrDefaultValue("OS_TARGET_SCHEMA_KIND", "slb:wks:wellbore:1.3.1");
public static final List<String> OS_TARGET_SCHEMA_KIND_IHS = Arrays.asList("slb:wks:log:2.3.1", "abc:wks:log:3.2.1");
public static final List<String> OS_TARGET_SCHEMA_KIND_OGA = Arrays.asList("slb:wks:well:4.3.1", "slb:wks:well:5.1.0", "abc:wks:well:1.5.1");
public static final List<String> OS_TARGET_SCHEMA_KIND_IHS_WELL = Arrays.asList("abc:wks:log:3.2.1", "slb:wks:log:2.3.1", "slb:wks:well:2.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_IHS_WELLBORE = Arrays.asList("abc:wks:log:3.2.1", "npl:wks:log:2.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_PETREL_WELL = Arrays.asList("slb:wks:well:1.0.0", "abc:wks:well:1.5.1", "slb:wks:wellbore:1.0.0", "slb:wks:well:4.3.1");
public static final List<String> OS_TARGET_SCHEMA_KIND_AT_LOG = Arrays.asList("slb:wks:log:1.0.0", "abc:wks:log:1.0.7", "slb:wks:well:1.0.0", "slb:wks:log:4.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_AT_WELL = Arrays.asList("slb:wks:well:1.0.0", "slb:wks:wellbore:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_OGA_LOG = Arrays.asList("slb:wks:log:1.0.0", "slb:wks:well:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_PETREL_WELLSET = Arrays.asList("slb:wks:wellset:1.0.0", "slb:wks:wellbore:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_AT_LOGSET = Arrays.asList("slb:wks:logset:1.0.0", "slb:wks:well:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_PETREL_WELLSET1 = Arrays.asList("slb:wks:well:1.0.0", "abc:wks:well:1.0.0");
public static final List<String> OS_TARGET_SCHEMA_KIND_AT_LOGSET1 = Arrays.asList("slb:wks:log:1.0.0", "abc:wks:log:1.0.0");
public static final long INDEXING_TIMEOUT = 60;
public static final String TENANT_NAME_PLACEHOLDER = "<tenant_name>";
public static final String ACL_VIEWERS_GROUP = "<acl_viewers>";
public static final String ACL_OWNERS_GROUP = "<acl_owners>";
public static final String CLOUD_DOMAIN = "<cloud_domain>";
public static final String LEGAL_TAGS = "<legal_tags>";
public static final String RECORD_ID = "<record_id.>";
public static final String TENANT_NAME_PLACEHOLDER_VALUE = System.getProperty("TENANT_NAME",
System.getenv("TENANT_NAME"));
public static final String ACL_VIEWERS_GROUP_VALUE = System.getProperty("ACL_VIEWERS",
System.getenv("ACL_VIEWERS"));
public static final String ACL_OWNERS_GROUP_VALUE = System.getProperty("ACL_OWNERS", System.getenv("ACL_OWNERS"));
public static final String CLOUD_DOMAIN_VALUE = System.getProperty("DOMAIN", System.getenv("DOMAIN"));
public static final String LEGAL_TAGS_VALUE = System.getProperty("LEGAL_TAG", System.getenv("LEGAL_TAG"));
public static final String SCHEMA_URL = System.getProperty("HOST", System.getenv("HOST")) + "/api/schema-service/v1";
private static String getEnvironmentVariableOrDefaultValue(String key, String defaultValue) {
String environmentVariable = System.getProperty(key, System.getenv(key));
if (environmentVariable == null) {
environmentVariable = defaultValue;
}
return environmentVariable;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment