Class YamlArtifact
java.lang.Object
de.iip_ecosphere.platform.services.environment.AbstractYamlArtifact
de.iip_ecosphere.platform.services.spring.yaml.YamlArtifact
- All Implemented Interfaces:
Artifact
public class YamlArtifact
extends de.iip_ecosphere.platform.services.environment.AbstractYamlArtifact
implements Artifact
Information about an artifact containing services. The artifact is to be deployed. We assume that the underlying
yaml file is generated, i.e., repeated information such as relations can be consistently specified.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the contained server specifications.Returns the contained services.getTypes()Returns the declared types.static YamlArtifactReads anYamlArtifactfrom a YAML input stream.voidsetServers(List<YamlServer> servers) Sets the servers specification instances.voidsetServices(List<YamlService> services) Sets the service instances.voidSets the declared types.Methods inherited from class de.iip_ecosphere.platform.services.environment.AbstractYamlArtifact
getApplication, getId, getName, getVersion, setApplication, setId, setName, setVersionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Artifact
getId, getName, getVersion
-
Field Details
-
services
-
types
-
servers
-
-
Constructor Details
-
YamlArtifact
public YamlArtifact()
-
-
Method Details
-
getServices
Description copied from interface:ArtifactReturns the contained services.- Specified by:
getServicesin interfaceArtifact- Returns:
- the services
-
getTypes
Description copied from interface:ArtifactReturns the declared types. -
setTypes
Sets the declared types. [required by SnakeYaml]- Parameters:
types- the types
-
setServices
Sets the service instances. [required by SnakeYaml]- Parameters:
services- the services
-
readFromYaml
Reads anYamlArtifactfrom a YAML input stream. The returned artifact may be invalid. UseValidatorto test the returned instance for validity.- Parameters:
in- the input stream (may be null)- Returns:
- the artifact info
- Throws:
IOException- if reading the Yaml file fails
-
getServers
Description copied from interface:ArtifactReturns the contained server specifications.- Specified by:
getServersin interfaceArtifact- Returns:
- the server specifications
-
setServers
Sets the servers specification instances. [required by SnakeYaml]- Parameters:
servers- the servers
-