java.lang.Objectorg.objectweb.telosys.common.Telosys
General Telosys environment informations and utilities
Constructor Summary | |
Telosys()
|
Method Summary | |
static void |
error(java.lang.String sMsg)
Logs an error message using both standard logger and specific application logger if any |
static void |
error(java.lang.String sClassName,
java.lang.String sMsg)
Logs an error message using both standard logger and specific application logger if any |
static void |
error(java.lang.String sClassName,
java.lang.Throwable ex)
Logs an exception using both standard logger and specific application logger if any |
static void |
error(java.lang.Throwable ex)
Logs an exception using both standard logger and specific application logger if any |
static java.lang.String |
getDbConfigFileName()
Returns the file name (or resource name) of the databases XML file ( databases.dbcfg, formerly dbconfig.xml ) |
static java.io.InputStream |
getDbConfigInputStream()
Returns the InputStream of the databases XML file or resource ( databases.dbcfg, formerly dbconfig.xml ) |
static TelosysFactory |
getFactory()
Returns the Telosys factory |
static java.lang.String |
getFullPath(java.lang.String sFile)
Return the full path for the given relative file ( ie : "myfile.txt" -> "C:/dir1/dir2/mywebapp/myfile.txt" ) This method concats the "Application Root Dir" with the file name if the "Application Root Dir" is not set, it returns the file as is. |
static java.util.Properties |
getProperties()
Returns the Telosys properties ( loaded from the 'telosys.properties' file ) |
static java.lang.String |
getProperty(java.lang.String sPropertyName)
Returns the property value for the given property name ( properties loaded from the "telosys.properties" file ) |
static java.lang.String |
getSAXParserClassName()
Returns the SAX parser class name |
static java.lang.String |
getScreensConfigFileName()
Returns the file name (or resource name) of the screens XML file ( screens.xml ) |
static java.io.InputStream |
getScreensConfigInputStream()
Returns the InputStream of the screens XML file or resource ( screens.xml ) |
static javax.servlet.ServletContext |
getServletContext()
Returns the web app ServletContext object |
static java.lang.String |
getTagsConfigFileName()
Returns the file name (or resource name) of the tags properties file ( tags.properties ) |
static java.io.InputStream |
getTagsConfigInputStream()
Returns the InputStream of the tags properties file ( tags.properties ) |
static java.lang.String |
getTraceConfigFileName()
Returns the file name (or resource name) of the trace properties file ( traces.properties ) |
static java.io.InputStream |
getTraceConfigInputStream()
Returns the InputStream of the trace properties file ( traces.properties ) |
static java.lang.String |
getTranslatorLoaderClassName()
Returns the TranslatorLoader class name |
static java.lang.String |
getVersion()
Returns the Telosys framework version ( e.g. "1.2.3" ) |
static java.lang.String |
getWebAppName()
Returns the name of the current Web App ( from tag 'display-name' in web.xml ) Set from ServletContext.getServletContextName() |
static java.lang.String |
getWebAppRootDir()
Returns the absolute filesystem root directory of the current Web App e.g. |
static javax.xml.parsers.DocumentBuilderFactory |
getXmlDomParserFactory()
Returns a JAXP DocumentBuilderFactory |
static IXmlWrapperProvider |
getXmlWrapperProvider()
Returns the XmlWrapperProvider provided by the Telosys factory |
static void |
info(java.lang.String sMsg)
Logs an info message using both standard logger and specific application logger if any |
static void |
info(java.lang.String sClassName,
java.lang.String sMsg)
Logs an info message using both standard logger and specific application logger if any |
static java.util.Properties |
init(IExternalMainFactory extFactory)
Try to initialize the Telosys properties : try to find 'telosys.properties' using the classpath if the file is find the properties are loaded and Telosys is initialized. |
static java.util.Properties |
init(IExternalMainFactory extFactory,
javax.servlet.ServletConfig servletConfig)
Initialize the Telosys properties. |
static java.util.Properties |
init(IExternalMainFactory extFactory,
javax.servlet.ServletContext servletContext)
Initialize the Telosys properties. |
static java.util.Properties |
init(IExternalMainFactory extFactory,
java.lang.String sPropFile)
Initialize the Telosys properties using a specific properties file |
static boolean |
isAuthenticationRequired()
Returns true if user authentication is required |
static boolean |
isInitialized()
Returns true if Telosys is initialized ( true if the properties are loaded and the factory exists ) |
static void |
trace(java.lang.String sMsg)
Logs a trace message using both standard logger and specific application logger if any |
static void |
trace(java.lang.String sClassName,
java.lang.String sMsg)
Logs a trace message using both standard logger and specific application logger if any |
static void |
warn(java.lang.String sMsg)
Logs a warning message using both standard logger and specific application logger if any |
static void |
warn(java.lang.String sClassName,
java.lang.String sMsg)
Logs a warning message using both standard logger and specific application logger if any |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Telosys()
Method Detail |
public static java.lang.String getVersion()
public static boolean isInitialized()
public static java.util.Properties init(IExternalMainFactory extFactory)
public static java.util.Properties init(IExternalMainFactory extFactory, javax.servlet.ServletContext servletContext)
extFactory
- servletContext
- : the ServletContext to use
public static java.util.Properties init(IExternalMainFactory extFactory, javax.servlet.ServletConfig servletConfig)
extFactory
- servletConfig
- : the ServletConfig to use ( can be null )
public static java.util.Properties init(IExternalMainFactory extFactory, java.lang.String sPropFile)
extFactory
- sPropFile
-
public static java.lang.String getWebAppRootDir()
public static java.lang.String getWebAppName()
public static java.lang.String getSAXParserClassName()
public static java.lang.String getTranslatorLoaderClassName()
public static java.lang.String getFullPath(java.lang.String sFile)
sFile
-
public static java.util.Properties getProperties()
public static TelosysFactory getFactory()
public static javax.servlet.ServletContext getServletContext()
public static IXmlWrapperProvider getXmlWrapperProvider()
public static boolean isAuthenticationRequired()
public static javax.xml.parsers.DocumentBuilderFactory getXmlDomParserFactory()
public static void error(java.lang.String sClassName, java.lang.String sMsg)
sClassName
- sMsg
- public static void error(java.lang.String sMsg)
sMsg
- public static void error(java.lang.String sClassName, java.lang.Throwable ex)
sClassName
- ex
- public static void error(java.lang.Throwable ex)
ex
- public static void warn(java.lang.String sClassName, java.lang.String sMsg)
sClassName
- sMsg
- public static void warn(java.lang.String sMsg)
sMsg
- public static void info(java.lang.String sClassName, java.lang.String sMsg)
sClassName
- sMsg
- public static void info(java.lang.String sMsg)
sMsg
- public static void trace(java.lang.String sClassName, java.lang.String sMsg)
sClassName
- sMsg
- public static void trace(java.lang.String sMsg)
sMsg
- public static java.lang.String getDbConfigFileName()
public static java.io.InputStream getDbConfigInputStream()
public static java.lang.String getScreensConfigFileName()
public static java.io.InputStream getScreensConfigInputStream()
public static java.lang.String getTagsConfigFileName()
public static java.io.InputStream getTagsConfigInputStream()
public static java.lang.String getTraceConfigFileName()
public static java.io.InputStream getTraceConfigInputStream()
public static java.lang.String getProperty(java.lang.String sPropertyName)
sPropertyName
-