Examples of PageLayout


Examples of org.apache.rave.portal.model.PageLayout

        Region deletedRegion = createStrictMock(Region.class);
        expect(deletedRegion.getRegionWidgets()).andReturn(movedWidgets);
        replay(deletedRegion);
        regions.add(deletedRegion);
       
        PageLayout prevLayout = createStrictMock(PageLayout.class);
        expect(prevLayout.getNumberOfRegions()).andReturn(new Long(2)).anyTimes();
        replay(prevLayout);
       
        PageLayout layout = createStrictMock(PageLayout.class);
        expect(layout.getNumberOfRegions()).andReturn(new Long(1)).anyTimes();
        replay(layout);
       
        regionRepository.delete(deletedRegion);
        expect(regionRepository.save(region)).andReturn(region);
        replay(regionRepository);
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

    final String username="canonical";
        user.setUsername(username);
        user.setId(USER_ID);
    String userProfile = new String(ModelKeys.USER_PROFILE);
        Page personProfile = new PageImpl();
        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode(VALID_PAGE_LAYOUT_CODE);
        personProfile.setPageLayout(pageLayout);
        List<Person> personObjects = new ArrayList<Person>();

    expect(userService.getUserByUsername(username)).andReturn(user).once();
        expect(pageService.getPersonProfilePage(user.getId())).andReturn(personProfile);
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

    final String username="canonical";
        user.setUsername(username);
        user.setId(USER_ID);
    String userProfile = new String(ModelKeys.USER_PROFILE);
        Page personProfile = new PageImpl();
        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode(VALID_PAGE_LAYOUT_CODE);
        personProfile.setPageLayout(pageLayout);
        List<Person> personObjects = new ArrayList<Person>();

    expect(userService.getUserById(USER_ID)).andReturn(user).once();
        expect(pageService.getPersonProfilePage(user.getId())).andReturn(personProfile);
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

        final User user = null;
        final ModelMap model = new ModelMap();
        final int modelSize = 4;
        final String username="Canonical";
        Page personProfile = new PageImpl();
        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode("person_profile");
        personProfile.setPageLayout(pageLayout);

        expect(userService.getUserByUsername(username)).andThrow(new UsernameNotFoundException("Username does not exist"));

        replay(userService, pageService);
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

       
        user = new User();
        user.setId(1L);
        user.setUsername("acarlucci");
       
        pageLayout = new PageLayout();
        pageLayout.setId(1L);
        pageLayout.setCode(PAGE_LAYOUT_CODE);
        pageLayout.setNumberOfRegions(3L);
       
        page = new Page(PAGE_ID, user);
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

        ReflectionTestUtils.setField(newAccountService, "saltSource", saltSource);
        ReflectionTestUtils.setField(newAccountService, "passwordEncoder", passwordEncoder);

        expect(userService.getUserByUsername(validUser)).andReturn(null);
        PageLayout pageLayout = new PageLayout();
        pageLayout.setNumberOfRegions(4L);
        expect(pageLayoutService.getPageLayoutByCode(validLayout)).andReturn(pageLayout);
        replay(userService, pageLayoutService);

        newAccountService.createNewAccount(newUser);
    }
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

    final String username="Canonical";
        user.setUsername(username);
        user.setId(USER_ID);
    String userProfile = new String(ModelKeys.USER_PROFILE);
        Page personProfile = new PageImpl();
        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode(VALID_PAGE_LAYOUT_CODE);
        personProfile.setPageLayout(pageLayout);

    expect(userService.getUserByUsername(username)).andReturn(user).once();
        expect(pageService.getPersonProfilePage(user.getId())).andReturn(personProfile);
View Full Code Here

Examples of org.apache.rave.portal.model.PageLayout

        final User user = null;
        final ModelMap model = new ModelMap();
        final int modelSize = 4;
        final String username="Canonical";
        Page personProfile = new PageImpl();
        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode("person_profile");
        personProfile.setPageLayout(pageLayout);

        expect(userService.getUserByUsername(username)).andThrow(new UsernameNotFoundException("Username does not exist"));

        replay(userService, pageService);
View Full Code Here

Examples of org.apache.rave.rest.model.PageLayout

        List<org.apache.rave.model.PageLayout> fromDb = pageLayoutService.getAll();
        List<PageLayout> pageLayouts = new ArrayList<PageLayout>();

        for (org.apache.rave.model.PageLayout pageLayout : fromDb) {
            pageLayouts.add(new PageLayout(pageLayout));
        }

        return new SearchResult<PageLayout>(pageLayouts, fromDb.size());
    }
View Full Code Here

Examples of org.librebiz.pureport.definition.PageLayout

            }
        }
    }

    private void startPageLayout(Attributes attrs) {
        PageLayout layout = new PageLayout();
        layout.setPaperWidth(toQuantity(attrs.getValue("paper-width"), new Quantity(21, Unit.CM)));
        layout.setPaperHeight(toQuantity(attrs.getValue("paper-height"), new Quantity(29.7, Unit.CM)));
        layout.setTopMargin(toQuantity(attrs.getValue("top-margin")));
        layout.setBottomMargin(toQuantity(attrs.getValue("bottom-margin")));
        layout.setLeftMargin(toQuantity(attrs.getValue("left-margin")));
        layout.setRightMargin(toQuantity(attrs.getValue("right-margin")));
        String orientation = attrs.getValue("orientation");
        if ("portrait".equals(orientation)) {
            layout.setOrientation(PageLayout.PORTRAIT);
        } else if ("landscape".equals(orientation)) {
            layout.setOrientation(PageLayout.LANDSCAPE);
        } else if ("reverse-landscape".equals(orientation)) {
            layout.setOrientation(PageLayout.REVERSE_LANDSCAPE);
        }
        report.setPageLayout(layout);
    }
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.