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 Modifier and Type Field Description private java.util.List<YamlServer>serversprivate java.util.List<YamlService>servicesprivate java.util.List<YamlType>types
-
Constructor Summary
Constructors Constructor Description YamlArtifact()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<YamlServer>getServers()Returns the contained server specifications.java.util.List<YamlService>getServices()Returns the contained services.java.util.List<YamlType>getTypes()Returns the declared types.static YamlArtifactreadFromYaml(java.io.InputStream in)Reads anYamlArtifactfrom a YAML input stream.voidsetServers(java.util.List<YamlServer> servers)Sets the servers specification instances.voidsetServices(java.util.List<YamlService> services)Sets the service instances.voidsetTypes(java.util.List<YamlType> types)Sets the declared types.-
Methods inherited from class de.iip_ecosphere.platform.services.environment.AbstractYamlArtifact
getApplication, getId, getName, getVersion, setApplication, setId, setName, setVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Artifact
getId, getName, getVersion
-
-
-
-
Field Detail
-
services
private java.util.List<YamlService> services
-
types
private java.util.List<YamlType> types
-
servers
private java.util.List<YamlServer> servers
-
-
Method Detail
-
getServices
public java.util.List<YamlService> getServices()
Description copied from interface:ArtifactReturns the contained services.- Specified by:
getServicesin interfaceArtifact- Returns:
- the services
-
getTypes
public java.util.List<YamlType> getTypes()
Description copied from interface:ArtifactReturns the declared types.
-
setTypes
public void setTypes(java.util.List<YamlType> types)
Sets the declared types. [required by SnakeYaml]- Parameters:
types- the types
-
setServices
public void setServices(java.util.List<YamlService> services)
Sets the service instances. [required by SnakeYaml]- Parameters:
services- the services
-
readFromYaml
public static YamlArtifact readFromYaml(java.io.InputStream in) throws java.io.IOException
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:
java.io.IOException- if reading the Yaml file fails
-
getServers
public java.util.List<YamlServer> getServers()
Description copied from interface:ArtifactReturns the contained server specifications.- Specified by:
getServersin interfaceArtifact- Returns:
- the server specifications
-
setServers
public void setServers(java.util.List<YamlServer> servers)
Sets the servers specification instances. [required by SnakeYaml]- Parameters:
servers- the servers
-
-