Examples of PageImpl


Examples of br.net.woodstock.rockframework.persistence.orm.impl.PageImpl

  }

  @Override
  public int getRowCount() {
    if (this.queryResult == null) {
      Page page = new PageImpl(1, this.getPageSize());
      this.queryResult = this.repository.getResult(page);

      Collection<E> collection = this.queryResult.getResult();
      List<E> list = CollectionUtils.toList(collection);
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.content.page.PageImpl

   */
  protected Page aggregate(Message message, Site site) throws IOException,
  MessagingException, IllegalArgumentException {

    ResourceURI uri = new PageURIImpl(site, UUID.randomUUID().toString());
    Page page = new PageImpl(uri);
    Language language = site.getDefaultLanguage();

    // Extract title and subject. Without these two, creating a page is not
    // feasible, therefore both messages throw an IllegalArgumentException if
    // the fields are not present.
    String title = getSubject(message);
    String author = getAuthor(message);

    // Collect default settings
    PageTemplate template = site.getDefaultTemplate();
    if (template == null)
      throw new IllegalStateException("Missing default template in site '" + site + "'");
    String stage = template.getStage();
    if (StringUtils.isBlank(stage))
      throw new IllegalStateException("Missing stage definition in template '" + template.getIdentifier() + "'");

    // Standard fields
    page.setTitle(title, language);
    page.setTemplate(template.getIdentifier());
    page.setPublished(new UserImpl(site.getAdministrator()), message.getReceivedDate(), null);

    // TODO: Translate e-mail "from" into site user and throw if no such
    // user can be found
    page.setCreated(site.getAdministrator(), message.getSentDate());

    // Start looking at the message body
    String contentType = message.getContentType();
    if (StringUtils.isBlank(contentType))
      throw new IllegalArgumentException("Message content type is unspecified");
View Full Code Here

Examples of example.generics.persist.api.PageImpl

    }

    @Test
    public void findAll(){

        PageContext pageContext = new PageImpl(0,1);
        List<Episode> results = getModelDao().findAll(pageContext);
        assertTrue(results.size() == 1);

        pageContext = new PageImpl(1,1);
        results = getModelDao().findAll(pageContext);
        assertTrue(results.size() == 1);

    }
View Full Code Here

Examples of link.checker.persist.api.PageImpl

    }

    @Test
    public void findAll(){

        PageContext pageContext = new PageImpl(0,1);
        List<T> results = getModelDao().findAll(pageContext);
        assertTrue(results.size() == 1);

        pageContext = new PageImpl(1,1);
        results = getModelDao().findAll(pageContext);
        assertTrue(results.size() == 1);

    }
View Full Code Here

Examples of org.apache.jetspeed.om.page.psml.PageImpl

     *
     * @see org.apache.jetspeed.services.page.PageManagerService#updatePage(org.apache.jetspeed.om.page.Page)
     */
    public void updatePage(Page page) throws NodeException
    {
        PageImpl pageImpl = (PageImpl)page;
        updateFragmentsElement(pageImpl, Page.DOCUMENT_TYPE, true);
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PageImpl

        user.setId(VALID_USER_ID);
        user2 = new UserImpl();
        user2.setUsername(VALID_USERNAME2);
        user2.setId(VALID_USER_ID2);

        page = new PageImpl();
        page.setId(VALID_PAGE_ID);
        page.setOwnerId(user.getId());
        page.setPageType(PageType.USER);

        pageSubPage = new PageImpl();
        pageSubPage.setId(VALID_PAGE_ID4);
        pageSubPage.setOwnerId(user.getId());
        pageSubPage.setPageType(PageType.SUB_PAGE);
        pageSubPage.setParentPage(page);

        personProfilePage = new PageImpl();
        personProfilePage.setId(VALID_PAGE_ID2);
        personProfilePage.setOwnerId(user.getId());
        personProfilePage.setPageType(PageType.PERSON_PROFILE);
        personProfileSubPage = new PageImpl();
        personProfileSubPage.setId(VALID_PAGE_ID3);
        personProfileSubPage.setOwnerId(user.getId());
        personProfileSubPage.setPageType(PageType.PERSON_PROFILE);
        personProfileSubPage.setParentPage(personProfilePage);
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PageImpl

        user.setUsername(VALID_USERNAME);
        user.setId(VALID_USER_ID);
        user2 = new UserImpl();
        user2.setUsername(VALID_USERNAME2);
        user2.setId(VALID_USER_ID2);
        page = new PageImpl();
        page.setId(VALID_PAGE_ID);
        page.setOwnerId(user.getId());
        widget = new WidgetImpl(VALID_WIDGET_ID);
        widget.setOwnerId(VALID_USER_ID);
        widget.setWidgetStatus(WidgetStatus.PUBLISHED);
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PageImpl

        user.setUsername(VALID_USERNAME);
        user.setId(VALID_USER_ID);
        user2 = new UserImpl();
        user2.setUsername(VALID_USERNAME2);
        user2.setId(VALID_USER_ID2);
        page = new PageImpl();
        page.setId(VALID_PAGE_ID);
        page.setOwnerId(user.getId());
        region = new RegionImpl(VALID_REGION_ID);
        region.setPage(page);
        grantedAuthoritiesList = new ArrayList<GrantedAuthority>();
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PageImpl

            regions.add(region);
        }

        // Create a Page object and register it.
        long renderSequence = (parentPage.getSubPages() != null) ? parentPage.getSubPages().size() + 1 : 1;
        Page page = new PageImpl();
        page.setName(pageName);
        page.setOwnerId(user.getId());
        page.setPageLayout(pageLayout);
        page.setRegions(regions);
        // set this as a "sub-page" page type
        page.setPageType(PageType.SUB_PAGE);

        PageUser pageUser = new PageUserImpl(page.getOwnerId(), page, renderSequence);
        pageUser.setPageStatus(PageInvitationStatus.OWNER);
        List<PageUser> members = new ArrayList<PageUser>();
        members.add(pageUser);
        page.setMembers(members);

        // Properly sets both sides of the circular parent-child reference
        page.setParentPage(parentPage);
        if (parentPage.getSubPages() != null){
            parentsSubPages = parentPage.getSubPages();
        }
        parentsSubPages.add(page);
        parentPage.setSubPages(parentsSubPages);
View Full Code Here

Examples of org.apache.rave.portal.model.impl.PageImpl

        }

        // If we have a page already or if there was an exception from above then create the page
        // Create the new page for the user
        long renderSequence = defaultUserPage.size() + 1;
        page = new PageImpl();
        page.setName(pageName);
        page.setOwnerId(user.getId());
        page.setPageLayout(pageLayout);
        PageUser pageUser = new PageUserImpl(page.getOwnerId(), page, renderSequence);
        pageUser.setPageStatus(PageInvitationStatus.OWNER);
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.