Class ConfigRegister

java.lang.Object
org.nanonative.nano.helper.config.ConfigRegister

public class ConfigRegister extends Object
Utility class for registering and retrieving configuration descriptions.

This class is typically used for Service or custom functions to display configuration keys and descriptions when the Java property -Dhelp=true is set.

  • Method Details

    • registerConfig

      public static String registerConfig(String key, String description)
      Registers a configuration key with its description.

      If the key is valid and non-null, it will be standardized and added to the configuration keys map with the provided description. If the description is null, an empty string will be used.

      Parameters:
      key - the configuration key to register
      description - the description of the configuration key
      Returns:
      the standardized key if registration is successful, or null if the key is invalid
    • configDescriptionOf

      public static String configDescriptionOf(String key)
      Retrieves the description of a registered configuration key.

      If the key is valid and non-null, it will be standardized and its description will be retrieved from the configuration keys map.

      Parameters:
      key - the configuration key whose description is to be retrieved
      Returns:
      the description of the configuration key, or null if the key is invalid or not found