Class ContainerConfiguration

java.lang.Object
org.gcube.smartgears.configuration.container.ContainerConfiguration

public class ContainerConfiguration extends Object
The configuration of the container.
Author:
Fabio Simeoni, Luca Frosini (ISTI-CNR)
  • Constructor Details

    • ContainerConfiguration

      public ContainerConfiguration()
  • Method Details

    • setBaseConfiguration

      protected void setBaseConfiguration(BaseConfiguration baseConfiguration)
      Sets the base configuration.
      Parameters:
      baseConfiguration - the base configuration to set
    • setProperties

      protected void setProperties(Map<String,String> properties)
      Sets the configuration properties.
      Parameters:
      properties - the properties to set
    • setSite

      protected void setSite(Site site)
      Sets the site configuration.
      Parameters:
      site - the site to set
    • setProxy

      protected void setProxy(ProxyAddress proxy)
      Sets the proxy configuration.
      Parameters:
      proxy - the proxy to set
    • setAccountingFallbackLocation

      protected void setAccountingFallbackLocation(String accountingFallbackLocation)
      Sets the accounting fallback location.
      Parameters:
      accountingFallbackLocation - the accounting fallback location to set
    • setPersistenceConfiguration

      protected void setPersistenceConfiguration(PersistenceConfiguration persistenceConfiguration)
      Sets the persistence configuration.
      Parameters:
      persistenceConfiguration - the persistence configuration to set
    • setAuthorizationProviderConfiguration

      protected void setAuthorizationProviderConfiguration(AuthorizationProviderConfiguration authorizationConfiguration)
      Sets the authorization provider configuration.
      Parameters:
      authorizationConfiguration - the authorization configuration to set
    • setApps

      public void setApps(List<ApplicationConfiguration> apps)
      Sets the application configurations.
      Parameters:
      apps - the application configurations to set
    • mode

      public Mode mode()
      Returns the management mode for the container.
      Returns:
      the management mode
    • checkTokenExpiration

      public boolean checkTokenExpiration()
      Returns whether token expiration should be checked.
      Returns:
      true if token expiration should be checked, false otherwise
    • apps

      Returns the application configurations included in this configuration.
      Returns:
      the application configurations
    • app

      public ApplicationConfiguration app(String context)
      Returns the configuration of an application with a given context path.
      Parameters:
      context - the context path
      Returns:
      the application configuration
    • app

      Adds the configuration of an application to this configuration.
      Parameters:
      app - the application configuration
      Returns:
      this configuration
    • site

      public Site site()
      Returns the geographical site of the container.
      Returns:
      the site
    • infrastructure

      public String infrastructure()
      Returns the infrastructure in which the container is running.
      Returns:
      the infrastructure
    • hostname

      public String hostname()
      Returns the host name of the container.
      Returns:
      the host name;
    • port

      public int port()
      Returns the port at which the container is listening for requests.
      Returns:
      the port
    • protocol

      public String protocol()
      Returns the port at which the container is listening for requests.
      Returns:
      the port
    • authorizeChildrenContext

      public boolean authorizeChildrenContext()
      Returns whether children context authorization is enabled.
      Returns:
      true if children context authorization is enabled, false otherwise
    • proxy

      public ProxyAddress proxy()
      Returns the proxy of the container.
      Returns:
      the proxy
    • persistenceConfiguration

      public PersistenceConfiguration persistenceConfiguration()
      Returns the persistence manager of the container.
      Returns:
      the manager
    • accountingFallbackLocation

      public String accountingFallbackLocation()
      Returns the persistence manager of the container.
      Returns:
      the manager
    • authorizationConfiguration

      public AuthorizationProviderConfiguration authorizationConfiguration()
      Returns the authorization configuration.
      Returns:
      AuthorizationProviderConfiguration the configuration
    • properties

      public Map<String,String> properties()
      Returns the configuration properties of the container.
      Returns:
      the properties
    • publicationFrequency

      public long publicationFrequency()
      Returns the publication frequency for the container's profile.
      Returns:
      the frquency;
    • validate

      public void validate()
      Validates this configuration
      Throws:
      IllegalStateException - if the configuration is invalid
    • toString

      public String toString()
      Overrides:
      toString in class Object