package com.cardshifter.api.outgoing;

import com.cardshifter.api.messages.Message;

public class UserStatusMessage extends Message {

	public enum Status {
		OFFLINE, ONLINE;
	}
	
	private int userId;
	private Status status;
	private String name;

    public UserStatusMessage() {
		this(-42, "", Status.OFFLINE);
	}
	
	public UserStatusMessage(int userId, String name, Status status) {
		super("userstatus");
		this.userId = userId;
		this.name = name;
		this.status = status;
	}
	
	public int getUserId() {
		return userId;
	}
	
	public Status getStatus() {
		return status;
	}
	
	public String getName() {
		return name;
	}

	@Override
	public String toString() {
		return "UserStatusMessage [userId=" + userId + ", status=" + status
				+ ", name=" + name + "]";
	}

}

@@ -77,16 +77,53 @@
 essage;%0A
+/** Communicates a player's status */
 %0Apublic 
@@ -164,16 +164,125 @@
 ssage %7B%0A
+%09%0A%09/**%0A%09 * Possible statuses.%0A%09 * %3Cli%3EOFFLINE : User is not connected%0A%09 * %3Cli%3EONLINE : User is connected%0A%09 */
 %0A%09public
@@ -391,13 +391,48 @@
 me;%0A
+%09%0A%09/** Constructor. (no params) */
 %0A    
+%09
 publ
@@ -489,24 +489,170 @@
 FLINE);%0A%09%7D%0A%09
+/**%0A%09 * Constructor.%0A%09 * @param userId  The Id of this user%0A%09 * @param name  The name of this user%0A%09 * @param status  The status of this user%0A%09 */
 %0A%09public Use
@@ -795,32 +795,67 @@
 s = status;%0A%09%7D%0A%09
+/** @return  The Id of this user */
 %0A%09public int get
@@ -882,24 +882,63 @@
 userId;%0A%09%7D%0A%09
+/** @return  The status of this user */
 %0A%09public Sta
@@ -976,16 +976,53 @@
 us;%0A%09%7D%0A%09
+/** @return  The name of this user */
 %0A%09public
@@ -1059,16 +1059,69 @@
 ame;%0A%09%7D%0A
+%09/** @return  This message as converted to String  */
 %0A%09@Overr
@@ -1181,16 +1181,23 @@
 essage %5B
+%22%0A%09%09%09+ 
 userId=%22
@@ -1206,16 +1206,20 @@
  userId 
+%0A%09%09%09
 + %22, sta
@@ -1236,17 +1236,16 @@
 atus%0A%09%09%09
-%09
 + %22, nam
@@ -1255,16 +1255,19 @@
  + name 
+%0A%09%09
 + %22%5D%22;%0A%09

Update UserStatusMessage.java