Examples of DataStorage


Examples of org.exoplatform.portal.config.DataStorage

   public void onStartRequest(Application app, PortalRequestContext context) throws Exception
   {
      String userName = context.getRemoteUser();
      if (userName != null)
      {
         DataStorage storage = (DataStorage)PortalContainer.getComponent(DataStorage.class);
         PortalConfig portalConfig = storage.getPortalConfig("user", userName);

         //
         if (portalConfig == null)
         {
            log.debug("About to create user site for user " + userName);
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

      {
         PageNode node = portal.getSelectedNode();
         if (node != null)
         {
            String pageRef = node.getPageReference();
            DataStorage storage = portal.getApplicationComponent(DataStorage.class);
            Page page = storage.getPage(pageRef);
            if (page != null)
            {
               UserACL userACL = portal.getApplicationComponent(UserACL.class);
               return userACL.hasPermission(page);
            }
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

         {
            return false;
         }
         else
         {
            DataStorage dataStorage = portalApp.getApplicationComponent(DataStorage.class);
            Page page = dataStorage.getPage(pageReference);
            if(page == null)
            {
               return false;
            }
            else
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

         String nodeName = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);

         PageNavigation cachedNavigation = toolBarPortlet.getCurrentUserNavigation();
        
         // Update navigation for prevent create first node which already existed
         DataStorage dataStorage = toolBarPortlet.getApplicationComponent(DataStorage.class);        
         PageNavigation userNavigation =
            dataStorage.getPageNavigation(cachedNavigation.getOwnerType(), cachedNavigation.getOwnerId());
         cachedNavigation.merge(userNavigation);

         UserPortalConfigService configService = toolBarPortlet.getApplicationComponent(UserPortalConfigService.class);
         if (cachedNavigation != null && configService != null && cachedNavigation.getNodes().size() < 1)
         {
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

    public void setState(PortletState<S> state) {
        if (state != null) {
            try {
                PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
                DataStorage dataStorage = getApplicationComponent(DataStorage.class);
                String applicationId = dataStorage.getId(state.getApplicationState());
                ModelAdapter<S, C> adapter = ModelAdapter.getAdapter(state.getApplicationType());
                PortletContext producerOfferedPortletContext = adapter.getProducerOfferedPortletContext(applicationId);
                org.gatein.pc.api.Portlet producedOfferedPortlet;

                try {
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

                showedUIPortal = uiPortalApp.getCachedUIPortal(targetNav.getKey());
                if (showedUIPortal != null) {
                    showedUIPortal.setNavPath(targetNode);
                    uiPortalApp.setCurrentSite(showedUIPortal);

                    DataStorage storageService = uiPortalApp.getApplicationComponent(DataStorage.class);
                    PortalConfig associatedPortalConfig = storageService.getPortalConfig(targetNav.getKey().getTypeName(),
                            targetNav.getKey().getName());
                    UserPortalConfig userPortalConfig = pcontext.getUserPortalConfig();

                    // Update layout-related data on UserPortalConfig
                    userPortalConfig.setPortalConfig(associatedPortalConfig);
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

            pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID));
        }

        private UIPortal buildUIPortal(SiteKey siteKey, UIPortalApplication uiPortalApp, UserPortalConfig userPortalConfig)
                throws Exception {
            DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
            if (storage == null) {
                return null;
            }
            PortalConfig portalConfig = storage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
            Container layout = portalConfig.getPortalLayout();
            if (layout != null) {
                userPortalConfig.setPortalConfig(portalConfig);
            }
            UIPortal uiPortal = uiPortalApp.createUIComponent(UIPortal.class, null, null);
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

    }

    public void onStartRequest(Application app, PortalRequestContext context) throws Exception {
        String userName = context.getRemoteUser();
        if (userName != null && SiteType.USER == context.getSiteType() && userName.equals(context.getSiteName())) {
            DataStorage storage = (DataStorage) PortalContainer.getComponent(DataStorage.class);
            UserPortalConfigService configService = (UserPortalConfigService) PortalContainer
                    .getComponent(UserPortalConfigService.class);
            PortalConfig portalConfig = storage.getPortalConfig("user", userName);

            //
            if (portalConfig == null) {
                log.debug("About to create user site for user " + userName);
                configService.createUserSite(userName);
            }

            UserPortalConfig userPortalConfig = context.getUserPortalConfig();
            UserPortal userPortal = userPortalConfig.getUserPortal();
            SiteKey siteKey = context.getSiteKey();
            UserNavigation nav = userPortal.getNavigation(siteKey);

            try {
                UserNode rootNode = userPortal.getNode(nav, Scope.CHILDREN, UserNodeFilterConfig.builder().build(), null);
                if (rootNode.getChildren().size() < 1) {
                    // TODO: Retrieve tab name from request
                    Page page = configService.createPageTemplate(PAGE_TEMPLATE, siteKey.getTypeName(), siteKey.getName());
                    page.setName(DEFAULT_TAB_NAME);
                    page.setTitle(DEFAULT_TAB_NAME);

                    //
                    PageState pageState = new PageState(page.getTitle(), page.getDescription(), page.isShowMaxWindow(),
                            page.getFactoryId(), page.getAccessPermissions() != null ? Arrays.asList(page
                                    .getAccessPermissions()) : null, page.getEditPermission());
                    configService.getPageService().savePage(new PageContext(page.getPageKey(), pageState));

                    //
                    storage.save(page);

                    //
                    UserNode tabNode = rootNode.addChild(DEFAULT_TAB_NAME);
                    tabNode.setLabel(DEFAULT_TAB_NAME);
                    tabNode.setPageRef(PageKey.parse(page.getPageId()));
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

                                page.getFactoryId(), page.getAccessPermissions() != null ? Arrays.asList(page
                                        .getAccessPermissions()) : null, page.getEditPermission());
                        pageService.savePage(new PageContext(page.getPageKey(), pageState));

                        //
                        DataStorage dataService = uiPage.getApplicationComponent(DataStorage.class);
                        dataService.save(page);
                    }
                    break;
                }
            }
            PortalRequestContext pcontext = (PortalRequestContext) event.getRequestContext();
View Full Code Here

Examples of org.exoplatform.portal.config.DataStorage

                        page.getFactoryId(), page.getAccessPermissions() != null ? Arrays.asList(page.getAccessPermissions())
                                : null, page.getEditPermission());
                pageService.savePage(new PageContext(page.getPageKey(), pageState));

                //
                DataStorage dataService = uiPage.getApplicationComponent(DataStorage.class);
                dataService.save(page);

                //
                pcontext.ignoreAJAXUpdateOnPortlets(false);
                pcontext.setResponseComplete(true);
                pcontext.getWriter().write(EventListener.RESULT_OK);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.