Package org.exoplatform.portal.mop.navigation

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


      return null;
   }
  
   public UserNode getDefaultPath(UserNavigation userNavigation, UserNodeFilterConfig filterConfig) throws UserPortalException, NavigationServiceException
   {
      NavigationContext navigation = userNavigation.navigation;
      if (navigation.getState() != null)
      {
         UserNodeContext context = new UserNodeContext(userNavigation, filterConfig);
         NodeContext<UserNode> nodeContext = service.getNavigationService().loadNode(context, navigation, Scope.CHILDREN, null);
         if (nodeContext != null)
         {
View Full Code Here


      PortalConfig portalConfig = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
      if (portalConfig == null) throw new Exception("Cannot import navigation because site does not exist for " + siteKey);

      Locale locale = (portalConfig.getLocale() == null) ? Locale.ENGLISH : new Locale(portalConfig.getLocale());

      final NavigationContext navContext = navigationService.loadNavigation(siteKey);
      if (navContext == null)
      {
         rollbackTask = new RollbackTask()
         {
            @Override
View Full Code Here

    @Override
    public Navigation getNavigation(SiteId siteId) {
        Parameters.requireNonNull(siteId, "siteId");

        try {
            NavigationContext ctx = navigationService.loadNavigation(Util.from(siteId));
            if (ctx == null) return null;

            return new NavigationImpl(siteId, navigationService, ctx, descriptionService, bundleManager);
        } catch (Throwable t) {
            throw new ApiException("Failed to load navigation", t);
View Full Code Here

    }

    private static List<Site> fromList(List<PortalConfig> internalSites, NavigationService service, boolean includeAllSites) {
        List<Site> sites = new ArrayList<Site>(internalSites.size());
        for (PortalConfig internalSite : internalSites) {
            NavigationContext ctx = null;
            if (!includeAllSites) {
                try {
                    ctx = service.loadNavigation(new SiteKey(internalSite.getType(), internalSite.getName()));
                } catch (Throwable t) {
                    throw new ApiException("Failed to find sites", t);
View Full Code Here

    @Override
    public Navigation getNavigation(SiteId siteId) {
        Parameters.requireNonNull(siteId, "siteId");

        try {
            NavigationContext ctx = navigationService.loadNavigation(Util.from(siteId));
            if (ctx == null) return null;

            return new NavigationImpl(siteId, navigationService, ctx, descriptionService, bundleManager);
        } catch (Throwable t) {
            throw new ApiException("Failed to load navigation", t);
View Full Code Here

        PortalConfig[] loaded = access.load(start, end);
        List<PortalConfig> list = new ArrayList<PortalConfig>(loaded.length);
        for (PortalConfig pc : loaded) {
            if (pc == null) continue;

            NavigationContext ctx = null;
            if (!includeAllSites) {
                try {
                    ctx = navigationService.loadNavigation(new SiteKey(pc.getType(), pc.getName()));
                } catch (Throwable t) {
                    throw new ApiException("Failed to find sites", t);
View Full Code Here

    }

    protected String getNodeIfExists(String redirectSite, String requestPath, Boolean useCommonAncestor) {
        log.info("GetNodeExits called [" + redirectSite + "] : [" + requestPath + "]");

        NavigationContext navContext = null;

        if (redirectSite == null || navService == null) {
            log.warn("Redirect site name [" + redirectSite + "] or the navigation service object [" + navService
                    + "] is null. Cannot perform redirect.");
            return null;
View Full Code Here

            storage_.create(cfg);
        }

        // Create a blank navigation if needed
        SiteKey key = SiteKey.user(userName);
        NavigationContext nav = navService.loadNavigation(key);
        if (nav == null) {
            nav = new NavigationContext(key, new NavigationState(5));
            navService.saveNavigation(nav);
        }
    }
View Full Code Here

    @Override
    public Navigation getNavigation(SiteId siteId) {
        Parameters.requireNonNull(siteId, "siteId");

        try {
            NavigationContext ctx = navigationService.loadNavigation(Util.from(siteId));
            if (ctx == null) return null;

            return new NavigationImpl(siteId, navigationService, ctx, descriptionService, bundleManager);
        } catch (Throwable t) {
            throw new ApiException("Failed to load navigation", t);
View Full Code Here

        PortalConfig[] loaded = access.load(start, end);
        List<PortalConfig> list = new ArrayList<PortalConfig>(loaded.length);
        for (PortalConfig pc : loaded) {
            if (pc == null) continue;

            NavigationContext ctx = null;
            if (!includeAllSites) {
                try {
                    ctx = navigationService.loadNavigation(new SiteKey(pc.getType(), pc.getName()));
                } catch (Throwable t) {
                    throw new ApiException("Failed to find sites", t);
View Full Code Here

TOP

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

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.