org.olat.admin
Class AdminModule

java.lang.Object
  extended by org.olat.admin.AdminModule
All Implemented Interfaces:
OLATModule

public class AdminModule
extends java.lang.Object
implements OLATModule

Description:
The administration module takes care of loading and unloading administration specific configuration.

Initial Date: Apr 13, 2005

Author:
gnaegi

Field Summary
static java.lang.String SYSTEM_PROPERTY_CATEGORY
          Category for system properties
 
Constructor Summary
AdminModule()
           
 
Method Summary
static boolean checkMaintenanceMessageToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static boolean checkSessionAdminToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void destroy()
          Caled during Servlet.destroy()
 void enableHibernateStatistics(boolean enableStatistics)
          Enable hibernate-statistics (for JMX interface).
static int getMaxSessions()
           
static int getSessionTimeout()
           
 void init(com.anthonyeden.lib.config.Configuration moduleConfig)
          Called by ConfigurationManager during statrup.
static int invalidateAllSessions()
          Invalidated all session except administrator-sessions.
static int invalidateOldestSessions(int nbrSessions)
          Invalidate a number of oldest (last-click time) sessions.
static boolean isLoginBlocked()
          Check if login is blocked
static boolean isRejectDMZRequests()
          Check if requests to DMZ are rejected resulting in clients to go to another node
static void setLoginBlocked(boolean newLoginBlocked)
          Does not allow any further login except administrator-logins.
static void setMaintenanceMessage(java.lang.String message)
          Sets the new maintenance message based on a http parameter.
static void setMaxSessions(int maxSession)
          Set limit for session.
static void setRejectDMZRequests(boolean rejectDMZRequests)
          Set the rejectDMZRequests flag - if true this will reject all requests to dmz to other nodes
static void setSessionTimeout(int sessionTimeout)
          Set global session timeout in msec.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_PROPERTY_CATEGORY

public static java.lang.String SYSTEM_PROPERTY_CATEGORY
Category for system properties

Constructor Detail

AdminModule

public AdminModule()
Method Detail

init

public void init(com.anthonyeden.lib.config.Configuration moduleConfig)
Description copied from interface: OLATModule
Called by ConfigurationManager during statrup. Module is called in the order it is registered in olat_config.xml. On any critical errors, throw StartupException. Any other errors, just throw Exceptions. OLATContext will already be initialized at this stage.

Specified by:
init in interface OLATModule
See Also:
OLATModule.init(com.anthonyeden.lib.config.Configuration)

destroy

public void destroy()
Description copied from interface: OLATModule
Caled during Servlet.destroy()

Specified by:
destroy in interface OLATModule
See Also:
OLATModule.destroy()

setMaintenanceMessage

public static void setMaintenanceMessage(java.lang.String message)
Sets the new maintenance message based on a http parameter. The request must use a valid token. The token can be looked up in the properties table. The maintenance message itself is managed by the OLATContext from the brasato core

Parameters:
message -

checkMaintenanceMessageToken

public static boolean checkMaintenanceMessageToken(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)

checkSessionAdminToken

public static boolean checkSessionAdminToken(javax.servlet.http.HttpServletRequest request,
                                             javax.servlet.http.HttpServletResponse response)

setLoginBlocked

public static void setLoginBlocked(boolean newLoginBlocked)
Does not allow any further login except administrator-logins.

Parameters:
newLoginBlocked -

isLoginBlocked

public static boolean isLoginBlocked()
Check if login is blocked

Returns:
true = login is blocked

setRejectDMZRequests

public static void setRejectDMZRequests(boolean rejectDMZRequests)
Set the rejectDMZRequests flag - if true this will reject all requests to dmz to other nodes

Parameters:
rejectDMZRequests -

isRejectDMZRequests

public static boolean isRejectDMZRequests()
Check if requests to DMZ are rejected resulting in clients to go to another node

Returns:
true = reject all requests to dmz (to other nodes)

setMaxSessions

public static void setMaxSessions(int maxSession)
Set limit for session. The login-process check this number and allows only this number of sessions. 0 = unlimited number of sessions

Parameters:
maxSession -

invalidateAllSessions

public static int invalidateAllSessions()
Invalidated all session except administrator-sessions.

Returns:
Number of invalidated sessions

invalidateOldestSessions

public static int invalidateOldestSessions(int nbrSessions)
Invalidate a number of oldest (last-click time) sessions.

Parameters:
nbrSessions -
Returns:
Number of invalidated sessions

setSessionTimeout

public static void setSessionTimeout(int sessionTimeout)
Set global session timeout in msec.

Parameters:
sessionTimeout -

getSessionTimeout

public static int getSessionTimeout()
Returns:
Current session timeout in msec.

getMaxSessions

public static int getMaxSessions()
Returns:
Current session-limit.

enableHibernateStatistics

public void enableHibernateStatistics(boolean enableStatistics)
Enable hibernate-statistics (for JMX interface).