com.jivesoftware.sparkimpl.settings.local
Class LocalPreferences

java.lang.Object
  extended bycom.jivesoftware.sparkimpl.settings.local.LocalPreferences

public class LocalPreferences
extends java.lang.Object

Represents the LocalPreference Model for this system.


Constructor Summary
LocalPreferences()
          Empty Constructor.
 
Method Summary
 void addFolder(java.lang.String folder)
          Add an email folder for future parsing.
 java.lang.String getDefaultNickname()
           
 java.lang.String getDownloadDir()
           
 java.util.Collection getFolderList()
          Returns a Collection of all Email folders.
 java.lang.String getHost()
           
 java.util.Date getLastCheckForUpdates()
           
 java.lang.String getPassword()
          Returns the encoded password.
 java.lang.String getPort()
           
 java.lang.String getProtocol()
           
 java.lang.String getProxyPassword()
           
 java.lang.String getProxyUsername()
           
 java.lang.String getResource()
           
 int getSecondIdleTime()
          Returns the number of minutes to set to unavailable if the computer has no activity.
 java.lang.String getServer()
          Returns the last Server accessed.
 int getTimeOut()
          Return the smack timeout for requests.
 java.lang.String getUsername()
          Returns the users username.
 java.lang.String getXmppHost()
           
 int getXmppPort()
          Returns the XMPP Port to communicate on.
 boolean isAutoLogin()
          Return true if Auto Login is on.
 boolean isChatRoomNotificationsOff()
           
 boolean isHideChatHistory()
           
 boolean isHostAndPortConfigured()
           
 boolean isIdleOn()
          Return true if the IDLE feature is on.
 boolean isIndexing()
          Returns true if indexing is turned on.
 boolean isNewInstall()
          Return true if this is a fresh install.
 boolean isPrompted()
           
 boolean isProxyEnabled()
           
 boolean isSavePassword()
          Return true if the password should be encoded and persisted.
 boolean isSpellCheckerDisable()
           
 boolean isSSL()
          Returns true to use SSL.
 boolean isStartedHidden()
           
 boolean isTimeDisplayedInChat()
           
 void setAutoLogin(boolean autoLogin)
          Turn on or off Auto Login.
 void setChatRoomNotificationsOff(boolean chatRoomNotificationsOff)
           
 void setDefaultNickname(java.lang.String defaultNickname)
           
 void setDownloadDir(java.lang.String downloadDir)
           
 void setHideChatHistory(boolean hideChatHistory)
           
 void setHost(java.lang.String host)
           
 void setHostAndPortConfigured(boolean hostAndPortConfigured)
           
 void setIdleOn(boolean idleOn)
          Set the IDLE feature on or off.
 void setIndexing(boolean indexing)
          Set to true if indexing is turned on.
 void setLastCheckForUpdates(java.util.Date lastCheckForUpdates)
           
 void setNewInstall(boolean newInstall)
          Set if this is a fresh install.
 void setPassword(java.lang.String password)
          Sets the encoded password.
 void setPort(java.lang.String port)
           
 void setPrompted(boolean prompted)
           
 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 setSecondIdleTime(int secondIdleTime)
          Set the number of minutes to set to unavailable if the computer has no activity.
 void setServer(java.lang.String server)
          Sets the last Server accessed.
 void setSpellCheckerDisable(boolean spellCheckerDisable)
           
 void setSSL(boolean SSL)
          Sets if the agent should use SSL for connecting.
 void setStartedHidden(boolean startedHidden)
           
 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 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()
Empty Constructor.

Method Detail

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.

getSecondIdleTime

public int getSecondIdleTime()
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.

setSecondIdleTime

public void setSecondIdleTime(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.

addFolder

public void addFolder(java.lang.String folder)
Add an email folder for future parsing.

Parameters:
folder - folder to add.

getFolderList

public java.util.Collection getFolderList()
Returns a Collection of all Email folders.

Returns:
a Collection of all Email Folders.

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.

isIndexing

public boolean isIndexing()
Returns true if indexing is turned on.

Returns:
true if indexing is turned on.

setIndexing

public void setIndexing(boolean indexing)
Set to true if indexing is turned on.

Parameters:
indexing - true if indexing is turned on.

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.

isPrompted

public boolean isPrompted()

setPrompted

public void setPrompted(boolean prompted)

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 hostAndPortConfigured)

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)

isSpellCheckerDisable

public boolean isSpellCheckerDisable()

setSpellCheckerDisable

public void setSpellCheckerDisable(boolean spellCheckerDisable)

isChatRoomNotificationsOff

public boolean isChatRoomNotificationsOff()

setChatRoomNotificationsOff

public void setChatRoomNotificationsOff(boolean chatRoomNotificationsOff)

isHideChatHistory

public boolean isHideChatHistory()

setHideChatHistory

public void setHideChatHistory(boolean hideChatHistory)