Package org.exoplatform.portal.mop.navigation

Examples of org.exoplatform.portal.mop.navigation.NavigationService


    @Override
    protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation defaultNavigation) {
        SiteKey siteKey = getSiteKey(defaultNavigation.getSite());
        String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");

        NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
        NavigationContext navigation = navigationService.loadNavigation(siteKey);

        Set<String> children = new LinkedHashSet<String>();

        NodeContext<NodeContext<?>> node = NavigationUtils.loadNode(navigationService, navigation, navUri);
        if (node == null) {
View Full Code Here


    public static class DeleteNavigationActionListener extends BaseEditAction {
        @Override
        protected void doEdit(UserNavigation navigation, Event<UIGroupNavigationManagement> event) throws Exception {
            UIGroupNavigationManagement uicomp = event.getSource();
            NavigationService service = uicomp.getApplicationComponent(NavigationService.class);

            NavigationContext ctx = service.loadNavigation(navigation.getKey());
            if (ctx != null) {
                service.destroyNavigation(ctx);
            }

            //
            event.getRequestContext().addUIComponentToUpdateByAjax(uicomp);
            // Update UserToolbarGroupPortlet
View Full Code Here

            UIFormSelectBox uiSelectBox = uiForm.findComponentById("priority");
            int priority = Integer.parseInt(uiSelectBox.getValue());

            // update navigation
            NavigationService service = uiForm.getApplicationComponent(NavigationService.class);
            NavigationContext ctx = service.loadNavigation(userNav.getKey());
            ctx.setState(new NavigationState(priority));
            service.saveNavigation(ctx);

            UIPopupWindow uiPopup = uiForm.getParent();
            uiPopup.setShow(false);
            UIComponent opener = uiPopup.getParent();
View Full Code Here

            UserNode targetNode = null;
            SiteKey siteKey = pageNodeEvent.getSiteKey();
            if (siteKey != null) {
                if (pcontext.getRemoteUser() == null
                        && (siteKey.getType().equals(SiteType.GROUP) || siteKey.getType().equals(SiteType.USER))) {
                    NavigationService service = uiPortalApp.getApplicationComponent(NavigationService.class);
                    NavigationContext navContext = service.loadNavigation(siteKey);
                    if (navContext != null) {
                        uiPortalApp.setLastRequestNavData(null);
                        pcontext.requestAuthenticationLogin();
                        return;
                    }
View Full Code Here

      if (workspace == null) throw new OperationException(operationName, "MOP workspace was null");

      DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
      if (dataStorage == null) throw new OperationException(operationName, "DataStorage was null");

      NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
      if (navigationService == null) throw new OperationException(operationName, "Navigation service was null");

      DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
      if (descriptionService == null) throw new OperationException(operationName, "Description service was null");
View Full Code Here

      deletedNavigationGroups.addAll(descendantGroups);
      deletedNavigationGroups.add(group.getId());
      for (String childGroup : deletedNavigationGroups)
      {
         SiteKey key = SiteKey.group(childGroup);
         NavigationService navService = portalConfigService.getNavigationService();
         NavigationContext nav = navService.loadNavigation(key);
         if (nav != null)
         {
            navService.destroyNavigation(nav);
         }
      }
   }
View Full Code Here

         Site site = navigation.getSite();
         String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
         SiteKey siteKey = getSiteKey(site);

         DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
         NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
         BindingProvider bindingProvider = operationContext.getBindingProvider();
         Marshaller<PageNavigation> marshaller = bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);

         NavigationExportTask exportTask = new NavigationExportTask(new NavigationKey(siteKey, navUri), navigationService, descriptionService, marshaller);
View Full Code Here

   protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation defaultNavigation)
   {
      SiteKey siteKey = getSiteKey(defaultNavigation.getSite());
      String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");

      NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
      NavigationContext navigation = navigationService.loadNavigation(siteKey);

      Set<String> children = new LinkedHashSet<String>();

      NodeContext<NodeContext<?>> node = NavigationUtils.loadNode(navigationService, navigation, navUri);
      if (node == null)
View Full Code Here

      SiteKey siteKey = getSiteKey(site);

      //TODO: If there's any benefit in creating our own node model to use with navigation service, lets do it

      DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
      NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);

      PageNavigation pageNavigation = NavigationUtils.loadPageNavigation(new NavigationKey(siteKey, navUri), navigationService, descriptionService);
      if (pageNavigation == null) throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri +"'");

      resultHandler.completed(pageNavigation);
View Full Code Here

        PageService pageService = operationContext.getRuntimeContext().getRuntimeComponent(PageService.class);
        if (pageService == null)
            throw new OperationException(operationName, "PageService was null");

        NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
        if (navigationService == null)
            throw new OperationException(operationName, "Navigation service was null");

        DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(
                DescriptionService.class);
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.mop.navigation.NavigationService

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.