Package org.jivesoftware.util
Class WebManager
java.lang.Object
org.jivesoftware.util.WebBean
org.jivesoftware.util.WebManager
A utility bean for Openfire admin console pages.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Copies the contents atsrc
todst
.Cache[]
int
int
getPageProperty
(String pageName, String property, int defaultValue) int
getRange()
int
getRefreshValue
(String pageName, int defaultValue) Returns the number of seconds between each page refresh for the specified page for the current logged user.int
getRowsPerPage
(String pageName, int defaultValue) Returns the number of rows per page for the specified page for the current logged user.int
getStart()
getUser()
javax.servlet.http.HttpSession
Invalidates and recreates session (do this on login/logout).boolean
boolean
boolean
void
Logs a security event as the currently logged in user.void
restart()
Restarts the server then sleeps for 3 seconds.void
setPageProperty
(String pageName, String property, int newValue) void
setRange
(int range) void
setRefreshValue
(String pageName, int newValue) Sets the number of seconds between each page refresh for the specified page for the current logged user.void
setRowsPerPage
(String pageName, int newValue) Sets the new number of rows per page for the specified page for the current logged user.void
setStart
(int start) protected void
void
stop()
Stops the server then sleeps for 3 seconds.void
-
Constructor Details
-
WebManager
public WebManager()
-
-
Method Details
-
invalidateSession
public javax.servlet.http.HttpSession invalidateSession()Invalidates and recreates session (do this on login/logout).- Returns:
- the new HTTP session
-
getAuthToken
- Returns:
- the auth token; redirect to the login page if an auth token is not found.
-
isSetupMode
public boolean isSetupMode()- Returns:
true
if the Openfire container is in setup mode,false
otherwise.
-
getXMPPServer
- Returns:
- the XMPP server object -- can get many config items from here.
-
getUserManager
-
getGroupManager
-
getLockOutManager
-
getSecurityAuditManager
-
getRosterManager
-
getPrivateStore
-
getPresenceManager
-
getSessionManager
-
getMultiUserChatManager
-
getServerInfo
-
getPubSubInfo
-
logEvent
Logs a security event as the currently logged in user. (convenience routine for SecurityAuditManager)- Parameters:
summary
- Summary of event.details
- Details of event, can be null if no details available.
-
getUser
- Returns:
- the page user or
null
if one is not found.
-
isEmbedded
public boolean isEmbedded()- Returns:
true
if the server is in embedded mode,false
otherwise.
-
restart
public void restart()Restarts the server then sleeps for 3 seconds. -
stop
public void stop()Stops the server then sleeps for 3 seconds. -
getManager
-
validateService
public void validateService() -
isServerRunning
public boolean isServerRunning() -
setStart
public void setStart(int start) -
getStart
public int getStart() -
setRange
public void setRange(int range) -
getRange
public int getRange() -
getCurrentPage
public int getCurrentPage() -
showServerDown
protected void showServerDown() -
copy
Copies the contents atsrc
todst
.- Parameters:
src
- the source locationdst
- the target location- Throws:
IOException
- if the copy failed
-
getRowsPerPage
Returns the number of rows per page for the specified page for the current logged user. The rows per page value is stored as a user property. The same property is being used for different pages. The encoding format is the following "pageName1=value,pageName2=value".- Parameters:
pageName
- the name of the page to look up its stored value.defaultValue
- the default value to return if no user value was found.- Returns:
- the number of rows per page for the specified page for the current logged user.
-
setRowsPerPage
Sets the new number of rows per page for the specified page for the current logged user. The rows per page value is stored as a user property. The same property is being used for different pages. The encoding format is the following "pageName1=value,pageName2=value".- Parameters:
pageName
- the name of the page to stored its new value.newValue
- the new rows per page value.
-
getRefreshValue
Returns the number of seconds between each page refresh for the specified page for the current logged user. The value is stored as a user property. The same property is being used for different pages. The encoding format is the following "pageName1=value,pageName2=value".- Parameters:
pageName
- the name of the page to look up its stored value.defaultValue
- the default value to return if no user value was found.- Returns:
- the number of seconds between each page refresh for the specified page for the current logged user.
-
setRefreshValue
Sets the number of seconds between each page refresh for the specified page for the current logged user. The value is stored as a user property. The same property is being used for different pages. The encoding format is the following "pageName1=value,pageName2=value".- Parameters:
pageName
- the name of the page to stored its new value.newValue
- the new number of seconds between each page refresh.
-
getPageProperty
-
setPageProperty
-
getCaches
-