Package org.jtalks.jcommune.service.dto

Examples of org.jtalks.jcommune.service.dto.SimplePageInfoContainer


     * Transform SimplePage Dto to container object
     *
     * @return converted container object
     */
    public SimplePageInfoContainer getSimplePageInfoContainer() {
        return new SimplePageInfoContainer(this.getId(), this.getNameText(), this.getContentText());
    }
View Full Code Here


                               @PathVariable(PAGE_PATH_NAME) String pagePathName) throws NotFoundException {
        if (result.hasErrors()) {
            return new ModelAndView("simplePageEditor")
                    .addObject(PAGE_PATH_NAME, pagePathName);
        }
        SimplePageInfoContainer simplePageInfoContainer = simplePageDto.getSimplePageInfoContainer();
        simplePageService.updatePage(simplePageInfoContainer);

        return new ModelAndView("redirect:/pages/" + pagePathName);
    }
View Full Code Here


        String updatedName = "new name";
        String updatedContent = "new content";

        SimplePageInfoContainer simplePageInfoContainer = new SimplePageInfoContainer(ID, updatedName, updatedContent);

        when(dao.isExist(simplePage.getId())).thenReturn(true);
        when(dao.get(simplePage.getId())).thenReturn(simplePage);

        simplePageService.updatePage(simplePageInfoContainer);
View Full Code Here

    void testUpdateFailPageNotFound() throws NotFoundException {

        String updatedName = "new name";
        String updatedContent = "new content";

        SimplePageInfoContainer simplePageInfoContainer = new SimplePageInfoContainer(ID, updatedName, updatedContent);

        when(dao.isExist(ID)).thenReturn(false);
        when(dao.get(ID)).thenReturn(null);

        simplePageService.updatePage(simplePageInfoContainer);
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.service.dto.SimplePageInfoContainer

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.