Examples of ProjectHistory


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

Examples of org.focusns.model.core.ProjectHistory

    @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

Examples of org.focusns.model.core.ProjectHistory

    @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

Examples of org.focusns.model.core.ProjectHistory

        //
        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
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.