Class Config

java.lang.Object
org.bgerp.app.cfg.Config
org.bgerp.plugin.bgb.getolt.Config

public class Config extends Config
Configuration for GetOLT plugin. Reads settings from bgerp.properties with prefix "getolt:".
  • Constructor Details

  • Method Details

    • isConfigured

      public boolean isConfigured()
      Check if the plugin is configured
      Returns:
      true if API URL and key are configured
    • getApiUrl

      public String getApiUrl()
      Get the API URL
      Returns:
      the API URL
    • getApiKey

      public String getApiKey()
      Get the API key
      Returns:
      the API key
    • getApiTimeout

      public int getApiTimeout()
      Get the API timeout in milliseconds
      Returns:
      the API timeout
    • getOperatorParamId

      public int getOperatorParamId()
      Get the operator parameter ID
      Returns:
      the operator parameter ID
    • getDefaultOperator

      public String getDefaultOperator()
      Get the default operator
      Returns:
      the default operator
    • getParamOperatorMapping

      public String getParamOperatorMapping(int valueId)
      Get operator name from process parameter value ID
      Parameters:
      valueId - the parameter value ID
      Returns:
      the operator name or null if not mapped
    • getBillingOperatorMapping

      public String getBillingOperatorMapping(String billingId)
      Get operator name from billing ID
      Parameters:
      billingId - the billing ID
      Returns:
      the operator name or null if not mapped
    • getOperatorToBillingIdMap

      public Map<String,String> getOperatorToBillingIdMap()
      Get reverse mapping: operator name → bgbilling billingId. Built from operator.billing.{billingId}={operatorName} config.
      Returns:
      map of operator name → billingId
    • getInetMacConfig

      public BillingConfig getInetMacConfig(String operator)
      Get InetMac API configuration for operator.
      Parameters:
      operator - operator name (e.g., "Омикрон", "РТЦ")
      Returns:
      billing config or null if not configured
    • hasInetMacConfig

      public boolean hasInetMacConfig(String operator)
      Check if InetMac is configured for operator.
      Parameters:
      operator - operator name
      Returns:
      true if InetMac API is configured for this operator
    • useExternalApi

      public boolean useExternalApi()
      Check if external GetOLT API should be used (vs local DB).
      Returns:
      true if API URL and key are configured
    • getInetMacConfigs

      public Map<String,BillingConfig> getInetMacConfigs()
      Get all configured InetMac operators.
      Returns:
      map of operator name → BillingConfig
    • getMacListUrl

      public String getMacListUrl(String operator)
      Build GetInetMacList URL from existing InetMac URL for operator. Replaces webhook path: ru.webHooks.InetMac/InetMacInterface → ru.webHooks.InetMacList/GetInetMacListInterface
      Parameters:
      operator - operator name
      Returns:
      GetInetMacList URL or null if not configured
    • getOltListUrl

      public String getOltListUrl(String operator)
      Build GetOltList URL from existing InetMac URL for operator. Replaces webhook path: ru.webHooks.InetMac/InetMacInterface → ru.webHooks.OltList/GetOltListInterface
      Parameters:
      operator - operator name
      Returns:
      GetOltList URL or null if not configured