Class DeploymentSpec


  • class DeploymentSpec
    extends java.lang.Object
    Stores basic common deployment information.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.basyx.vab.protocol.http.server.BaSyxContext context  
      private org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig  
      private java.util.Map<java.lang.String,​BaSyxAasDescriptor> descriptors  
      private de.iip_ecosphere.platform.support.Endpoint endpoint  
      private org.eclipse.basyx.aas.registration.api.IAASRegistry registry  
    • Constructor Summary

      Constructors 
      Constructor Description
      DeploymentSpec()
      Creates a deployment specification without setting the endpoint, context and context configuration, e.g., to set the registry later and to register descriptors.
      DeploymentSpec​(de.iip_ecosphere.platform.support.Endpoint endpoint)
      Creates an unencrypted deployment specification based on a given endpoint, but without setting the registry.
      DeploymentSpec​(de.iip_ecosphere.platform.support.Endpoint endpoint, de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore)
      Creates an deployment specification based on a given endpoint, but without setting the registry.
      DeploymentSpec​(de.iip_ecosphere.platform.support.Endpoint endpoint, java.lang.String docPath)
      Creates an unencrypted deployment specification based on a given endpoint, but without setting the registry.
      DeploymentSpec​(de.iip_ecosphere.platform.support.Endpoint endpoint, java.lang.String docPath, de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore)
      Creates a deployment specification based on a given endpoint, but without setting the registry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) org.eclipse.basyx.vab.protocol.http.server.BaSyxContext getContext()
      Returns the BaSyx context.
      (package private) org.eclipse.basyx.components.configuration.BaSyxContextConfiguration getContextConfiguration()
      Returns the server context configuration.
      (package private) BaSyxAasDescriptor getDescriptor​(java.lang.String idShort)
      Returns a stored descriptor.
      (package private) de.iip_ecosphere.platform.support.Endpoint getEndpoint()
      Returns the endpoint.
      (package private) org.eclipse.basyx.aas.registration.api.IAASRegistry getRegistry()
      Returns the BaSyx registry.
      (package private) void putDescriptor​(java.lang.String idShort, BaSyxAasDescriptor descriptor)
      Adds a descriptor.
      void setAccessControlAllowOrigin​(java.lang.String accessControlAllowOrigin)
      Sets the access control to allow cross origin.
      void setJwtBearerTokenAuthenticationConfiguration​(org.eclipse.basyx.vab.protocol.http.server.JwtBearerTokenAuthenticationConfiguration conf)
      Sets the bearer authentication configuration.
      (package private) void setRegistry​(org.eclipse.basyx.aas.registration.api.IAASRegistry registry)
      Defines the BaSyx registry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • endpoint

        private de.iip_ecosphere.platform.support.Endpoint endpoint
      • contextConfig

        private org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig
      • context

        private org.eclipse.basyx.vab.protocol.http.server.BaSyxContext context
      • registry

        private org.eclipse.basyx.aas.registration.api.IAASRegistry registry
    • Constructor Detail

      • DeploymentSpec

        DeploymentSpec()
        Creates a deployment specification without setting the endpoint, context and context configuration, e.g., to set the registry later and to register descriptors.
      • DeploymentSpec

        DeploymentSpec​(de.iip_ecosphere.platform.support.Endpoint endpoint)
        Creates an unencrypted deployment specification based on a given endpoint, but without setting the registry.
        Parameters:
        endpoint - the endpoint
      • DeploymentSpec

        DeploymentSpec​(de.iip_ecosphere.platform.support.Endpoint endpoint,
                       de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore)
        Creates an deployment specification based on a given endpoint, but without setting the registry. The deployment becomes encrypted if keyPath is not null and the file exists. Otherwise, keyPath and keyPass are ignored.
        Parameters:
        endpoint - the endpoint
        kstore - the key store descriptor, ignored if null
      • DeploymentSpec

        DeploymentSpec​(de.iip_ecosphere.platform.support.Endpoint endpoint,
                       java.lang.String docPath)
        Creates an unencrypted deployment specification based on a given endpoint, but without setting the registry.
        Parameters:
        endpoint - the endpoint
        docPath - the document path, may be empty
      • DeploymentSpec

        DeploymentSpec​(de.iip_ecosphere.platform.support.Endpoint endpoint,
                       java.lang.String docPath,
                       de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore)
        Creates a deployment specification based on a given endpoint, but without setting the registry.
        Parameters:
        endpoint - the endpoint
        docPath - the document path, may be empty
        kstore - the key store descriptor, ignored if null
    • Method Detail

      • setAccessControlAllowOrigin

        public void setAccessControlAllowOrigin​(java.lang.String accessControlAllowOrigin)
        Sets the access control to allow cross origin.
        Parameters:
        accessControlAllowOrigin - the information to be placed in the HTTP header field "Access-Control-Allow-Origin"
      • setJwtBearerTokenAuthenticationConfiguration

        public void setJwtBearerTokenAuthenticationConfiguration​(@Nullable
                                                                 org.eclipse.basyx.vab.protocol.http.server.JwtBearerTokenAuthenticationConfiguration conf)
        Sets the bearer authentication configuration.
        Parameters:
        conf - the bearer authentication configuration
      • getContext

        org.eclipse.basyx.vab.protocol.http.server.BaSyxContext getContext()
        Returns the BaSyx context.
        Returns:
        the BaSyx context
      • getEndpoint

        de.iip_ecosphere.platform.support.Endpoint getEndpoint()
        Returns the endpoint.
        Returns:
        the endpoint
      • getContextConfiguration

        org.eclipse.basyx.components.configuration.BaSyxContextConfiguration getContextConfiguration()
        Returns the server context configuration.
        Returns:
        the context configuration (may be null depending on constructor use)
      • putDescriptor

        void putDescriptor​(java.lang.String idShort,
                           BaSyxAasDescriptor descriptor)
        Adds a descriptor.
        Parameters:
        idShort - the short id of the AAS described by the descriptor
        descriptor - the descriptor
      • getDescriptor

        BaSyxAasDescriptor getDescriptor​(java.lang.String idShort)
        Returns a stored descriptor.
        Parameters:
        idShort - the short id of the AAS/descriptor
        Returns:
        the descriptor (may be null if unknown)
      • getRegistry

        org.eclipse.basyx.aas.registration.api.IAASRegistry getRegistry()
        Returns the BaSyx registry.
        Returns:
        the registry (may be null depending on constructor use)
      • setRegistry

        void setRegistry​(org.eclipse.basyx.aas.registration.api.IAASRegistry registry)
        Defines the BaSyx registry.
        Parameters:
        registry - the registry (may be null depending on constructor use)