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)
|
static void |
error(java.lang.String sClassName,
java.lang.String sMsg)
|
static void |
error(java.lang.String sClassName,
java.lang.Throwable ex)
|
static void |
error(java.lang.Throwable ex)
|
static java.lang.String |
getDbConfigFileName()
Returns the file name (or resource name) of the DbConfig XML file. |
static java.io.InputStream |
getDbConfigInputStream()
Returns the InputStream of the DbConfig XML file or resource. |
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 DbConfig XML file. |
static java.io.InputStream |
getScreensConfigInputStream()
Returns the InputStream of the DbConfig XML file or resource. |
static javax.servlet.ServletContext |
getServletContext()
Returns the web app ServletContext object |
static java.lang.String |
getTagsConfigFileName()
|
static java.io.InputStream |
getTagsConfigInputStream()
|
static java.lang.String |
getTraceConfigFileName()
|
static java.io.InputStream |
getTraceConfigInputStream()
|
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()
|
static IXmlWrapperProvider |
getXmlWrapperProvider()
Returns the XmlWrapperProvider provided by the Telosys factory |
static void |
info(java.lang.String sMsg)
|
static void |
info(java.lang.String sClassName,
java.lang.String sMsg)
|
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)
|
static void |
trace(java.lang.String sClassName,
java.lang.String sMsg)
|
static void |
warn(java.lang.String sMsg)
|
static void |
warn(java.lang.String sClassName,
java.lang.String sMsg)
|
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 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)
public static void error(java.lang.String sMsg)
public static void error(java.lang.String sClassName, java.lang.Throwable ex)
public static void error(java.lang.Throwable ex)
public static void warn(java.lang.String sClassName, java.lang.String sMsg)
public static void warn(java.lang.String sMsg)
public static void info(java.lang.String sClassName, java.lang.String sMsg)
public static void info(java.lang.String sMsg)
public static void trace(java.lang.String sClassName, java.lang.String sMsg)
public static void trace(java.lang.String 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
-