Class QuicknoteConfig

java.lang.Object
io.adamantic.quicknote.QuicknoteConfig

public class QuicknoteConfig extends Object
Quicknote main configuration class.
Author:
Domenico Barra - domenico@adamantic.io
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode>
    Returns the main configuration entry point for a specific connector.
    org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode>
    Returns the main configuration entry point for a specific receiver.
    org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode>
    Returns the main configuration entry point for a specific sender.
    org.apache.commons.configuration2.BaseHierarchicalConfiguration
    Returns the global configuration object.
    static String
    requireStringNotEmpty(org.apache.commons.configuration2.Configuration c, String path)
    Loads a string from configuration, requiring that it's not empty.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QuicknoteConfig

      public QuicknoteConfig()
  • Method Details

    • globalConfig

      public org.apache.commons.configuration2.BaseHierarchicalConfiguration globalConfig()
      Returns the global configuration object.
      Returns:
      the global configuration object.
    • configForConnector

      public org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> configForConnector(String name)
      Returns the main configuration entry point for a specific connector.
      Parameters:
      name - the name of the connector.
      Returns:
      a configuration object for the connector.
      Throws:
      ConfigException - if the configuration for the connector is not found.
    • configForSender

      public org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> configForSender(String name)
      Returns the main configuration entry point for a specific sender.
      Parameters:
      name - the name of the sender.
      Returns:
      a configuration object for the sender.
      Throws:
      ConfigException - if the configuration for the sender is not found.
    • configForReceiver

      public org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> configForReceiver(String name)
      Returns the main configuration entry point for a specific receiver.
      Parameters:
      name - the name of the receiver.
      Returns:
      a configuration object for the receiver.
      Throws:
      ConfigException - if the configuration for the receiver is not found.
    • requireStringNotEmpty

      public static String requireStringNotEmpty(org.apache.commons.configuration2.Configuration c, String path) throws ConfigException
      Loads a string from configuration, requiring that it's not empty.
      Parameters:
      c - the configuration object from which to load the string.
      path - the path to the string in the configuration object.
      Returns:
      the string loaded from configuration.
      Throws:
      ConfigException - if the string is not found or is empty.