Class SplibThymeleafPropertiesUtil
java.lang.Object
jp.ecuacion.splib.web.util.SplibThymeleafPropertiesUtil
Offers access to application[...].properties. It's supposed to called from thymeleaf.
It calls PropertyFileUtil inside.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLoginStateDependentValueOrElse(String loginState, String key, String defaultValue) Returns loginState dependent value.Returns value from the argument key.getValueOrElse(String key, String defaultValue) Returns value from the argument key or defaultValue when the key does not exist in application[...].properties.booleanReturns a boolean whether application[...].properties has the argument key.
-
Constructor Details
-
SplibThymeleafPropertiesUtil
public SplibThymeleafPropertiesUtil()Constructs a new instance.
-
-
Method Details
-
hasKey
Returns a boolean whether application[...].properties has the argument key.- Parameters:
key- key- Returns:
- boolean
-
getValue
-
getValueOrElse
-
getLoginStateDependentValueOrElse
Returns loginState dependent value.When you set 'test.key1' to "key" argument, it recognize 'test.key1' as a default key, 'test.key1-account' for account loginState and 'test.key1-admin' for admin loginState.
- Parameters:
loginState- loginStatekey- keydefaultValue- defaultValue- Returns:
- value
-