Package io.vertigo.core.param
Interface ParamManager
- All Superinterfaces:
Component,CoreComponent,Manager
- All Known Implementing Classes:
ParamManagerImpl
Manager interface for application configuration.
The configuration consists of a list of parameters, each identified by a name.
Parameter names are camelCase and contain only letters and digits, with dots as separators.
The parameters can be of three types:
- boolean
- String
- int
Example in JSON:
{
"server.host" : "wiki",
"server.port" : "5455",
"maxUsers" :"10"
}
Example usage:
getStringValue("server.host") // Returns "wiki"
getStringValue("host") // Throws an error
- See Also:
-
Method Summary
-
Method Details
-
getParam
Returns the value for a parameter identified by its name.- Parameters:
paramName- the name of the parameter- Returns:
- the value of the parameter
-
getOptionalParam
Returns the optional value for a parameter, which may be present or not, identified by its name.- Parameters:
paramName- the name of the parameter- Returns:
- the optional value of the parameter
-