Methods Summary |
---|
public static LocalStringsManager | getCommandLocalStringsManager()Returns the instance of the LocalStringsManager object for
the CLI Commands module.
the caller can access all the methods in this class.
if (commandLocalStringsManager == null)
{
LocalStringsManager lsm =
LocalStringsManagerFactory.getFrameworkLocalStringsManager();
throw new CommandValidationException(
lsm.getString("CouldNotFindLocalStringsProperties"));
}
return commandLocalStringsManager;
|
public static LocalStringsManager | getFrameworkLocalStringsManager()Returns the instance of the LocalStringsManager object for
the CLI framework module.
the caller can access all the methods in this class.
return getLocalStringsManager(FRAMEWORK_BASE_PACKAGE, PROPERTY_FILE);
|
public static LocalStringsManager | getLocalStringsManager(java.lang.String packageName, java.lang.String propertiesFileName)Returns the instance of the LocalStringsManager object,
the caller can access all the methods in this class.
LocalStringsManager stringsManager =
(LocalStringsManager) stringManagers.get(packageName);
if ((stringsManager == null) ||
(!stringsManager.getPropertiesFile().equals(propertiesFileName)))
{
try
{
stringsManager = new LocalStringsManager(packageName,
propertiesFileName);
stringManagers.put(packageName, stringsManager);
}
catch(java.util.MissingResourceException mre)
{
//throw new CommandException(mre.getLocalizedMessage());
throw new CommandValidationException(mre.getLocalizedMessage(), mre);
}
}
return stringsManager;
|
public static void | setCommandLocalStringsManagerProperties(java.util.Iterator propertiesIter)sets the list of base_package and property_file_name properties for
the CLI Commands module.
Vector localizePropertiesList = new Vector();
while (propertiesIter.hasNext())
{
Properties localizeProperties = new Properties();
Properties properties = (Properties) propertiesIter.next();
String basePackage = properties.getProperty("base-package");
String propertyFile = properties.getProperty("property-file-name",
LocalStringsManagerFactory.PROPERTY_FILE);
if ((basePackage != null) && (!basePackage.equals("")))
{
CLILogger.getInstance().printDebugMessage("basePackage: " + basePackage);
CLILogger.getInstance().printDebugMessage("propertyFile: " + propertyFile);
localizeProperties.setProperty("base-package", basePackage);
localizeProperties.setProperty("property-file-name", propertyFile);
localizePropertiesList.add(localizeProperties);
}
}
if (localizePropertiesList.size() > 0)
{
commandLocalStringsManager =
new LocalStringsManager(localizePropertiesList);
}
|
public static void | setInstance(java.lang.String packageName, LocalStringsManager stringsManager)Sets the LocalStringsManager object.
stringManagers.put(packageName, stringsManager);
|