package uk.org.sappho.code.change.management.data;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class IssueData {

    private final String key;
    private final String type;
    private final String summary;
    private final Date createdDate;
    private final Date lastUpdatedDate;
    private final Map<String, String> subTaskKeys = new HashMap<String, String>();
    private final List<String> releases;

    public IssueData(String key, String type, String summary, Date createdDate, Date lastUpdatedDate,
            List<String> releases) {

        this.key = key;
        this.type = type;
        this.summary = summary;
        this.createdDate = createdDate;
        this.lastUpdatedDate = lastUpdatedDate;
        this.releases = releases;
    }

    public String getKey() {

        return key;
    }

    public String getType() {

        return type;
    }

    public String getSummary() {

        return summary;
    }

    public Date getCreatedDate() {

        return createdDate;
    }

    public Date getLastUpdatedDate() {

        return lastUpdatedDate;
    }

    public void putSubTaskKey(String issueKey) {

        subTaskKeys.put(issueKey, issueKey);
    }

    public Set<String> getSubTaskKeys() {

        return subTaskKeys.keySet();
    }

    public List<String> getReleases() {

        return releases;
    }
}

@@ -92,85 +92,38 @@
 til.
-HashMap;%0D%0Aimport java.util.List;%0D%0Aimport java.util.Map;%0D%0Aimport java.util.Set
+List;%0D%0Aimport java.util.Vector
 ;%0D%0A%0D
@@ -345,28 +345,21 @@
 e final 
-Map%3CString, 
+List%3C
 String%3E 
@@ -380,24 +380,15 @@
 new 
-HashMap%3CString, 
+Vector%3C
 Stri
@@ -1217,16 +1217,21 @@
         
+if (!
 subTaskK
@@ -1234,19 +1234,24 @@
 askKeys.
-put
+contains
 (issueKe
@@ -1251,18 +1251,50 @@
 issueKey
-, 
+)) %7B%0D%0A            subTaskKeys.add(
 issueKey
@@ -1293,24 +1293,35 @@
 issueKey);%0D%0A
+        %7D%0D%0A
     %7D%0D%0A%0D%0A   
@@ -1328,18 +1328,19 @@
  public 
-Se
+Lis
 t%3CString
@@ -1393,17 +1393,8 @@
 Keys
-.keySet()
 ;%0D%0A 

Fix rubbish subtask list.