Search in sources :

Example 1 with YamlSerializer

use of com.developmentontheedge.be5.metadata.serialization.yaml.YamlSerializer in project be5 by DevelopmentOnTheEdge.

the class Serialization method save.

/**
 * @param project
 * @param root
 * @param format
 * @throws ProjectSaveException
 */
public static void save(final Project project, final Path root) throws ProjectSaveException {
    Objects.requireNonNull(project);
    Objects.requireNonNull(root);
    try {
        new YamlSerializer().serializeProjectTo(project, root);
    } catch (final WriteException e) {
        throw new ProjectSaveException(root, e);
    }
}
Also used : WriteException(com.developmentontheedge.be5.metadata.exception.WriteException) YamlSerializer(com.developmentontheedge.be5.metadata.serialization.yaml.YamlSerializer) ProjectSaveException(com.developmentontheedge.be5.metadata.exception.ProjectSaveException)

Aggregations

ProjectSaveException (com.developmentontheedge.be5.metadata.exception.ProjectSaveException)1 WriteException (com.developmentontheedge.be5.metadata.exception.WriteException)1 YamlSerializer (com.developmentontheedge.be5.metadata.serialization.yaml.YamlSerializer)1