|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.chat.business.ChatRoom
public class ChatRoom
This class provides methods for the ChatRoom objects
| Field Summary | |
|---|---|
static int |
INVALID_ROOM
|
static int |
USER_ADDED
|
static int |
USER_ALREADY_EXISTS
|
static int |
USER_IS_BANNED
|
| Constructor Summary | |
|---|---|
ChatRoom(java.lang.String strName,
java.lang.String strDescription)
Creates a new ChatRoom object. |
|
| Method Summary | |
|---|---|
void |
addChatEntry(ChatEntry entry,
ChatUser userRecipient)
Adds an entry to this chat room |
void |
addChatEntry(ChatUser userSender,
ChatEntry entry,
ChatUser userRecipient)
Adds an entry to this chat room |
int |
addUser(ChatUser user)
Checks if the user specified in parameter is not already existent in the room and if it is not banned. |
void |
banUser(java.lang.String strPseudo,
java.lang.String strComment)
Bannes a user from the room and comments it. |
int |
changePseudo(java.lang.String strPseudo,
java.lang.String strNewNickname)
Modifies the nick name of the user |
void |
debanUser(java.lang.String strIpAddress)
Removes an ip address from the list of those which are banned from the room |
java.lang.String |
getAdminPassword()
The password of the admin |
java.util.Enumeration |
getBannedUsers()
Returns the list of the users banned from this room |
java.lang.String |
getBgColor()
Returns the background color of the room |
java.lang.String |
getButtonBgColor()
Returns the background color of the button |
java.lang.String |
getButtonFgColor()
Returns the foreground color of the button |
java.lang.String |
getDescription()
Retruns the description of this room |
java.lang.String |
getFieldBgColor()
Returns the background color of the text field |
java.lang.String |
getName()
The name of this room |
java.util.Vector |
getRoomEntries()
The list of the entries of the room |
ChatUser |
getUser(java.lang.String strPseudo)
Returns the ChatUser object whose pseudo is specified in parameter |
int |
getUserCount()
Returns the numbers of users in the room |
java.util.Enumeration |
getUsers()
Returns the list of the users of this room |
void |
removeOldPseudo(java.lang.String strPseudo)
Removes the user which has this pseudo in the room. |
void |
removeUser(java.lang.String strPseudo)
Removes the user which has this pseudo in the room. |
void |
setAdminPassword(java.lang.String strAdminPassword)
Sets the password of the room |
void |
setBgColor(java.lang.String strBgColor)
Sets the background color of the room |
void |
setButtonBgColor(java.lang.String strButtonBgColor)
Sets the button background color |
void |
setButtonFgColor(java.lang.String strButtonFgColor)
Sets the foreground color of the button |
void |
setDescription(java.lang.String strDescription)
Sets the description of this room whith the specified string |
void |
setFieldBgColor(java.lang.String strFieldBgColor)
Sets the background color of the text field |
void |
setLastAccessTime(java.lang.String strPseudo)
Sets the last access to the room of the user which corresponds to the pseudo specified in parameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INVALID_ROOM
public static final int USER_ADDED
public static final int USER_ALREADY_EXISTS
public static final int USER_IS_BANNED
| Constructor Detail |
|---|
public ChatRoom(java.lang.String strName,
java.lang.String strDescription)
strName - The name of the roomstrDescription - The description of the room| Method Detail |
|---|
public void addChatEntry(ChatEntry entry,
ChatUser userRecipient)
entry - The chat entry to add to the roomuserRecipient - The user which receives the message
public void addChatEntry(ChatUser userSender,
ChatEntry entry,
ChatUser userRecipient)
userSender - The user which sends the messageentry - The chat entry to add to the roomuserRecipient - The user which receives the messagepublic int addUser(ChatUser user)
user - The user to add to the room
public int changePseudo(java.lang.String strPseudo,
java.lang.String strNewNickname)
strPseudo - The old pseudostrNewNickname - The new pseudo
public void removeOldPseudo(java.lang.String strPseudo)
strPseudo - The pseudo of the user to delete from the roompublic int getUserCount()
public void removeUser(java.lang.String strPseudo)
strPseudo - The pseudo of the user to delete from the room
public void banUser(java.lang.String strPseudo,
java.lang.String strComment)
strPseudo - The pseudo to banstrComment - The comment to add to this banpublic void debanUser(java.lang.String strIpAddress)
strIpAddress - The ip address to authorize againpublic java.util.Enumeration getUsers()
public java.util.Vector getRoomEntries()
public java.util.Enumeration getBannedUsers()
public java.lang.String getDescription()
public java.lang.String getName()
public void setLastAccessTime(java.lang.String strPseudo)
strPseudo - The user's pseudopublic ChatUser getUser(java.lang.String strPseudo)
strPseudo - The pseudo of the user to get
public void setAdminPassword(java.lang.String strAdminPassword)
strAdminPassword - The new password of the adminpublic java.lang.String getAdminPassword()
public void setDescription(java.lang.String strDescription)
strDescription - The description of the roompublic void setBgColor(java.lang.String strBgColor)
strBgColor - The background colorpublic java.lang.String getBgColor()
public void setButtonBgColor(java.lang.String strButtonBgColor)
strButtonBgColor - The button's background colorpublic java.lang.String getButtonBgColor()
public void setButtonFgColor(java.lang.String strButtonFgColor)
strButtonFgColor - The button's foreground colorpublic java.lang.String getButtonFgColor()
public void setFieldBgColor(java.lang.String strFieldBgColor)
strFieldBgColor - The text field's background colorpublic java.lang.String getFieldBgColor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||