Package org.exoplatform.portal.mop.navigation

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


            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


        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

        Collection<String> deletedNavigationGroups = new ArrayList<String>();
        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

        // 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 + "'");
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

        } else {
            listGroup.addAll(dataService.getMakableNavigations(pContext.getRemoteUser(), false));
        }

        // Filter all groups having navigation
        NavigationService navigationService = getApplicationComponent(NavigationService.class);
        List<String> groupsHavingNavigation = new ArrayList<String>();
        for (String groupName : listGroup) {
            NavigationContext navigation = navigationService.loadNavigation(SiteKey.group(groupName));
            if (navigation != null && navigation.getState() != null) {
                groupsHavingNavigation.add(groupName);
            }
        }
        listGroup.removeAll(groupsHavingNavigation);
View Full Code Here

            ownerId = URLDecoder.decode(ownerId);

            UIPortalApplication uiPortalApp = Util.getUIPortal().getAncestorOfType(UIPortalApplication.class);

            // ensure this navigation does not exist
            NavigationService navigationService = uicomp.getApplicationComponent(NavigationService.class);
            NavigationContext navigation = navigationService.loadNavigation(SiteKey.group(ownerId));
            if (navigation != null && navigation.getState() != null) {
                uiPortalApp.addMessage(new ApplicationMessage("UIPageNavigationForm.msg.existPageNavigation",
                        new String[] { ownerId }));
            } else {
                // Create portal config of the group when it does not exist
                DataStorage dataService = uicomp.getApplicationComponent(DataStorage.class);
                if (dataService.getPortalConfig("group", ownerId) == null) {
                    UserPortalConfigService configService = uicomp.getApplicationComponent(UserPortalConfigService.class);
                    configService.createGroupSite(ownerId);
                }

                // create navigation for group
                SiteKey key = SiteKey.group(ownerId);
                NavigationContext existing = navigationService.loadNavigation(key);
                if (existing == null) {
                    navigationService.saveNavigation(new NavigationContext(key, new NavigationState(0)));
                }
            }

            // Update group navigation list
            ctx.addUIComponentToUpdateByAjax(uicomp);
View Full Code Here

            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);
            NavigationKey navigationKey = new NavigationKey(siteKey, navUri);

            // Find navigation first
            NodeContext<?> context = NavigationUtils.loadNode(navigationService, navigationService.loadNavigation(siteKey),
                    navigationKey.getNavUri());
            if (context == null)
                throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri + "'");

            BindingProvider bindingProvider = operationContext.getBindingProvider();
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

        // 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 + "'");
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.