Class ConfigRetriever
- java.lang.Object
-
- fish.payara.security.identitystores.ConfigRetriever
-
public class ConfigRetriever extends Object
Class to retrieve value from config whether Microprofile, Payara/glassfish, EL, or a raw value. In that order.- Author:
- Mark Wareham
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
resolveConfigAttribute(String expression, String microProfileConfigKey)
Grabs the config value regardless of where it's stored.static String
resolveConfigAttribute(String attribute, String expression, String microProfileConfigKey)
Grabs the config value regardless of where it's stored.
-
-
-
Method Detail
-
resolveConfigAttribute
public static String resolveConfigAttribute(String expression, String microProfileConfigKey)
Grabs the config value regardless of where it's stored. Should a microprofile config exist, that will be returned as top priority. Otherwise returns the value translated from one of - payara/glassfish config ${} - EL #{} - raw. Returns the value given if none of the above exist.- Parameters:
expression
- the expression you are looking formicroProfileConfigKey
- a microprofile key.- Returns:
- a config value.
-
resolveConfigAttribute
public static String resolveConfigAttribute(String attribute, String expression, String microProfileConfigKey)
Grabs the config value regardless of where it's stored. Accounts for overriding expression parameters Should a microprofile config exist, that will be returned as top priority. Otherwise returns the value translated from one of - payara/glassfish config ${} - EL #{} - raw. Returns the value given if none of the above exist.- Parameters:
attribute
- the attribute value to fall back on if there's no value expression parammicroProfileConfigKey
- a microprofile key.expression
- the expression you are looking for- Returns:
- a config value.
-
-