public class Metadata extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Metadata.Builder
The Builder class creates a new Metadata instance from a metadata.json file.
|
| Modifier | Constructor and Description |
|---|---|
|
Metadata() |
protected |
Metadata(Map<String,Resource> resources,
Map<String,String> environment,
Map<String,RuntimeProperty> runtimeProperties)
This constructor is used by the Builder subclass to create a new Metadata instance
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getEnvironment() |
String |
getEnvironmentVariable(String variableName) |
<R extends Resource> |
getResource(String resourceName) |
Map<String,Resource> |
getResources() |
<R extends Resource> |
getResources(Class<R> type) |
String |
getRuntimeParameter(String section,
String name) |
String |
getRuntimeParameter(String section,
String name,
String defaultValue) |
RuntimeProperty |
getRuntimeProperty(String section) |
boolean |
hasSection(String section) |
void |
setRuntimeParameter(String parameter,
String value) |
void |
setRuntimeParameter(String section,
String name,
String value) |
protected Metadata(Map<String,Resource> resources, Map<String,String> environment, Map<String,RuntimeProperty> runtimeProperties)
resources - A map of the GenApp resourcesenvironment - A map of the environment variablesruntimeProperties - A map of RuntimePropertiespublic Metadata()
@Nonnull public <R extends Resource> Collection<R> getResources(Class<R> type)
public boolean hasSection(String section)
@Nullable public RuntimeProperty getRuntimeProperty(String section)
NullPointerException - if section does not exist@Nullable public String getRuntimeParameter(String section, String name)
NullPointerException - if section does not existpublic String getRuntimeParameter(String section, String name, String defaultValue)
Copyright © 2013. All Rights Reserved.