Class 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 Detail

      • services

        private java.util.List<YamlService> services
      • types

        private java.util.List<YamlType> types
      • servers

        private java.util.List<YamlServer> servers
    • Constructor Detail

      • YamlArtifact

        public YamlArtifact()
    • Method Detail

      • getServices

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

        public java.util.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​(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 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:
        java.io.IOException - if reading the Yaml file fails
      • getServers

        public java.util.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​(java.util.List<YamlServer> servers)
        Sets the servers specification instances. [required by SnakeYaml]
        Parameters:
        servers - the servers