Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.generalconfig
Class ConfigurationManager

java.lang.Object
  extended by net.java.sip.communicator.plugin.generalconfig.ConfigurationManager

public class ConfigurationManager
extends Object


Field Summary
static String CTRL_ENTER_COMMAND
           
static String ENTER_COMMAND
           
 
Constructor Summary
ConfigurationManager()
           
 
Method Summary
static String[] getAvailableSslProtocols()
           
static int getChatHistorySize()
          Returns the number of messages from chat history that would be shown in the chat window.
static int getClientPort()
           
static int getClientSecurePort()
           
static Locale getCurrentLanguage()
           
static String[] getEnabledSslProtocols()
           
static String getPopupHandlerConfig()
          Gets the configuration handler which is currently in use.
static String getSendMessageCommand()
          Return the "sendMessageCommand" property that was saved previously through the ConfigurationService.
static int getWindowTransparency()
          Returns the transparency value for all transparent windows.
static boolean isAutoPopupNewMessage()
          Return TRUE if "autoPopupNewMessage" property is true, otherwise - return FALSE.
static boolean isHistoryLoggingEnabled()
          Returns true if the "isHistoryLoggingEnabled" property is true, otherwise - returns false.
static boolean isHistoryShown()
          Returns true if the "isHistoryShown" property is true, otherwise - returns false.
static boolean isLeaveChatRoomOnWindowCloseEnabled()
          Returns true if the "isLeaveChatRoomOnWindowCloseEnabled" property is true, otherwise - returns false.
static boolean isMultiChatWindowEnabled()
          Returns true if the "isMultiChatWindowEnabled" property is true, otherwise - returns false.
static boolean isNormalizePhoneNumber()
          Returns true if phone numbers should be normalized, false otherwise.
static boolean isSendTypingNotifications()
          Return TRUE if "sendTypingNotifications" property is true, otherwise - return FALSE.
static boolean isTransparentWindowEnabled()
          Returns true if transparent windows are enabled, false otherwise.
static void loadGuiConfigurations()
           
static void setAutoPopupNewMessage(boolean autoPopupNewMessage)
          Updates the "autoPopupNewMessage" property.
static void setChatHistorySize(int historySize)
          Updates the "chatHistorySize" property through the ConfigurationService.
static void setClientPort(int port)
           
static void setClientSecurePort(int port)
           
static void setEnabledSslProtocols(String[] enabledProtocols)
           
static void setHistoryLoggingEnabled(boolean isHistoryLoggingEnabled)
          Updates the "isHistoryLoggingEnabled" property through the ConfigurationService.
static void setHistoryShown(boolean isHistoryShown)
          Updates the "isHistoryShown" property through the ConfigurationService.
static void setLanguage(Locale locale)
           
static void setLeaveChatRoomOnWindowClose(boolean isLeaveChatroomOnWindowClose)
          Updates the "isLeaveChatroomOnWindowClose" property through the ConfigurationService.
static void setMultiChatWindowEnabled(boolean isMultiChatWindowEnabled)
          Updates the "isMultiChatWindowEnabled" property through the ConfigurationService.
static void setNormalizePhoneNumber(boolean isNormalize)
          Updates the "NORMALIZE_PHONE_NUMBER" property.
static void setPopupHandlerConfig(String handler)
          Saves the popup handler choice made by the user.
static void setSendMessageCommand(String newMessageCommand)
          Updates the "sendMessageCommand" property through the ConfigurationService.
static void setSendTypingNotifications(boolean isSendTypingNotif)
          Updates the "sendTypingNotifications" property through the ConfigurationService.
static void setTransparentWindowEnabled(boolean isTransparentWindowEnabled)
           
static void setWindowTransparency(int windowTransparency)
          Updates the "WINDOW_TRANSPARENCY" property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTER_COMMAND

public static final String ENTER_COMMAND
See Also:
Constant Field Values

CTRL_ENTER_COMMAND

public static final String CTRL_ENTER_COMMAND
See Also:
Constant Field Values
Constructor Detail

ConfigurationManager

public ConfigurationManager()
Method Detail

loadGuiConfigurations

public static void loadGuiConfigurations()

isAutoPopupNewMessage

public static boolean isAutoPopupNewMessage()
Return TRUE if "autoPopupNewMessage" property is true, otherwise - return FALSE. Indicates to the user interface whether new messages should be opened and bring to front.

Returns:
TRUE if "autoPopupNewMessage" property is true, otherwise - return FALSE.

isSendTypingNotifications

public static boolean isSendTypingNotifications()
Return TRUE if "sendTypingNotifications" property is true, otherwise - return FALSE. Indicates to the user interface whether typing notifications are enabled or disabled.

Returns:
TRUE if "sendTypingNotifications" property is true, otherwise - return FALSE.

isMultiChatWindowEnabled

public static boolean isMultiChatWindowEnabled()
Returns true if the "isMultiChatWindowEnabled" property is true, otherwise - returns false. Indicates to the user interface whether the chat window could contain multiple chats or just one chat.

Returns:
true if the "isMultiChatWindowEnabled" property is true, otherwise - returns false.

isLeaveChatRoomOnWindowCloseEnabled

public static boolean isLeaveChatRoomOnWindowCloseEnabled()
Returns true if the "isLeaveChatRoomOnWindowCloseEnabled" property is true, otherwise - returns false. Indicates to the user interface whether when closing the chat window we would leave the chat room.

Returns:
true if the "isLeaveChatRoomOnWindowCloseEnabled" property is true, otherwise - returns false.

isHistoryLoggingEnabled

public static boolean isHistoryLoggingEnabled()
Returns true if the "isHistoryLoggingEnabled" property is true, otherwise - returns false. Indicates to the user interface whether the history logging is enabled.

Returns:
true if the "isHistoryLoggingEnabled" property is true, otherwise - returns false.

isHistoryShown

public static boolean isHistoryShown()
Returns true if the "isHistoryShown" property is true, otherwise - returns false. Indicates to the user whether the history is shown in the chat window.

Returns:
true if the "isHistoryShown" property is true, otherwise - returns false.

getChatHistorySize

public static int getChatHistorySize()
Returns the number of messages from chat history that would be shown in the chat window.

Returns:
the number of messages from chat history that would be shown in the chat window.

getSendMessageCommand

public static String getSendMessageCommand()
Return the "sendMessageCommand" property that was saved previously through the ConfigurationService. Indicates to the user interface whether the default send message command is Enter or CTRL-Enter.

Returns:
"Enter" or "CTRL-Enter" message commands.

getPopupHandlerConfig

public static String getPopupHandlerConfig()
Gets the configuration handler which is currently in use.

Returns:
the configuration handler which is currently in use

setPopupHandlerConfig

public static void setPopupHandlerConfig(String handler)
Saves the popup handler choice made by the user.

Parameters:
handler - the handler which will be used

isTransparentWindowEnabled

public static boolean isTransparentWindowEnabled()
Returns true if transparent windows are enabled, false otherwise.

Returns:
true if transparent windows are enabled, false otherwise.

setTransparentWindowEnabled

public static void setTransparentWindowEnabled(boolean isTransparentWindowEnabled)

isNormalizePhoneNumber

public static boolean isNormalizePhoneNumber()
Returns true if phone numbers should be normalized, false otherwise.

Returns:
true if phone numbers should be normalized, false otherwise.

setNormalizePhoneNumber

public static void setNormalizePhoneNumber(boolean isNormalize)
Updates the "NORMALIZE_PHONE_NUMBER" property.

Parameters:
isNormalize - indicates to the user interface whether all dialed phone numbers should be normalized

getWindowTransparency

public static int getWindowTransparency()
Returns the transparency value for all transparent windows.

Returns:
the transparency value for all transparent windows.

setWindowTransparency

public static void setWindowTransparency(int windowTransparency)
Updates the "WINDOW_TRANSPARENCY" property.

Parameters:
windowTransparency - indicates to the user interface what is the window transparency value

setAutoPopupNewMessage

public static void setAutoPopupNewMessage(boolean autoPopupNewMessage)
Updates the "autoPopupNewMessage" property.

Parameters:
autoPopupNewMessage - indicates to the user interface whether new messages should be opened and bring to front.

setSendTypingNotifications

public static void setSendTypingNotifications(boolean isSendTypingNotif)
Updates the "sendTypingNotifications" property through the ConfigurationService.

Parameters:
isSendTypingNotif - true to indicate that typing notifications are enabled, false otherwise.

setSendMessageCommand

public static void setSendMessageCommand(String newMessageCommand)
Updates the "sendMessageCommand" property through the ConfigurationService.

Parameters:
newMessageCommand - the command used to send a message ( it could be ENTER_COMMAND or CTRL_ENTER_COMMAND)

setMultiChatWindowEnabled

public static void setMultiChatWindowEnabled(boolean isMultiChatWindowEnabled)
Updates the "isMultiChatWindowEnabled" property through the ConfigurationService.

Parameters:
isMultiChatWindowEnabled - indicates if the chat window could contain multiple chats or only one chat.

setLeaveChatRoomOnWindowClose

public static void setLeaveChatRoomOnWindowClose(boolean isLeaveChatroomOnWindowClose)
Updates the "isLeaveChatroomOnWindowClose" property through the ConfigurationService.

Parameters:
isLeaveChatroomOnWindowClose - indicates whether to leave chat room on window close.

setHistoryLoggingEnabled

public static void setHistoryLoggingEnabled(boolean isHistoryLoggingEnabled)
Updates the "isHistoryLoggingEnabled" property through the ConfigurationService.

Parameters:
isHistoryLoggingEnabled - indicates if the history logging is enabled.

setHistoryShown

public static void setHistoryShown(boolean isHistoryShown)
Updates the "isHistoryShown" property through the ConfigurationService.

Parameters:
isHistoryShown - indicates if the message history is shown

setChatHistorySize

public static void setChatHistorySize(int historySize)
Updates the "chatHistorySize" property through the ConfigurationService.

Parameters:
historySize - indicates if the history logging is enabled.

getCurrentLanguage

public static Locale getCurrentLanguage()

setLanguage

public static void setLanguage(Locale locale)

setClientPort

public static void setClientPort(int port)

setClientSecurePort

public static void setClientSecurePort(int port)

getClientPort

public static int getClientPort()

getClientSecurePort

public static int getClientSecurePort()

getAvailableSslProtocols

public static String[] getAvailableSslProtocols()

getEnabledSslProtocols

public static String[] getEnabledSslProtocols()

setEnabledSslProtocols

public static void setEnabledSslProtocols(String[] enabledProtocols)

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.