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 voidCopies the contents atsrctodst.Cache[]intintgetPageProperty(String pageName, String property, int defaultValue) intgetRange()intgetRefreshValue(String pageName, int defaultValue) Returns the number of seconds between each page refresh for the specified page for the current logged user.intgetRowsPerPage(String pageName, int defaultValue) Returns the number of rows per page for the specified page for the current logged user.intgetStart()getUser()javax.servlet.http.HttpSessionInvalidates and recreates session (do this on login/logout).booleanbooleanbooleanvoidLogs a security event as the currently logged in user.voidrestart()Restarts the server then sleeps for 3 seconds.voidsetPageProperty(String pageName, String property, int newValue) voidsetRange(int range) voidsetRefreshValue(String pageName, int newValue) Sets the number of seconds between each page refresh for the specified page for the current logged user.voidsetRowsPerPage(String pageName, int newValue) Sets the new number of rows per page for the specified page for the current logged user.voidsetStart(int start) protected voidvoidstop()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:
trueif the Openfire container is in setup mode,falseotherwise.
-
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
nullif one is not found.
-
isEmbedded
public boolean isEmbedded()- Returns:
trueif the server is in embedded mode,falseotherwise.
-
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 atsrctodst.- 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
-