org.jivesoftware.sparkimpl.settings.local
Class LocalPreferences

java.lang.Object
  extended by org.jivesoftware.sparkimpl.settings.local.LocalPreferences

public class LocalPreferences
extends java.lang.Object

Represents the LocalPreference Model for this system.


Constructor Summary
LocalPreferences()
           
LocalPreferences(java.util.Properties props)
           
 
Method Summary
 int getChatLengthDefaultTimeout()
           
 java.lang.String getDefaultNickname()
           
 java.lang.String getDownloadDir()
           
 int getFileTransferTimeout()
           
 java.lang.String getHost()
           
 int getIdleTime()
          Returns the number of minutes to set to unavailable if the computer has no activity.
 java.util.Date getLastCheckForUpdates()
           
 java.lang.String getNickname()
           
 java.lang.String getPassword()
          Returns the encoded password.
 java.lang.String getPort()
           
 java.util.Properties getProperties()
           
 java.lang.String getProtocol()
           
 java.lang.String getProxyPassword()
           
 java.lang.String getProxyUsername()
           
 java.lang.String getResource()
           
 java.lang.String getServer()
          Returns the last Server accessed.
 boolean getShowToasterPopup()
           
 boolean getStartOnStartup()
           
 int getTimeOut()
          Return the smack timeout for requests.
 java.lang.String getUsername()
          Returns the users username.
 boolean getWindowTakesFocus()
           
 java.lang.String getXmppHost()
           
 int getXmppPort()
          Returns the XMPP Port to communicate on.
 boolean isAutoLogin()
          Return true if Auto Login is on.
 boolean isChatHistoryEnabled()
           
 boolean isChatRoomNotificationsOn()
           
 boolean isCompressionEnabled()
           
 boolean isEmptyGroupsShown()
           
 boolean isHostAndPortConfigured()
           
 boolean isIdleOn()
          Return true if the IDLE feature is on.
 boolean isNewInstall()
          Return true if this is a fresh install.
 boolean isProxyEnabled()
           
 boolean isSavePassword()
          Return true if the password should be encoded and persisted.
 boolean isSpellCheckerEnabled()
           
 boolean isSSL()
          Returns true to use SSL.
 boolean isStartedHidden()
           
 boolean isTimeDisplayedInChat()
           
 void setAutoLogin(boolean autoLogin)
          Turn on or off Auto Login.
 void setChatHistoryEnabled(boolean hideChatHistory)
           
 void setChatLengthDefaultTimeout(int minutes)
           
 void setChatRoomNotifications(boolean on)
           
 void setCompressionEnabled(boolean on)
           
 void setDefaultNickname(java.lang.String defaultNickname)
           
 void setDownloadDir(java.lang.String downloadDir)
           
 void setEmptyGroupsShown(boolean shown)
           
 void setFileTransferTimeout(int minutes)
           
 void setHost(java.lang.String host)
           
 void setHostAndPortConfigured(boolean configured)
           
 void setIdleOn(boolean idleOn)
          Set the IDLE feature on or off.
 void setIdleTime(int secondIdleTime)
          Set the number of minutes to set to unavailable if the computer has no activity.
 void setLastCheckForUpdates(java.util.Date lastCheckForUpdates)
           
 void setNewInstall(boolean newInstall)
          Set if this is a fresh install.
 void setNickname(java.lang.String nickname)
           
 void setPassword(java.lang.String password)
          Sets the encoded password.
 void setPort(java.lang.String port)
           
 void setProtocol(java.lang.String protocol)
           
 void setProxyEnabled(boolean proxyEnabled)
           
 void setProxyPassword(java.lang.String proxyPassword)
           
 void setProxyUsername(java.lang.String proxyUsername)
           
 void setResource(java.lang.String resource)
           
 void setSavePassword(boolean savePassword)
          Set to true to encode and save password.
 void setServer(java.lang.String server)
          Sets the last Server accessed.
 void setShowToasterPopup(boolean show)
           
 void setSpellCheckerEnabled(boolean enabled)
           
 void setSSL(boolean ssl)
          Sets if the agent should use SSL for connecting.
 void setStartedHidden(boolean startedHidden)
           
 void setStartOnStartup(boolean startup)
           
 void setTimeDisplayedInChat(boolean timeDisplayedInChat)
           
 void setTimeOut(int timeOut)
          Sets the smack timeout for requests.
 void setUsername(java.lang.String username)
          Sets the Agents username.
 void setWindowTakesFocus(boolean focus)
           
 void setXmppHost(java.lang.String xmppHost)
           
 void setXmppPort(int xmppPort)
          Sets the XMPP Port to communicate on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalPreferences

public LocalPreferences(java.util.Properties props)

LocalPreferences

public LocalPreferences()
Method Detail

getProperties

public java.util.Properties getProperties()

getXmppPort

public int getXmppPort()
Returns the XMPP Port to communicate on.

Returns:
the XMPP Port to communicate on. Default is 5222.

setXmppPort

public void setXmppPort(int xmppPort)
Sets the XMPP Port to communicate on.

Parameters:
xmppPort - the XMPP Port to communicate on. Default is 5222.

getTimeOut

public int getTimeOut()
Return the smack timeout for requests. Default is 5 seconds.

Returns:
the smack timeout for requests.

setTimeOut

public void setTimeOut(int timeOut)
Sets the smack timeout for requests. The default is 5 seconds, but you may wish to increase this number for low bandwidth users.

Parameters:
timeOut - the smack timeout.

getPassword

public java.lang.String getPassword()
Returns the encoded password.

Returns:
the encoded password.

setPassword

public void setPassword(java.lang.String password)
Sets the encoded password.

Parameters:
password - the encoded password.

isIdleOn

public boolean isIdleOn()
Return true if the IDLE feature is on. The IDLE feature allows to monitor computer activity and set presence accordingly.

Returns:
true if IDLE is on.

setIdleOn

public void setIdleOn(boolean idleOn)
Set the IDLE feature on or off. The IDLE feature allows to monitor computer activity and set presence accordingly.

Parameters:
idleOn - true to turn idle on.

getIdleTime

public int getIdleTime()
Returns the number of minutes to set to unavailable if the computer has no activity.

Returns:
the number of minutes before checking for IDLE computer.

setIdleTime

public void setIdleTime(int secondIdleTime)
Set the number of minutes to set to unavailable if the computer has no activity.

Parameters:
secondIdleTime - the number of minutes.

isAutoLogin

public boolean isAutoLogin()
Return true if Auto Login is on.

Returns:
true if Auto Login is on.

setAutoLogin

public void setAutoLogin(boolean autoLogin)
Turn on or off Auto Login. Auto Login allows a user to login to the system without inputting their signing information.

Parameters:
autoLogin - true if Auto Login should be on.

isSavePassword

public boolean isSavePassword()
Return true if the password should be encoded and persisted.

Returns:
true if the password is encoded and persisted.

setSavePassword

public void setSavePassword(boolean savePassword)
Set to true to encode and save password. You would use this if you wish to not always input ones password.

Parameters:
savePassword - true if the password should be saved.

getUsername

public java.lang.String getUsername()
Returns the users username.

Returns:
the username of the agent.

setUsername

public void setUsername(java.lang.String username)
Sets the Agents username.

Parameters:
username - the agents username.

getServer

public java.lang.String getServer()
Returns the last Server accessed.

Returns:
the last Server accessed.

setServer

public void setServer(java.lang.String server)
Sets the last Server accessed.

Parameters:
server - the last Server accessed.

isNewInstall

public boolean isNewInstall()
Return true if this is a fresh install.

Returns:
true if a fresh install.

setNewInstall

public void setNewInstall(boolean newInstall)
Set if this is a fresh install.

Parameters:
newInstall - true if this is a fresh install.

isSSL

public boolean isSSL()
Returns true to use SSL.

Returns:
true if we should connect via SSL.

setSSL

public void setSSL(boolean ssl)
Sets if the agent should use SSL for connecting.

Parameters:
ssl - true if we should be using SSL.

getDownloadDir

public java.lang.String getDownloadDir()

setDownloadDir

public void setDownloadDir(java.lang.String downloadDir)

isProxyEnabled

public boolean isProxyEnabled()

setProxyEnabled

public void setProxyEnabled(boolean proxyEnabled)

getHost

public java.lang.String getHost()

setHost

public void setHost(java.lang.String host)

getPort

public java.lang.String getPort()

setPort

public void setPort(java.lang.String port)

getProxyUsername

public java.lang.String getProxyUsername()

setProxyUsername

public void setProxyUsername(java.lang.String proxyUsername)

getProxyPassword

public java.lang.String getProxyPassword()

setProxyPassword

public void setProxyPassword(java.lang.String proxyPassword)

getProtocol

public java.lang.String getProtocol()

setProtocol

public void setProtocol(java.lang.String protocol)

getDefaultNickname

public java.lang.String getDefaultNickname()

setDefaultNickname

public void setDefaultNickname(java.lang.String defaultNickname)

getLastCheckForUpdates

public java.util.Date getLastCheckForUpdates()

setLastCheckForUpdates

public void setLastCheckForUpdates(java.util.Date lastCheckForUpdates)

getXmppHost

public java.lang.String getXmppHost()

setXmppHost

public void setXmppHost(java.lang.String xmppHost)

isHostAndPortConfigured

public boolean isHostAndPortConfigured()

setHostAndPortConfigured

public void setHostAndPortConfigured(boolean configured)

getResource

public java.lang.String getResource()

setResource

public void setResource(java.lang.String resource)

isStartedHidden

public boolean isStartedHidden()

setStartedHidden

public void setStartedHidden(boolean startedHidden)

isTimeDisplayedInChat

public boolean isTimeDisplayedInChat()

setTimeDisplayedInChat

public void setTimeDisplayedInChat(boolean timeDisplayedInChat)

isSpellCheckerEnabled

public boolean isSpellCheckerEnabled()

setSpellCheckerEnabled

public void setSpellCheckerEnabled(boolean enabled)

isChatRoomNotificationsOn

public boolean isChatRoomNotificationsOn()

setChatRoomNotifications

public void setChatRoomNotifications(boolean on)

isChatHistoryEnabled

public boolean isChatHistoryEnabled()

setChatHistoryEnabled

public void setChatHistoryEnabled(boolean hideChatHistory)

isEmptyGroupsShown

public boolean isEmptyGroupsShown()

setEmptyGroupsShown

public void setEmptyGroupsShown(boolean shown)

getFileTransferTimeout

public int getFileTransferTimeout()

setFileTransferTimeout

public void setFileTransferTimeout(int minutes)

setChatLengthDefaultTimeout

public void setChatLengthDefaultTimeout(int minutes)

getChatLengthDefaultTimeout

public int getChatLengthDefaultTimeout()

setNickname

public void setNickname(java.lang.String nickname)

getNickname

public java.lang.String getNickname()

setShowToasterPopup

public void setShowToasterPopup(boolean show)

getShowToasterPopup

public boolean getShowToasterPopup()

setWindowTakesFocus

public void setWindowTakesFocus(boolean focus)

getWindowTakesFocus

public boolean getWindowTakesFocus()

setStartOnStartup

public void setStartOnStartup(boolean startup)

getStartOnStartup

public boolean getStartOnStartup()

setCompressionEnabled

public void setCompressionEnabled(boolean on)

isCompressionEnabled

public boolean isCompressionEnabled()