Examples of PageId


Examples of org.apache.wicket.PageId

   *            the target to encode
   * @return the encoded url
   */
  protected CharSequence encode(RequestCycle requestCycle, PageIdRequestTarget requestTarget)
  {
    final PageId id = requestTarget.getPageId();

    // Start string buffer for url
    final AppendingStringBuffer url = new AppendingStringBuffer(64);
    url.append('?');
    url.append(INTERFACE_PARAMETER_NAME);
    url.append('=');

    // add pagemap
    if (!Objects.equal(PageMap.DEFAULT_NAME, id.getPageMapName()))
    {
      url.append(id.getPageMapName());
    }
    url.append(Component.PATH_SEPARATOR);

    // add page id
    url.append(id.getPageNumber());
    url.append(Component.PATH_SEPARATOR);

    // add version
    url.append(id.getPageVersion());
    url.append(Component.PATH_SEPARATOR);

    // add listener interface (noop because we default to redirect listener which is default)
    url.append(Component.PATH_SEPARATOR);

View Full Code Here

Examples of org.apache.wicket.PageId

   *            the target to encode
   * @return the encoded url
   */
  protected CharSequence encode(RequestCycle requestCycle, PageIdRequestTarget requestTarget)
  {
    final PageId id = requestTarget.getPageId();

    // Start string buffer for url
    final AppendingStringBuffer url = new AppendingStringBuffer(64);
    url.append('?');
    url.append(INTERFACE_PARAMETER_NAME);
    url.append('=');

    // add pagemap
    if (!Objects.equal(PageMap.DEFAULT_NAME, id.getPageMapName()))
    {
      url.append(id.getPageMapName());
    }
    url.append(Component.PATH_SEPARATOR);

    // add page id
    url.append(id.getPageNumber());
    url.append(Component.PATH_SEPARATOR);

    // add version
    url.append(id.getPageVersion());
    url.append(Component.PATH_SEPARATOR);

    // add listener interface (noop because we default to redirect listener which is default)
    url.append(Component.PATH_SEPARATOR);

View Full Code Here

Examples of org.gatein.api.page.PageId

     * @return the page of the current portal request.
     */
    public Page getPage() {
        if (!pageLoaded) {
            Node node = getNavigation().getNode(getNodePath());
            PageId pageId = node != null ? node.getPageId() : null;
            page = (pageId == null) ? null : getPortal().getPage(pageId);
            pageLoaded = true;
        }

        return page;
View Full Code Here

Examples of org.gatein.api.page.PageId

     *
     * @param pageName the name of the page
     * @return a new PageId
     */
    public PageId page(String pageName) {
        return new PageId(this, pageName);
    }
View Full Code Here

Examples of org.gatein.api.page.PageId

            return null;

        SiteKey siteKey = pageKey.getSite();
        switch (pageKey.getSite().getType()) {
            case PORTAL:
                return new PageId(siteKey.getName(), pageKey.getName());
            case GROUP:
                return new PageId(new Group(siteKey.getName()), pageKey.getName());
            case USER:
                return new PageId(new User(siteKey.getName()), pageKey.getName());
            default:
                throw new AssertionError();
        }
    }
View Full Code Here

Examples of org.gatein.api.page.PageId

            return null;

        SiteKey siteKey = pageKey.getSite();
        switch (pageKey.getSite().getType()) {
            case PORTAL:
                return new PageId(siteKey.getName(), pageKey.getName());
            case GROUP:
                return new PageId(new Group(siteKey.getName()), pageKey.getName());
            case USER:
                return new PageId(new User(siteKey.getName()), pageKey.getName());
            default:
                throw new AssertionError();
        }
    }
View Full Code Here

Examples of org.gatein.api.page.PageId

            }
        }
        // Page reference
        ModelReference pageRef = model.get("page").asValue(ModelReference.class);
        if (node.getPageId() != null) {
            PageId pageId = node.getPageId();
            pageRef.set("pageName", pageId.getPageName());
            pageRef.set("siteName", pageId.getSiteId().getName());
            pageRef.set("siteType", pageId.getSiteId().getType().getName());

            // Set the address for the ref
            PathAddress pageAddress = getPagesAddress(pageId.getSiteId()).append(pageId.getPageName());
            pageRef.set(pageAddress);
        }
    }
View Full Code Here

Examples of org.gatein.api.page.PageId

            String siteTypeString = nonNullString(nodeModel, "page", "siteType");
            SiteType siteType = SiteType.forName(siteTypeString);
            if (siteType == null) {
                throw invalidValue(siteTypeString, "page", "siteType");
            }
            return new PageId(new SiteId(siteType, siteName), pageName);
        } else {
            return null;
        }
    }
View Full Code Here

Examples of org.gatein.api.page.PageId

        return populateModel(pages, modelProvider.newModel(ModelList.class), address);
    }

    @Managed("{page-name}")
    public ModelObject getPage(@MappedPath("page-name") String name) {
        PageId pageId = new PageId(siteId, name);
        Page page = portal.getPage(pageId);
        if (page == null) {
            throw notFound("Could not retrieve page", pageId);
        }
View Full Code Here

Examples of org.gatein.api.page.PageId

    @Managed("{page-name}")
    @ManagedRole("administrators")
    @ManagedOperation(name = OperationNames.REMOVE_RESOURCE, description = "Removes the given page from the portal")
    public void removePage(@MappedPath("page-name") String name) {
        PageId pageId = new PageId(siteId, name);
        try {
            if (!portal.removePage(pageId)) {
                throw notFound("Could not remove page", pageId);
            }
        } catch (EntityNotFoundException e) {
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.