swpchat.client
Class UserInfoPersistentDataHandler

java.lang.Object
  |
  +--swpchat.client.SWPConfig
        |
        +--swpchat.client.UserInfoPersistentDataHandler
All Implemented Interfaces:
ChatTokens, UserInfoTokens

public class UserInfoPersistentDataHandler
extends SWPConfig
implements UserInfoTokens

encapusates access to persistent UserInfos (means: saved userinfos in the .SpChatConfig

Author:
Rene Woerzberger, Leonid Ostwald

Field Summary
(package private) static java.lang.String CLS
           
 
Fields inherited from class swpchat.client.SWPConfig
PKConfigFileName, swpProps
 
Fields inherited from interface swpchat.protocol.UserInfoTokens
STR_CITY, STR_COLOR, STR_EMAIL, STR_FIRSTNAME, STR_HOMEPAGE, STR_LASTNAME, STR_MOTTO, STR_NICKNAME, STR_NULL_INFORMATION, STR_SEX, STR_SEX_DONTKNOW, STR_SEX_FEMALE, STR_SEX_MALE, STR_SHIP_STATUS, STR_STARTUPSEND, STR_STARTUPSEND_NEGATIVE, STR_STARTUPSEND_POSITIVE, STR_STREET, STR_USERINFO_PROP_BEGIN, STR_ZIP
 
Fields inherited from interface swpchat.protocol.ChatTokens
CHAR_ARG_SEP, CHAR_MSG_END, CHAR_MSG_EOL, CHAR_QUOTE, CHAR_STRING_DELIMITER, STR_ARG_SEP, STR_AUTHORIZE, STR_MSG_END, STR_MSG_EOL, STR_NEG_ARG, STR_NEGATIVE, STR_POS_ARG, STR_POSITIVE, STR_QUOTE, STR_REPLY, STR_STRING_DELIMITER, STR_WAIT
 
Constructor Summary
UserInfoPersistentDataHandler()
           
 
Method Summary
 java.awt.Color getStoredColor()
          returns the set color in the config file
 java.util.HashMap loadUserInfo()
          collects userInfos of the config file
 void storeUserInfo(java.util.HashMap hashMap)
          store given hashMap into the config file with the "UserInfo." prefix
 
Methods inherited from class swpchat.client.SWPConfig
getConfigFileName, getStoredProperties, propertyKeys, save
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

CLS

static final java.lang.String CLS
Constructor Detail

UserInfoPersistentDataHandler

public UserInfoPersistentDataHandler()
Method Detail

loadUserInfo

public java.util.HashMap loadUserInfo()
collects userInfos of the config file
Returns:
hashmap with the attribute names as keyword (i.e firstname) and the values as values (i.e. Rene)

storeUserInfo

public void storeUserInfo(java.util.HashMap hashMap)
store given hashMap into the config file with the "UserInfo." prefix
Parameters:
hashmap - containing the keywords and values to store

getStoredColor

public java.awt.Color getStoredColor()
returns the set color in the config file
Returns:
the color defined in the config file if found, else Color.blue