
com.centurylink.mdw.model.project.ProjectMeta Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mdw-common Show documentation
Show all versions of mdw-common Show documentation
MDW is a microservices based workflow framework
package com.centurylink.mdw.model.project;
import com.centurylink.mdw.yaml.YamlLoader;
import java.io.IOException;
import java.util.Map;
/**
* Info from project.yaml.
* TODO: base data, which should be available at runtime
*/
public class ProjectMeta {
private String mdwVersion;
public String getMdwVersion() { return mdwVersion; }
private String assetLocation;
public String getAssetLocation() { return assetLocation; }
private String configLocation;
public String getConfigLocation() { return configLocation; }
public ProjectMeta(byte[] yaml) throws IOException {
YamlLoader loader = new YamlLoader(new String(yaml));
Map,?> top = (Map,?>)loader.getTop();
Map,?> mdw = loader.getMap("mdw", top);
if (mdw != null)
mdwVersion = (String)mdw.get("version");
Map,?> asset = loader.getMap("asset", top);
if (asset != null)
assetLocation = (String)asset.get("location");
Map,?> config = loader.getMap("config", top);
if (config != null)
configLocation = (String)config.get("location");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy