package sone.jiraworklogclient.entity;

import java.util.List;

import sone.jiraworklogclient.boundary.TimeFormatter;

public class LoggingData implements EntityInterface {

	private String issuekey; // (ex. TP-1)
	private int remainingEstimateSeconds = 0;

	private List<User> userList;

	private String dateStarted;
	private int timeSpentSeconds;
	private int billedSeconds; // what's this? does it used?
	private String comment;

	public String getIssuekey() {
		return issuekey;
	}

	public void setIssuekey(String issuekey) {
		this.issuekey = issuekey;
	}

	public int getRemainingEstimateSeconds() {
		return remainingEstimateSeconds;
	}

	public void setRemainingEstimateSeconds(int remainingEstimateSeconds) {
		this.remainingEstimateSeconds = remainingEstimateSeconds;
	}

	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(final List<User> userList) {
		this.userList = userList;
	}

	public String getDateStarted() {
		return dateStarted;
	}

	public void setDateStarted(String dateStarted) {
		this.dateStarted = dateStarted;
	}

	public int getTimeSpentSeconds() {
		return timeSpentSeconds;
	}

	public void setTimeSpentSeconds(int timeSpentSeconds) {
		this.timeSpentSeconds = timeSpentSeconds;
	}

	public int getBilledSeconds() {
		return billedSeconds;
	}

	public void setBilledSeconds(int billedSeconds) {
		this.billedSeconds = billedSeconds;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Override
	public String getSummary() {
		StringBuffer summaryBuffer = new StringBuffer();

		summaryBuffer.append("Issue key : " + getIssuekey() + "\n");
		summaryBuffer.append("User list : ");
		for (final User user : getUserList()) {
			summaryBuffer.append(user.getName() + " ");
		}
		summaryBuffer.append("\n");
		summaryBuffer.append("Date : " + getDateStarted() + "\n");
		summaryBuffer.append("Time spent : " + TimeFormatter.secondToTime(getTimeSpentSeconds()) + "\n");
		summaryBuffer.append("Comment : " + getComment() + "\n");

		return summaryBuffer.toString();
	}

}
@@ -1645,18 +1645,19 @@
 StringBu
-ff
+ild
 er summa
@@ -1660,18 +1660,19 @@
 ummaryBu
-ff
+ild
 er = new
@@ -1680,18 +1680,19 @@
 StringBu
-ff
+ild
 er();%0D%0A%0D
@@ -1695,34 +1695,35 @@
 ;%0D%0A%0D%0A%09%09summaryBu
-ff
+ild
 er.append(%22Issue
@@ -1749,32 +1749,82 @@
 key() + %22%5Cn%22);%0D%0A
+%09%09%0D%0A%09%09final List%3CUser%3E userList = getUserList();%0D%0A
 %09%09summaryBuffer.
@@ -1810,34 +1810,35 @@
 ();%0D%0A%09%09summaryBu
-ff
+ild
 er.append(%22User 
@@ -1845,16 +1845,91 @@
 list
+(%22);%0D%0A%09%09summaryBuilder.append(userList.size());%0D%0A%09%09summaryBuilder.append(%22)
  : %22);%0D%0A
 %09%09fo
@@ -1924,16 +1924,20 @@
  : %22);%0D%0A
+%09%09%0D%0A
 %09%09for (f
@@ -1953,29 +1953,24 @@
  user : 
-getU
+u
 serList
-()
 ) %7B%0D%0A%09%09%09
@@ -1970,34 +1970,35 @@
  %7B%0D%0A%09%09%09summaryBu
-ff
+ild
 er.append(user.g
@@ -2020,16 +2020,20 @@
 ;%0D%0A%09%09%7D%0D%0A
+%09%09%0D%0A
 %09%09summar
@@ -2027,34 +2027,35 @@
 %0A%09%09%0D%0A%09%09summaryBu
-ff
+ild
 er.append(%22%5Cn%22);
@@ -2059,34 +2059,35 @@
 %22);%0D%0A%09%09summaryBu
-ff
+ild
 er.append(%22Date 
@@ -2122,34 +2122,35 @@
 %22);%0D%0A%09%09summaryBu
-ff
+ild
 er.append(%22Time 
@@ -2232,18 +2232,19 @@
 ummaryBu
-ff
+ild
 er.appen
@@ -2284,17 +2284,16 @@
 %5Cn%22);%0D%0A%0D
-%0A
 %09%09return
@@ -2306,10 +2306,11 @@
 ryBu
-ff
+ild
 er.t

Add # of user list on confirm dialog