com.softwareag.mdm.core.service
Class ModuleServices

java.lang.Object
  extended bycom.softwareag.mdm.core.service.ModuleServices
Direct Known Subclasses:
AbstractConfigurationFacade

public abstract class ModuleServices
extends Object

Gathers services related to modules.


Constructor Summary
ModuleServices()
           
 
Method Summary
abstract  Locale getCurrentLocale()
           
 String getMessageLocalized(com.softwareag.mdm.base.text.MessageName aMessageName)
          Returns a message in the current locale.
 String getMessageLocalized(com.softwareag.mdm.base.text.MessageName aMessageName, Object[] objectsInMessage)
          Returns a message in the current locale.
 String getMessageLocalized(com.softwareag.mdm.base.text.MessageName aMessageName, Object[] objectsInMessage, Locale specificLocale)
          Returns a message in the locale specified.
 String getModuleProperty(ModuleAlias moduleAlias, String aPropertyName, String aDefaultValue)
          Returns a value stored in file /WEB-INF/mdm/module.properties of Module that is referenced by alias moduleAlias.
 String getModuleProperty(String aPropertyName, String aDefaultValue)
          Returns a value stored in file /WEB-INF/mdm/module.properties within module.
 boolean isDevelopmentMode()
          Returns true if webMethods MDM is configured as running in development mode.
 boolean isIntegrationMode()
          Returns true if webMethods MDM is configured as running in integration mode.
 void logDebug(String aMessage)
          Logs a debug-level message to default module's log file.
 void logDebug(String aMessage, String aCategoryName)
          Logs a debug-level message to log file identified by module name and aCategoryName.
 void logError(String aMessage)
          Logs an error-level message to default module's log file.
 void logError(String aMessage, String aCategoryName)
          Logs an error-level message to log file identified by module name and aCategoryName.
 void logError(String aMessage, Throwable anException)
          Logs an error-level message and the exception stack trace to default module's log file.
 void logError(String aMessage, Throwable anException, String aCategoryName)
          Logs an error-level message and the exception stack trace to log file identified by module name and aCategoryName.
 void logInfo(String aMessage)
          Logs an information-level message to default module's log file.
 void logInfo(String aMessage, String aCategoryName)
          Logs an information-level message to log file identified by module name and aCategoryName.
 void logWarning(String aMessage)
          Logs a warning-level message to default module's log file.
 void logWarning(String aMessage, String aCategoryName)
          Logs a warning-level message to log file identified by module name and aCategoryName.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleServices

public ModuleServices()
Method Detail

getCurrentLocale

public abstract Locale getCurrentLocale()

toString

public String toString()

getModuleProperty

public final String getModuleProperty(ModuleAlias moduleAlias,
                                      String aPropertyName,
                                      String aDefaultValue)
Returns a value stored in file /WEB-INF/mdm/module.properties of Module that is referenced by alias moduleAlias. If moduleAlias is null, method getModuleProperty(String, String)is called. If moduleAlias is not recognized, null is returned. Usual values used with moduleAlias are :

Parameters:
moduleAlias - the alias of the module.
aPropertyName - the name of the property.
aDefaultValue - default value of property if property not found.
Returns:
the string value of the property, null is returned if there is no property with that key or if moduleAlias is not recognized.

getModuleProperty

public final String getModuleProperty(String aPropertyName,
                                      String aDefaultValue)
Returns a value stored in file /WEB-INF/mdm/module.properties within module.

Parameters:
aPropertyName - the name of the property.
aDefaultValue - default value of property if property not found.
Returns:
the string value of the property, or aDefaultValue if there is no property with that key.

getMessageLocalized

public final String getMessageLocalized(com.softwareag.mdm.base.text.MessageName aMessageName)
Returns a message in the current locale.

Note : the message has no parameters.


getMessageLocalized

public final String getMessageLocalized(com.softwareag.mdm.base.text.MessageName aMessageName,
                                        Object[] objectsInMessage)
Returns a message in the current locale.


getMessageLocalized

public final String getMessageLocalized(com.softwareag.mdm.base.text.MessageName aMessageName,
                                        Object[] objectsInMessage,
                                        Locale specificLocale)
Returns a message in the locale specified.


logDebug

public void logDebug(String aMessage)
Logs a debug-level message to default module's log file.


logDebug

public void logDebug(String aMessage,
                     String aCategoryName)
Logs a debug-level message to log file identified by module name and aCategoryName.


logError

public void logError(String aMessage)
Logs an error-level message to default module's log file.


logError

public void logError(String aMessage,
                     String aCategoryName)
Logs an error-level message to log file identified by module name and aCategoryName.


logError

public void logError(String aMessage,
                     Throwable anException)
Logs an error-level message and the exception stack trace to default module's log file.


logError

public void logError(String aMessage,
                     Throwable anException,
                     String aCategoryName)
Logs an error-level message and the exception stack trace to log file identified by module name and aCategoryName.


logInfo

public void logInfo(String aMessage)
Logs an information-level message to default module's log file.


logInfo

public void logInfo(String aMessage,
                    String aCategoryName)
Logs an information-level message to log file identified by module name and aCategoryName.


logWarning

public void logWarning(String aMessage)
Logs a warning-level message to default module's log file.


logWarning

public void logWarning(String aMessage,
                       String aCategoryName)
Logs a warning-level message to log file identified by module name and aCategoryName.


isDevelopmentMode

public boolean isDevelopmentMode()
Returns true if webMethods MDM is configured as running in development mode.
See 'mdm.properties' file.


isIntegrationMode

public boolean isIntegrationMode()
Returns true if webMethods MDM is configured as running in integration mode.
See 'mdm.properties' file.



(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.