Package org.gatein.mop.api.workspace

Examples of org.gatein.mop.api.workspace.Page


                siteName, pageTitle, from, to);
        int size = a.size();
        PageContext[] array = new PageContext[size];
        int ptr = 0;
        while (a.hasNext()) {
            Page page = a.next();
            PageData data = new PageData(page);
            dataCache.putPage(data);
            array[ptr++] = new PageContext(data);
        }
        return new QueryResult<PageContext>(from, size, Arrays.asList(array));
View Full Code Here


    protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site)
            throws ResourceNotFoundException, OperationException {
        boolean pageOrNav = false;
        Set<String> children = new LinkedHashSet<String>(3);

        Page pages = site.getRootPage().getChild("pages");
        if (pages != null && !pages.getChildren().isEmpty()) {
            children.add("pages");
            pageOrNav = true;
        }

        Navigation defaultNav = site.getRootNavigation().getChild("default");
View Full Code Here

        for (Site site : sites) {
            // TODO: Until invalid site entries without a leading slash is corrected, this is needed to ignore them.
            if (siteType == ObjectType.GROUP_SITE) {
                // This is needed because parent group sites show up in list of sites available
                boolean pageOrNav = false;
                Page pages = site.getRootPage().getChild("pages");
                if (pages != null && !pages.getChildren().isEmpty()) {
                    pageOrNav = true;
                }
                Navigation defaultNav = site.getRootNavigation().getChild("default");
                if (defaultNav != null && !defaultNav.getChildren().isEmpty()) {
                    pageOrNav = true;
View Full Code Here

*/
public abstract class AbstractPageOperationHandler extends AbstractSiteOperationHandler {
    @Override
    protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site)
            throws ResourceNotFoundException, OperationException {
        Page pages = site.getRootPage().getChild("pages");
        if (pages == null || pages.getChildren().isEmpty())
            throw new ResourceNotFoundException("No pages found for site " + getSiteKey(site));

        execute(operationContext, resultHandler, pages);
    }
View Full Code Here

   protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
   {
      boolean pageOrNav = false;
      Set<String> children = new LinkedHashSet<String>(3);

      Page pages = site.getRootPage().getChild("pages");
      if (pages != null && !pages.getChildren().isEmpty())
      {
         children.add("pages");
         pageOrNav = true;
      }
View Full Code Here

      Collection<Site> sites = workspace.getSites(siteType);
      Set<String> children = new LinkedHashSet<String>(sites.size());
      for (Site site : sites)
      {
         boolean pageOrNav = false;
         Page pages = site.getRootPage().getChild("pages");
         if (pages != null && !pages.getChildren().isEmpty())
         {
            pageOrNav = true;
         }
         Navigation defaultNav = site.getRootNavigation().getChild("default");
         if (defaultNav != null && !defaultNav.getChildren().isEmpty())
View Full Code Here

public abstract class AbstractPageOperationHandler extends AbstractSiteOperationHandler
{
   @Override
   protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
   {
      Page pages = site.getRootPage().getChild("pages");
      if (pages == null || pages.getChildren().isEmpty()) throw new ResourceNotFoundException("No pages found for site " + getSiteKey(site));

      execute(operationContext, resultHandler, pages);
   }
View Full Code Here

                siteName, pageTitle, from, to);
        int size = a.size();
        PageContext[] array = new PageContext[size];
        int ptr = 0;
        while (a.hasNext()) {
            Page page = a.next();
            PageData data = new PageData(page);
            dataCache.putPage(data);
            array[ptr++] = new PageContext(data);
        }
        return new QueryResult<PageContext>(from, size, Arrays.asList(array));
View Full Code Here

    public void onEvent(Event event) throws Exception {
        String eventName = event.getEventName();

        // get the MOP page from the event data
        final Object eventData = event.getData();
        final Page page;
        PageKey pageKey = null;
        if (eventData instanceof PageKey) {
            pageKey = (PageKey) eventData;
            page = structureAccess.getPageFrom(pageKey);
        } else {
View Full Code Here

        Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);

        List<Page> pages = new ArrayList<Page>(sites.size() * 10);

        for (Site site : sites) {
            Page pagesRoot = getPagesFrom(site);
            if (pagesRoot != null) {
                Collection<Page> children = pagesRoot.getChildren();
                for (Page child : children) {
                    pages.add(child);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.gatein.mop.api.workspace.Page

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.