Package org.keycloak.quarkus.runtime
Class Environment
java.lang.Object
org.keycloak.quarkus.runtime.Environment
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic Stringstatic ProfileDo not call this method at runtime.static Stringstatic Stringstatic Stringstatic Stringstatic Pathstatic StringgetKeycloakModeFromProfile(String profile) We want to hide the "profiles" from Quarkus to not make things unnecessarily complicated for users, so this method returns the equivalent launch mode instead.static Optional<AbstractCommand>Get parsed AbstractCommand we obtained from the CLIstatic StringgetProfileOrDefault(String defaultProfile) static Pathstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanisParsedCommand(String commandName) static Booleanstatic booleanstatic booleanstatic Booleanstatic booleanstatic booleanstatic voidsetHomeDir(Path path) static voidsetParsedCommand(AbstractCommand command) static voidsetProfile(String profile)
-
Field Details
-
NON_SERVER_MODE
- See Also:
-
PROFILE
- See Also:
-
ENV_PROFILE
- See Also:
-
DATA_PATH
-
DEFAULT_THEMES_PATH
-
PROD_PROFILE_VALUE
- See Also:
-
LAUNCH_MODE
- See Also:
-
-
Method Details
-
isRebuild
-
isRuntimeMode
-
getHomeDir
-
getHomePath
-
getDataDir
-
getDefaultThemeRootDir
-
getProvidersPath
-
getCommand
-
setProfile
-
getCurrentOrPersistedProfile
-
getProfileOrDefault
-
isDevMode
public static boolean isDevMode() -
isDevProfile
public static boolean isDevProfile() -
isNonServerMode
public static boolean isNonServerMode() -
isWindows
public static boolean isWindows() -
forceDevProfile
public static void forceDevProfile() -
getProviderFiles
-
isTestLaunchMode
public static boolean isTestLaunchMode() -
forceTestLaunchMode
public static void forceTestLaunchMode() -
getKeycloakModeFromProfile
We want to hide the "profiles" from Quarkus to not make things unnecessarily complicated for users, so this method returns the equivalent launch mode instead. For use in e.g. CLI Output.- Parameters:
profile- the internal profile string used- Returns:
- the mapped launch mode, none when nothing is given or the profile as is when its neither null/empty nor matching the quarkus default profiles we use.
-
isDistribution
public static boolean isDistribution() -
isRebuildCheck
public static boolean isRebuildCheck() -
isRebuilt
public static boolean isRebuilt() -
setHomeDir
-
getCurrentOrCreateFeatureProfile
Do not call this method at runtime. The method is marked assynchronizedbecause build steps are executed in parallel.- Returns:
- the current feature profile instance
-
getParsedCommand
Get parsed AbstractCommand we obtained from the CLI -
isParsedCommand
-
setParsedCommand
-