Examples of TodoService


Examples of hu.lacimol.tutorial.todo.service.TodoService

 
  @Override
  public void execute(Map<String, Object> jobDataMap) {
   
    final TodoMonitor monitor = (TodoMonitor) jobDataMap.get("TodoMonitorImpl:instance");
    final TodoService service = (TodoService) jobDataMap.get("TodoService");
   
    DateTime now = DateTime.now();
    SimpleDateFormat fmt = GlobalSettings.createHunDateFormatter();
    service.create("TodoTask description " + fmt.format(now.toDate()));
    monitor.setLastRun(now.toDate());
    monitor.setNextRun(now.plus(monitor.getInterval()).toDate());
    logger.info("TodoTask executed at " + fmt.format(monitor.getLastRun()) + " and will execute at "
        + fmt.format(monitor.getNextRun()));
  }
View Full Code Here

Examples of net.sf.pmr.toDo.service.ToDoService

   
      // Afficher le nombre de todo
        int numberOfToDo = 0;

        // Récupération du service
    ToDoService toDoService = ToDoObjectFactory.getToDoService();
       
        if (myWorkspaceForm.getProjectId() > 0) {
         
          User user = (User) request.getSession().getAttribute("user");
         
          List<ToDo> todos =  toDoService.findByProjectPersistanceIdAndUserPersistanceId(myWorkspaceForm.getProjectId(), user.getPersistanceId());
         
          // nombre de story
          numberOfToDo = todos.size();
         
        }
View Full Code Here

Examples of net.sf.pmr.toDo.service.ToDoService

    public ActionForward list(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        // get the service
        ToDoService toDoService = ToDoObjectFactory.getToDoService();

        User user = (User) request.getSession().getAttribute("user");
       
        // list the todos
        List<ToDo> todos = toDoService.findByProjectPersistanceIdAndUserPersistanceId(
            ((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue(), user.getPersistanceId());

        // put in request
        request.setAttribute("toDoList", todos);
View Full Code Here

Examples of net.sf.pmr.toDo.service.ToDoService

    public ActionForward detail(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        // get the service
        ToDoService toDoService = ToDoObjectFactory.getToDoService();

        // find the Story... if needed
        if (StringUtils.isNotEmpty((String) request
                .getParameter("persistanceId"))) {

            ToDo toDo = toDoService.findByPersistanceId(Integer.parseInt((String) request.getParameter("persistanceId")));

            // populate the form
            ToDoForm toDoForm = (ToDoForm) form;

            toDoForm.setDate(toDo.getDate());
View Full Code Here

Examples of net.sf.pmr.toDo.service.ToDoService

    public ActionForward save(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        // get the service
        ToDoService toDoService = ToDoObjectFactory.getToDoService();

        // get the form
        ToDoForm toDoForm = (ToDoForm) form;

        // save the todo
        if (toDoForm.getPersistanceId() == 0) {
            // add
            // get the current basicProject from the session
            Integer basicProjectPersistanceId = (Integer) request.getSession()
                    .getAttribute("basicProject.persistanceId");

            User user = (User) request.getSession().getAttribute("user");
          
            toDoService.add(toDoForm.getDescription(), toDoForm.getDate(), toDoForm.getDone() ,user.getPersistanceId(), basicProjectPersistanceId);
           
        } else {
            // update
          toDoService.update(toDoForm.getPersistanceId(), toDoForm.getPersistanceVersion(), toDoForm.getDescription(), toDoForm.getDate(), toDoForm.getDone());
           
        }

        // populate the summary
        populateListForProjectSummary(request);
View Full Code Here

Examples of net.sf.pmr.toDo.service.ToDoService

    public ActionForward delete(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        // get the service
        ToDoService toDoService = ToDoObjectFactory.getToDoService();

        // get the form
        ToDoForm toDoForm = (ToDoForm) form;
       
        // delete the story
        toDoService.delete(toDoForm.getPersistanceId(), toDoForm.getPersistanceVersion());

        // populate the summary
        populateListForProjectSummary(request);
       
        return this.list(mapping, form, request, response);
View Full Code Here

Examples of net.sf.pmr.toDo.service.ToDoService

     * @param request request
     */
    private void populateListForProjectSummary(final HttpServletRequest request) {

        // get the service
        ToDoService toDoService = ToDoObjectFactory.getToDoService();

        User user = (User) request.getSession().getAttribute("user");
       
        // list the todos
        List<ToDo> todos = toDoService.findByProjectPersistanceIdAndUserPersistanceId(
            ((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue(), user.getPersistanceId());


        // number of toDo
        request.setAttribute("numberOfToDo", todos.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.