org.itracker.services.util
Class SystemConfigurationUtilities

java.lang.Object
  extended by org.itracker.services.util.SystemConfigurationUtilities

public class SystemConfigurationUtilities
extends Object


Field Summary
static int ACTION_CREATE
           
static int ACTION_REMOVE
           
static int ACTION_UPDATE
           
static String DEFAULT_DATASOURCE
           
static int LOCALE_TYPE_BASE
           
static int LOCALE_TYPE_INVALID
           
static int LOCALE_TYPE_LANGUAGE
           
static int LOCALE_TYPE_LOCALE
           
static int TYPE_CUSTOMFIELD
           
static int TYPE_INITIALIZED
           
static int TYPE_LOCALE
           
static int TYPE_RESOLUTION
           
static int TYPE_SEVERITY
           
static int TYPE_STATUS
           
 
Constructor Summary
SystemConfigurationUtilities()
           
 
Method Summary
static String getLanguageKey(Configuration configuration)
          Returns the key for a particular configuration item.
static String getLocalePart(String locale, int partType)
           
static int getLocaleType(String locale)
           
static long getVersionAsLong(String version)
           
static void initializeAllLanguages(ConfigurationService configurationService, boolean forceReload)
          This method will attempt to load all of the locales defined in the ITracker.properties file, and add them to the database if they don't already exist.
static Configuration[] nvpArrayToConfigurationArray(int configType, NameValuePair[] names)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DATASOURCE

public static final String DEFAULT_DATASOURCE
See Also:
Constant Field Values

TYPE_INITIALIZED

public static final int TYPE_INITIALIZED
See Also:
Constant Field Values

TYPE_LOCALE

public static final int TYPE_LOCALE
See Also:
Constant Field Values

TYPE_STATUS

public static final int TYPE_STATUS
See Also:
Constant Field Values

TYPE_SEVERITY

public static final int TYPE_SEVERITY
See Also:
Constant Field Values

TYPE_RESOLUTION

public static final int TYPE_RESOLUTION
See Also:
Constant Field Values

TYPE_CUSTOMFIELD

public static final int TYPE_CUSTOMFIELD
See Also:
Constant Field Values

ACTION_CREATE

public static final int ACTION_CREATE
See Also:
Constant Field Values

ACTION_UPDATE

public static final int ACTION_UPDATE
See Also:
Constant Field Values

ACTION_REMOVE

public static final int ACTION_REMOVE
See Also:
Constant Field Values

LOCALE_TYPE_INVALID

public static final int LOCALE_TYPE_INVALID
See Also:
Constant Field Values

LOCALE_TYPE_BASE

public static final int LOCALE_TYPE_BASE
See Also:
Constant Field Values

LOCALE_TYPE_LANGUAGE

public static final int LOCALE_TYPE_LANGUAGE
See Also:
Constant Field Values

LOCALE_TYPE_LOCALE

public static final int LOCALE_TYPE_LOCALE
See Also:
Constant Field Values
Constructor Detail

SystemConfigurationUtilities

public SystemConfigurationUtilities()
Method Detail

getLanguageKey

public static String getLanguageKey(Configuration configuration)
Returns the key for a particular configuration item. This is made up of a static part based on the type of configuration item, and the unique value of the configuration item.

Parameters:
model - the Configuration to return the key for
Returns:
the key for the item

initializeAllLanguages

public static void initializeAllLanguages(ConfigurationService configurationService,
                                          boolean forceReload)
This method will attempt to load all of the locales defined in the ITracker.properties file, and add them to the database if they don't already exist.

Parameters:
configurationService - a configurationService object to use when processing the locales
forceReload - if true, it will reload the languages from the property files even if they are listed as being up to date

getVersionAsLong

public static long getVersionAsLong(String version)

getLocaleType

public static int getLocaleType(String locale)

getLocalePart

public static String getLocalePart(String locale,
                                   int partType)

nvpArrayToConfigurationArray

public static Configuration[] nvpArrayToConfigurationArray(int configType,
                                                           NameValuePair[] names)


Copyright © 2002-2012 itracker. All Rights Reserved.