Package org.gatein.api.page

Examples of org.gatein.api.page.PageImpl


    public Page getPage(PageId pageId) {
        Parameters.requireNonNull(pageId, "pageId");

        try {
            PageContext context = pageService.loadPage(Util.from(pageId));
            return (context == null) ? null : new PageImpl(context);
        } catch (Throwable e) {
            throw new ApiException("Failed to get page", e);
        }
    }
View Full Code Here


        Permission access = Permission.everyone();
        Permission edit = Permission.any("platform", "administrators");
        PageState pageState = new PageState(pageId.getPageName(), null, false, null, Arrays.asList(Util.from(access)),
            Util.from(edit)[0]);

        PageImpl p = new PageImpl(new PageContext(Util.from(pageId), pageState));
        p.setCreate(true);
        return p;
    }
View Full Code Here

            iterator = result.iterator();
        }

        List<Page> pages = new ArrayList<Page>();
        while (iterator.hasNext()) {
            pages.add(new PageImpl(iterator.next()));
        }

        filter(pages, query.getFilter());

        return pages;
View Full Code Here

    public Page getPage(PageId pageId) {
        Parameters.requireNonNull(pageId, "pageId");

        try {
            PageContext context = pageService.loadPage(Util.from(pageId));
            return (context == null) ? null : new PageImpl(context);
        } catch (Throwable e) {
            throw new ApiException("Failed to get page", e);
        }
    }
View Full Code Here

        Permission access = Permission.everyone();
        Permission edit = Permission.any("platform", "administrators");
        PageState pageState = new PageState(pageId.getPageName(), null, false, null, Arrays.asList(Util.from(access)),
            Util.from(edit)[0]);

        PageImpl p = new PageImpl(new PageContext(Util.from(pageId), pageState));
        p.setCreate(true);
        return p;
    }
View Full Code Here

            iterator = result.iterator();
        }

        List<Page> pages = new ArrayList<Page>();
        while (iterator.hasNext()) {
            pages.add(new PageImpl(iterator.next()));
        }

        filter(pages, query.getFilter());

        return pages;
View Full Code Here

                Arrays.asList(Util.from(accessPermission)),
                Util.from(editPermission)[0], // this is the same as the createPage, but is it right?
                Arrays.asList(Util.from(moveAppsPermission)),
                Arrays.asList(Util.from(moveContainersPermission)));
        PageContext pageContext = new PageContext(pageKey, pageState);
        Page page = new PageImpl(pageContext);
        page.setChildren(this.children);

        if (log.isTraceEnabled()) {
            log.trace("Page finished: " + this);
        }
View Full Code Here

            if (context == null) {
                // Page not found
                return null;
            }
            return new PageImpl(this, context);
        } catch (Throwable e) {
            throw new ApiException("Failed to get page", e);
        }
    }
View Full Code Here

        PageState pageState = new PageState(pageId.getPageName(), null, false, null,
                Arrays.asList(Util.from(accessPermissions)),
                Util.from(edit)[0], Arrays.asList(Util.from(moveAppsPermissions)),
                Arrays.asList(Util.from(moveContainersPermissions)));

        PageImpl p = new PageImpl(this, new PageContext(Util.from(pageId), pageState));
        p.setCreate(true);
        return p;
    }
View Full Code Here

            iterator = result.iterator();
        }

        List<Page> pages = new ArrayList<Page>();
        while (iterator.hasNext()) {
            pages.add(new PageImpl(this, iterator.next()));
        }

        filter(pages, query.getFilter());

        return pages;
View Full Code Here

TOP

Related Classes of org.gatein.api.page.PageImpl

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.