package com.box.l10n.mojito.rest.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.util.LinkedHashSet;
import java.util.Set;
import org.joda.time.DateTime;

/**
 *
 * @author jaurambault
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class PollableTask {

    private Long id;
    private String name;

    private DateTime finishedDate;

    private String message;

    private ErrorMessage errorMessage;

    private int expectedSubTaskNumber;

    @JsonDeserialize(as = LinkedHashSet.class)
    private Set<PollableTask> subTasks;

    private boolean allFinished;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DateTime getFinishedDate() {
        return finishedDate;
    }

    public void setFinishedDate(DateTime finishedDate) {
        this.finishedDate = finishedDate;
    }

    public ErrorMessage getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(ErrorMessage errorMessage) {
        this.errorMessage = errorMessage;
    }

    public int getExpectedSubTaskNumber() {
        return expectedSubTaskNumber;
    }

    public void setExpectedSubTaskNumber(int expectedSubTaskNumber) {
        this.expectedSubTaskNumber = expectedSubTaskNumber;
    }

    public Set<PollableTask> getSubTasks() {
        return subTasks;
    }

    public void setSubTasks(Set<PollableTask> subTasks) {
        this.subTasks = subTasks;
    }

    public boolean isAllFinished() {
        return allFinished;
    }

    public void setAllFinished(boolean allFinished) {
        this.allFinished = allFinished;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}

@@ -163,16 +163,48 @@
 ialize;%0A
+import org.joda.time.DateTime;%0A%0A
 import j
@@ -252,39 +252,8 @@
 Set;
-%0Aimport org.joda.time.DateTime;
 %0A%0A/*
@@ -436,24 +436,59 @@
 ishedDate;%0A%0A
+    private DateTime createdDate;%0A%0A
     private 
@@ -2045,10 +2045,185 @@
 %0A    %7D%0A%0A
+    public DateTime getCreatedDate() %7B%0A        return createdDate;%0A    %7D%0A%0A    public void setCreatedDate(DateTime createdDate) %7B%0A        this.createdDate = createdDate;%0A    %7D%0A
 %7D%0A

Add created time to PollableTask