Package net.lr.tasklist.model

Examples of net.lr.tasklist.model.Task


        }
    }

    private void showTask(PrintWriter writer, String taskId) {
        SimpleDateFormat sdf = new SimpleDateFormat();
        Task task = taskService.getTask(new Integer(taskId));
        if (task != null) {
            writer.println("<h1>Task " + task.getTitle() + " </h1>");
            if (task.getDueDate() != null) {
                writer.println("Due date: " + sdf.format(task.getDueDate()) + "<br/>");
            }
            writer.println(task.getDescription());
        } else {
            writer.println("Task with id " + taskId + " not found");
        }

    }
View Full Code Here


public class TaskServiceImpl implements TaskService {
        Map<Integer, Task> taskMap;
       
        public TaskServiceImpl() {
                taskMap = new HashMap<Integer, Task>();
                Task task = new Task();
                task.setId(1);
                task.setTitle("Buy some coffee");
                task.setDescription("Take the extra strong");
                addTask(task);
                task = new Task();
                task.setId(2);
                task.setTitle("Finish karaf tutorial");
                task.setDescription("Last check and wiki upload");
                addTask(task);
        }
View Full Code Here

public class TaskServiceImpl implements TaskService {
  Map<String, Task> taskMap;
 
  public TaskServiceImpl() {
    taskMap = new HashMap<String, Task>();
    Task task = new Task();
    task.setId("1");
    task.setTitle("Buy some coffee");
    task.setDescription("Take the extra strong");
    addTask(task);
    task = new Task();
    task.setId("2");
    task.setTitle("Finish karaf tutorial");
    task.setDescription("Last check and wiki upload");
    addTask(task);
  }
View Full Code Here

                update(beans);
            }
        });
        menu.addItem("Add", new Command() {
            public void menuSelected(MenuItem selectedItem) {
                Task task = new Task();
                task.setId(UUID.randomUUID().toString());
                task.setTitle("New Task");
                task.setDescription("None");
                taskService.addTask(task);
                beans.addBean(task);
            }
        });
        menu.addItem("Delete", new Command() {
View Full Code Here

    }
  }

  private void showTask(PrintWriter writer, String taskId) {
      SimpleDateFormat sdf = new SimpleDateFormat();
    Task task = taskService.getTask(taskId);
    if (task != null) {
      writer.println("<h1>Task " + task.getTitle() + " </h1>");
      if (task.getDueDate() != null) {
          writer.println("Due date: " + sdf.format(task.getDueDate()) + "<br/>");
      }
      writer.println(task.getDescription());
    } else {
      writer.println("Task with id " + taskId + " not found");
    }

  }
View Full Code Here

   
    @PostConstruct
    public void addDemoTasks() {
        try {
            LOG.info("Adding sample task");
            Task task1 = new Task();
            task1.setId(1);
            task1.setTitle("Just a sample task");
            task1.setDescription("Some more info");
            taskService.addTask(task1);
            LOG.info("Number of tasks is now: " + taskService.getTasks().size());
        } catch (Exception e) {
            LOG.warn(e.getMessage(), e);
        }
View Full Code Here

TOP

Related Classes of net.lr.tasklist.model.Task

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.