Package org.focusns.model.core

Examples of org.focusns.model.core.ProjectHistory


        Assert.assertNotNull(project);
        //
        ProjectUser user = projectUserService.getProjectUser("admin");
        Assert.assertNotNull(user);
        //
        ProjectHistory history = new ProjectHistory();
        history.setContent("This is project history!");
        history.setCreatedAt(new Date());
        history.setCreatedById(user.getId());
        history.setTargetType("project");
        history.setTargetId(1);
        history.setParentId(1);
        history.setProjectId(project.getId());
        //
        projectHistoryService.createProjectHistory(history);
    }
View Full Code Here


    @RequiresProject
    @RequiresProjectUser
    @RequestMapping("/history-edit")
    public String doEdit(@WidgetAttribute Project project, @WidgetAttribute ProjectUser projectUser, Model model) {
        //
        ProjectHistory template = createTemplate(projectUser, project);
        model.addAttribute("template", template);
        //
        return "modules/profile/history-edit";
    }
View Full Code Here

    @RequestMapping("/history-list")
    public String doList(@WidgetPref(required = false, defaultValue = "10") Integer limit,
            @WidgetAttribute(required = false) ProjectUser projectUser, @WidgetAttribute Project project, Model model) {
        //
        if (projectUser != null) {
            ProjectHistory template = createTemplate(projectUser, project);
            model.addAttribute("template", template);
        }
        //
        Page<ProjectHistory> page = new Page<ProjectHistory>(limit);
        page = historyService.fetchPage(page, project.getId());
View Full Code Here

        //
        return "modules/profile/history-list";
    }

    private ProjectHistory createTemplate(ProjectUser projectUser, Project project) {
        ProjectHistory template = new ProjectHistory();
        template.setProjectId(project.getId());
        template.setTargetId(project.getId());
        template.setTargetType("project");
        template.setCreatedById(projectUser.getId());
        return template;
    }
View Full Code Here

TOP

Related Classes of org.focusns.model.core.ProjectHistory

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.