77 product =
"rh-sso".equals(Version.NAME) ? ProductValue.
RHSSO : ProductValue.KEYCLOAK;
80 Properties props =
new Properties();
82 String jbossServerConfigDir = System.getProperty(
"jboss.server.config.dir");
83 if (jbossServerConfigDir != null) {
84 File file =
new File(jbossServerConfigDir,
"profile.properties");
86 props.load(
new FileInputStream(file));
90 if (System.getProperties().containsKey(
"keycloak.profile")) {
91 props.setProperty(
"profile", System.getProperty(
"keycloak.profile"));
94 for (String k : System.getProperties().stringPropertyNames()) {
95 if (k.startsWith(
"keycloak.profile.feature.")) {
96 props.put(k.replace(
"keycloak.profile.feature.",
"feature."), System.getProperty(k));
100 if (props.containsKey(
"profile")) {
101 profile = ProfileValue.valueOf(props.getProperty(
"profile").toUpperCase());
103 profile = ProfileValue.valueOf(Version.DEFAULT_PROFILE.toUpperCase());
109 for (String k : props.stringPropertyNames()) {
110 if (k.startsWith(
"feature.")) {
111 Feature f = Feature.valueOf(k.replace(
"feature.",
"").toUpperCase());
112 if (props.get(k).equals(
"enabled")) {
114 }
else if (props.get(k).equals(
"disabled")) {
119 }
catch (Exception e) {
120 throw new RuntimeException(e);
final ProfileValue profile
Definition: Profile.java:72
final Set< Feature > disabledFeatures
Definition: Profile.java:74
List< Feature > disabled
Definition: Profile.java:61
final ProductValue product
Definition: Profile.java:70
RHSSO
Definition: Profile.java:47
List< Feature > excluded
Definition: Profile.java:49