public class

ErrorMsgLib

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.localization.ErrorMsgLib

Class Overview

Library of error-message localization functions. Errors autogenerated by a Visual Basic program that reads them from the main error database for Castor COM, GUI, and Kernel.

Summary

Public Constructors
ErrorMsgLib()
Public Methods
static int convertJavaLocaleToLCID(Locale jLocale)
Converts a Java Locale to a Windows-based Locale ID.
static Locale convertLCIDToJavaLocale(int localeID)
Converts a Windows-based Locale ID to a Java Locale.
static void dispenseWebAPIErrors(String destinationDir, String packagePath)
Dispenses all localized WebAPIErrors property files to specified destination directory.
static String getAndFormatString(Locale locale, int errorCode, String baseName)
This function gets the error string that the error code passed in refers to, using the Locale that is passed in and the class path of the base name.
static String getAndFormatString(Locale locale, int errorCode, String baseName, String[] argList)
This function gets the error string that the error code passed in refers to, using the Locale and the base name that is passed in.
static String getAndFormatString(Locale locale, int errorCode)
This function gets the error string that the error code passed in refers to, using the Locale that is passed in.
static String getAndFormatString(int errorCode, String[] argList)
This function gets the error string that the error code passed in refers to, using the default locale for the JVM.
static String getAndFormatString(int errorCode)
This function gets the error string that the error code passed in refers to, using the default locale.
static String getAndFormatString(Locale locale, int errorCode, String[] argList)
This function gets the error string that the error code passed in refers to, using the Locale that is passed in.
static int getJarMarkIndex(int startIndex, String path)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ErrorMsgLib ()

Public Methods

public static int convertJavaLocaleToLCID (Locale jLocale)

Converts a Java Locale to a Windows-based Locale ID. Converted by hand.

Parameters
jLocale java.util.Locale
Returns
  • int

public static Locale convertLCIDToJavaLocale (int localeID)

Converts a Windows-based Locale ID to a Java Locale. Converted by hand. Note that some of the extremely obscure, unsupported(in windows) countries are not added yet. Most of these languages are not supported by MSTR products directly, but their presence won't hurt anything, and will reduce the maintenance on this file.

Parameters
localeID int
Returns
  • java.util.Locale

public static void dispenseWebAPIErrors (String destinationDir, String packagePath)

Dispenses all localized WebAPIErrors property files to specified destination directory. This directory must be inside the classpath.

Parameters
destinationDir destination directory for dispensing
packagePath dot notation package path to resource

public static String getAndFormatString (Locale locale, int errorCode, String baseName)

This function gets the error string that the error code passed in refers to, using the Locale that is passed in and the class path of the base name.

Parameters
locale java.lang.String
errorCode int
baseName java.lang.String
Returns
  • java.lang.String

public static String getAndFormatString (Locale locale, int errorCode, String baseName, String[] argList)

This function gets the error string that the error code passed in refers to, using the Locale and the base name that is passed in. It then substitutes all occurences of {0}, {1}, etc in the string with the values in argList.

Parameters
locale java.lang.String
errorCode int
baseName java.lang.String
argList java.lang.String[]
Returns
  • java.lang.String

public static String getAndFormatString (Locale locale, int errorCode)

This function gets the error string that the error code passed in refers to, using the Locale that is passed in. This method will lookup the WebAPIErrors properties file first from the dispensed path, then if not found, from com.microstrategy.utils.localization.

Parameters
locale java.lang.String
errorCode int
Returns
  • java.lang.String

public static String getAndFormatString (int errorCode, String[] argList)

This function gets the error string that the error code passed in refers to, using the default locale for the JVM. It then substitutes values in the argList array for {0}, {1}, etc in the error string.

Parameters
errorCode int
argList String[]
Returns
  • java.lang.String

public static String getAndFormatString (int errorCode)

This function gets the error string that the error code passed in refers to, using the default locale. Will not substitute for any {0} parameters in the String.

Parameters
errorCode int
Returns
  • java.lang.String

public static String getAndFormatString (Locale locale, int errorCode, String[] argList)

This function gets the error string that the error code passed in refers to, using the Locale that is passed in. It then substitutes all occurences of {0}, {1}, etc in the string with the values in argList.

Parameters
locale java.lang.String
errorCode int
argList java.lang.String[]
Returns
  • java.lang.String

public static int getJarMarkIndex (int startIndex, String path)