ConfigService

public interface ConfigService

Config service, manages IVR configs. A org.motechproject.ivr.domain.Config represents the way to interact with an IVR provider. See org.motechproject.ivr.domain.Config

Methods

allConfigs

Configs allConfigs()

Returns all stored configurations.

Returns:Configs object

getConfig

Config getConfig(String name)

Retrieves the config with the given name.

Parameters:
  • name – the name of the configuration
Throws:
Returns:

the config found for the given name, never null

getDefaultConfig

String getDefaultConfig()

Returns the default configuration name

Returns:String default configuration name

hasConfig

boolean hasConfig(String name)

Checks whether a configuration with the given name exists.

Parameters:
  • name – the config name to check
Returns:

true if a configuration with the given name exists, false otherwise

updateConfigs

void updateConfigs(Configs configs)

Updates the configuration. The old configuration collection is overwritten by the new one.

Parameters:
  • configs – the collection of configurations to save with default configuration