Package lumis.portal
Class PortalConfiguration
- java.lang.Object
-
- lumis.portal.PortalConfiguration
-
- All Implemented Interfaces:
java.util.EventListener
,javax.servlet.ServletContextListener
public class PortalConfiguration extends java.lang.Object implements javax.servlet.ServletContextListener
Encapsulates the portal configuration read from the web.xml file. Has an alternative constructor (PortalConfiguration(String)
) to be used outside the web container.- Since:
- 4.0.2
- Version:
- $Revision$ $Date$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PortalConfiguration.SystemBean
Bean used as system variable in lumisDataPath EL evaluation.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SYSTEM_PROPERTY_LUMIS_DATA_PATH
System property name for Lumis data path.
-
Constructor Summary
Constructors Constructor Description PortalConfiguration()
Constructor for the web container to call it as a ServletContextListener.PortalConfiguration(java.lang.String lumisDataDir)
Constructor for custom configuration outside a web container.PortalConfiguration(java.lang.String lumisDataDir, boolean initialize)
Constructor for custom configuration outside a web container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent event)
Cleanup the current portal configuration, if initialized through the web.xml.void
contextInitialized(javax.servlet.ServletContextEvent event)
Initializes the current portal configuration.static PortalConfiguration
getCurrentConfiguration()
Returns the current portal configuration.java.lang.String
getLumisDataPath()
Returns the lumis data path.void
init(javax.servlet.ServletContextEvent event)
boolean
isDevelopmentMode()
Indicates if the portal is running in development mode.static boolean
isInitialized()
Returns whether the LumisXP core system completed its runtime initialization.static void
setCurrentConfiguration(PortalConfiguration currentConfiguration)
Method for setting a custom configuration outside a web container.
-
-
-
Field Detail
-
SYSTEM_PROPERTY_LUMIS_DATA_PATH
public static final java.lang.String SYSTEM_PROPERTY_LUMIS_DATA_PATH
System property name for Lumis data path.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PortalConfiguration
public PortalConfiguration()
Constructor for the web container to call it as a ServletContextListener.
-
PortalConfiguration
public PortalConfiguration(java.lang.String lumisDataDir)
Constructor for custom configuration outside a web container. The portal is initialized as a result of a call to this constructor.- See Also:
PortalConfiguration(String, boolean)
-
PortalConfiguration
public PortalConfiguration(java.lang.String lumisDataDir, boolean initialize)
Constructor for custom configuration outside a web container.- Parameters:
lumisDataDir
- the path for the portal lumisdata directory.initialize
- if true, the portal will be initialized. Use false only when performing operations without an existing database, such as initializing the portal database.- Since:
- 4.0.7
-
-
Method Detail
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
Initializes the current portal configuration.- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
- Parameters:
event
- instance of ServletContextEvent- Since:
- 5.6.0
-
init
public void init(javax.servlet.ServletContextEvent event)
-
isInitialized
public static boolean isInitialized()
Returns whether the LumisXP core system completed its runtime initialization.- Returns:
true
if it is initialized,false
otherwise.- Since:
- 14.1.0
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
Cleanup the current portal configuration, if initialized through the web.xml.- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
-
getLumisDataPath
public java.lang.String getLumisDataPath()
Returns the lumis data path.
-
isDevelopmentMode
public boolean isDevelopmentMode()
Indicates if the portal is running in development mode.- Since:
- 4.2.0
-
getCurrentConfiguration
public static PortalConfiguration getCurrentConfiguration()
Returns the current portal configuration.
-
setCurrentConfiguration
public static void setCurrentConfiguration(PortalConfiguration currentConfiguration)
Method for setting a custom configuration outside a web container.
-
-