Package sk.iway.iwcm

Class Constants

java.lang.Object
sk.iway.iwcm.Constants

public class Constants extends Object
Konstanty aplikacie
  • Field Details

  • Constructor Details

    • Constants

      protected Constants()
  • Method Details

    • setString

      public static void setString(String name, String value, String modules, String description)
      Nastavi string a ulozi do zoznamu dostupnych konfiguracnych premennych pre pouzitie v GUI
      Parameters:
      name -
      value -
      modules -
      description -
    • setLong

      public static void setLong(String name, long value, String modules, String description)
    • setInt

      public static void setInt(String name, int value, String modules, String description)
    • setBoolean

      public static void setBoolean(String name, boolean value, String modules, String description)
    • mods

      public static String mods(String... mod)
    • clearValues

      public static void clearValues()
    • getInt

      public static int getInt(String constName)
      Gets the int attribute of the Constants class
      Parameters:
      constName - Description of the Parameter
      Returns:
      The int value
    • setInt

      public static void setInt(String constName, int VALUE)
      Sets the int attribute of the Constants class
      Parameters:
      constName - The new int value
      VALUE - The new int value
    • getInt

      public static int getInt(String constName, int defaultValue)
    • getLong

      public static long getLong(String constName)
      Gets the int attribute of the Constants class
      Parameters:
      constName - Description of the Parameter
      Returns:
      The int value
    • getLong

      public static long getLong(String constName, long defaultValue)
    • setLong

      public static void setLong(String constName, long VALUE)
      Sets the long attribute of the Constants class
      Parameters:
      constName - The new int value
      VALUE - The new int value
    • getString

      public static String getString(String constName)
      Gets the string attribute of the Constants class
      Parameters:
      constName - Description of the Parameter
      Returns:
      The string value, in case of any error or when value is not defined returns empty string
    • getStringExecuteMacro

      public static String getStringExecuteMacro(String constName)
      Ziska hodnotu konstanty s vykonanim makra (napr. nahrada {INSTALL_NAME} za realnu hodnotu)
      Parameters:
      constName -
      Returns:
    • executeMacro

      public static String executeMacro(String value)
      V hodnote vykona makra (napr. nahrada {INSTALL_NAME} za realnu hodnotu). Je mozne pouzit: - {INSTALL_NAME} - {DOMAIN_NAME} - {DOMAIN_ALIAS} - {HTTP_PROTOCOL} - {HTTP_PORT} - {SERVER_NAME}
    • getString

      public static String getString(String constName, String defaultValue)
    • getArray

      public static String[] getArray(String name)
      Returns coma separated value as Array
      Parameters:
      name - - configuration name
      Returns:
    • setString

      public static void setString(String constName, String VALUE)
      Sets the string attribute of the Constants class
      Parameters:
      constName - The new string value
      VALUE - The new string value
    • getBoolean

      public static boolean getBoolean(String constName)
      Gets the string attribute of the Constants class
      Parameters:
      constName - Description of the Parameter
      Returns:
      The string value
    • setBoolean

      public static void setBoolean(String constName, boolean VALUE)
      Sets the string attribute of the Constants class
      Parameters:
      constName - The new string value
      VALUE - The new string value
    • setBoolean

      public static void setBoolean(String constName, String VALUE)
    • setServletContext

      public static void setServletContext(javax.servlet.ServletContext newServletContext)
    • getServletContext

      public static javax.servlet.ServletContext getServletContext()
    • deleteConstant

      public static boolean deleteConstant(String name)
    • containsKey

      public static boolean containsKey(String key)
    • getAllValues

      public static List<ConfDetails> getAllValues()
    • getAllKeys

      public static List<String> getAllKeys()
    • setAllValues

      public static void setAllValues(ConfDetails conf)
      Nastavi/prepise novu konfiguracnu hodnotu do listu
      Parameters:
      conf -
    • setInstallName

      public static void setInstallName(String installName)
    • getInstallName

      public static String getInstallName()
    • getLogInstallName

      public static String getLogInstallName()
    • isConstantsAliasSearch

      public static boolean isConstantsAliasSearch()
    • setConstantsAliasSearch

      public static void setConstantsAliasSearch(boolean constantsAliasSearch)
    • getDescription

      public static String getDescription(String constName)
      Gets description of constant
      Parameters:
      constName - Name of the constant
      Returns:
      The string value
    • getConstType

      public static String getConstType(String constName)
      Gets type of constant value
      Parameters:
      constName - Name of the constant
      Returns:
      The string value (integer, string, boolean)
    • getHashtable

      public static Map<String,String> getHashtable(String name)
      Vrati hodnotu konstanty skonvertovanu do hashtabulky, format zapisu konf. premennej je kluc1|hodnota1 kluc2|hodnota2 kluc3|hodnota3
      Parameters:
      name -
      Returns: