Class ServiceConfiguration
java.lang.Object
org.gcube.informationsystem.resourceregistry.configuration.ServiceConfiguration
The configuration of the service, read from "service.yaml" in
WEB-INF/classes.
The file is a YAML mapping of sections (database, redis), each a mapping of
keys to scalar values. Every value is read as its string form, so a quoted and an unquoted
scalar give the same value. A missing file is an error.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
FILENAME
Name of the configuration file of the service, on the classpath.- See Also:
-
-
Constructor Details
-
ServiceConfiguration
public ServiceConfiguration()Reads "service.yaml" from the classpath.- Throws:
IllegalStateException- if the file is missing or is not a mapping of sections
-
-
Method Details
-
section
Returns a section of the configuration.- Parameters:
name- the name of the section- Returns:
- its keys and values, or
nullwhen the file has no such section
-