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 Details

  • Constructor Details

    • YamlArtifact

      public YamlArtifact()
  • Method Details

    • getServices

      public List<YamlService> getServices()
      Description copied from interface: Artifact
      Returns the contained services.
      Specified by:
      getServices in interface Artifact
      Returns:
      the services
    • getTypes

      public List<YamlType> getTypes()
      Description copied from interface: Artifact
      Returns the declared types.
      Specified by:
      getTypes in interface Artifact
      Returns:
      the types
    • setTypes

      public void setTypes(List<YamlType> types)
      Sets the declared types. [required by SnakeYaml]
      Parameters:
      types - the types
    • setServices

      public void setServices(List<YamlService> services)
      Sets the service instances. [required by SnakeYaml]
      Parameters:
      services - the services
    • readFromYaml

      public static YamlArtifact readFromYaml(InputStream in) throws IOException
      Reads an YamlArtifact from a YAML input stream. The returned artifact may be invalid. Use Validator to 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

      public List<YamlServer> getServers()
      Description copied from interface: Artifact
      Returns the contained server specifications.
      Specified by:
      getServers in interface Artifact
      Returns:
      the server specifications
    • setServers

      public void setServers(List<YamlServer> servers)
      Sets the servers specification instances. [required by SnakeYaml]
      Parameters:
      servers - the servers