// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/actions/TodoAction.java
// public class TodoAction extends FluxAction<Integer, List<Todo>> {
// 
//     public TodoAction(final Integer inType, final List<Todo> inData) {
//         super(inType, inData);
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/actions/UserAction.java
// public class UserAction extends FluxAction<Integer, List<User>> {
// 
//     public UserAction(final Integer inType, final List<User> inData) {
//         super(inType, inData);
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/models/Todo.java
// public class Todo {
// 
//     public int id;
//     public String title;
//     public String dueDate;
//     public String memo;
//     public boolean closed;
// 
//     public Todo() {}
// 
//     public Todo(final int inId) {
//         id = inId;
//     }
// 
//     public Todo(final Todo inClone) {
//         this.id = inClone.id;
//         this.title = inClone.title;
//         this.dueDate = inClone.dueDate;
//         this.memo = inClone.memo;
//         this.closed = inClone.closed;
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/models/User.java
// public class User {
// 
//     public String name;
// 
//     public User() {}
// 
//     public User(final String inName) {
//         name = inName;
//     }
// 
//     public User(final User inClone) {
//         this.name = inClone.name;
//     }
// 
// }
// 
// Path: fluxjava/src/main/java/io/wzcodes/fluxjava/IActionHelper.java
// public interface IActionHelper {
// 
//     /**
//      * Get a type of Action from type identity.
//      *
//      * @param inActionTypeId The type identity of Action.
//      * @since 2016/7/5
//      */
//     Class<?> getActionClass(final Object inActionTypeId);
// 
//     /**
//      * Wrap the data format from display to storage.
//      *
//      * @param inData The data need to be wrapped.
//      * @since 2016/7/5
//      */
//     Object wrapData(final Object inData);
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_ADD = DATA_TODO + 2;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_CLOSE = DATA_TODO + 3;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_LOAD = DATA_TODO + 1;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int USER_LOAD = DATA_USER + 1;


import com.example.fluxjava.eventbus.domain.actions.TodoAction;
import com.example.fluxjava.eventbus.domain.actions.UserAction;
import com.example.fluxjava.eventbus.domain.models.Todo;
import com.example.fluxjava.eventbus.domain.models.User;
import io.wzcodes.fluxjava.IActionHelper;
import java.util.ArrayList;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_ADD;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_CLOSE;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_LOAD;
import static com.example.fluxjava.eventbus.domain.Constants.USER_LOAD;

        // Simulate the data retrieve from remote
        for (String name : names) {
            User user = new User();

            user.name = name;
            userList.add(user);
        }

        return userList;
    }

    private ArrayList<Todo> getRemoteTodo(final int inUserIndex) {
        // TODO Replace the remote call here
        final ArrayList<Todo> todoList = new ArrayList<>();
        final String[] titles = {
                "Meet with Bill",
                "Dinner",
                "Go to bank",
                "Workout",
                "Book flight",
                "Clean the house",
                "Create a new playlist",
                "Send a mail"
        };
        final String[] memos = {
                "Prepare presentation and demo the system.",
                "Jane's birthday.",
                "",
                "",
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/actions/TodoAction.java
// public class TodoAction extends FluxAction<Integer, List<Todo>> {
// 
//     public TodoAction(final Integer inType, final List<Todo> inData) {
//         super(inType, inData);
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/actions/UserAction.java
// public class UserAction extends FluxAction<Integer, List<User>> {
// 
//     public UserAction(final Integer inType, final List<User> inData) {
//         super(inType, inData);
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/models/Todo.java
// public class Todo {
// 
//     public int id;
//     public String title;
//     public String dueDate;
//     public String memo;
//     public boolean closed;
// 
//     public Todo() {}
// 
//     public Todo(final int inId) {
//         id = inId;
//     }
// 
//     public Todo(final Todo inClone) {
//         this.id = inClone.id;
//         this.title = inClone.title;
//         this.dueDate = inClone.dueDate;
//         this.memo = inClone.memo;
//         this.closed = inClone.closed;
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/models/User.java
// public class User {
// 
//     public String name;
// 
//     public User() {}
// 
//     public User(final String inName) {
//         name = inName;
//     }
// 
//     public User(final User inClone) {
//         this.name = inClone.name;
//     }
// 
// }
// 
// Path: fluxjava/src/main/java/io/wzcodes/fluxjava/IActionHelper.java
// public interface IActionHelper {
// 
//     /**
//      * Get a type of Action from type identity.
//      *
//      * @param inActionTypeId The type identity of Action.
//      * @since 2016/7/5
//      */
//     Class<?> getActionClass(final Object inActionTypeId);
// 
//     /**
//      * Wrap the data format from display to storage.
//      *
//      * @param inData The data need to be wrapped.
//      * @since 2016/7/5
//      */
//     Object wrapData(final Object inData);
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_ADD = DATA_TODO + 2;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_CLOSE = DATA_TODO + 3;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_LOAD = DATA_TODO + 1;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int USER_LOAD = DATA_USER + 1;


// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/ActionHelper.java
import com.example.fluxjava.eventbus.domain.actions.TodoAction;
import com.example.fluxjava.eventbus.domain.actions.UserAction;
import com.example.fluxjava.eventbus.domain.models.Todo;
import com.example.fluxjava.eventbus.domain.models.User;
import io.wzcodes.fluxjava.IActionHelper;
import java.util.ArrayList;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_ADD;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_CLOSE;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_LOAD;
import static com.example.fluxjava.eventbus.domain.Constants.USER_LOAD;


        // Simulate the data retrieve from remote
        for (String name : names) {
            User user = new User();

            user.name = name;
            userList.add(user);
        }

        return userList;
    }

    private ArrayList<Todo> getRemoteTodo(final int inUserIndex) {
        // TODO Replace the remote call here
        final ArrayList<Todo> todoList = new ArrayList<>();
        final String[] titles = {
                "Meet with Bill",
                "Dinner",
                "Go to bank",
                "Workout",
                "Book flight",
                "Clean the house",
                "Create a new playlist",
                "Send a mail"
        };
        final String[] memos = {
                "Prepare presentation and demo the system.",
                "Jane's birthday.",
                "",
                "",
                "Traveling to LA on weekend.",