Class YmlPropertiesManager
java.lang.Object
org.codehaus.mojo.properties.managers.YmlPropertiesManager
- All Implemented Interfaces:
PropertiesManager
Properties manager using YAML as backand.
-
Field Summary
Fields inherited from interface PropertiesManager
DEFAULT_MANAGER_EXTENSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionflattenYamlToMap(String parentKey, Map<String, Object> yamlMap) booleanisExtensionSupport(String extension) Determinate if manager support resource by file extension.load(InputStream in) Load properties.load(InputStream in, Charset charset) Load properties using the given character set.voidsave(Properties properties, OutputStream out, String comments) Store propertiesvoidsave(Properties properties, OutputStream out, String comments, Charset charset) Store properties using the given character set.toString()
-
Constructor Details
-
YmlPropertiesManager
public YmlPropertiesManager()
-
-
Method Details
-
isExtensionSupport
Description copied from interface:PropertiesManagerDeterminate if manager support resource by file extension.- Specified by:
isExtensionSupportin interfacePropertiesManager- Parameters:
extension- file extension- Returns:
- true if extension is supported
-
load
Description copied from interface:PropertiesManagerLoad properties.- Specified by:
loadin interfacePropertiesManager- Parameters:
in- input stream of properties resource- Returns:
- a properties
- Throws:
IOException- in case of IO problems
-
load
Description copied from interface:PropertiesManagerLoad properties using the given character set.- Specified by:
loadin interfacePropertiesManager- Parameters:
in- input stream of properties resourcecharset- the character set the resource is encoded in- Returns:
- a properties
- Throws:
IOException- in case of IO problems
-
flattenYamlToMap
-
save
Description copied from interface:PropertiesManagerStore properties- Specified by:
savein interfacePropertiesManager- Parameters:
properties- properties to storeout- output stream of properties resourcecomments- a comments added to output resource- Throws:
IOException- in case of IO problems
-
save
public void save(Properties properties, OutputStream out, String comments, Charset charset) throws IOException Description copied from interface:PropertiesManagerStore properties using the given character set.- Specified by:
savein interfacePropertiesManager- Parameters:
properties- properties to storeout- output stream of properties resourcecomments- a comments added to output resourcecharset- the character set to encode the resource in- Throws:
IOException- in case of IO problems
-
toString
-