Package org.exoplatform.portal.config

Examples of org.exoplatform.portal.config.DataStorage


            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }

         // ensure this navigation is exist
         DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
         if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
            return;
         }
View Full Code Here


            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }

         // TODO ensure this navigation is exist
         DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
         if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
            return;
         }

         // remove selected navigation
         if (uicomp.navigations == null || uicomp.navigations.size() < 1)
         {
            return;
         }
         uicomp.navigations.remove(navigation);

         // remove navigation from UIPortalApplication
         UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
         removeNavigationByID(uiPortalApp.getUserPortalConfig().getNavigations(), navigation);
         removeNavigationByID(uiPortalApp.getNavigations(), navigation);
        
        
         service.remove(navigation);
         event.getRequestContext().addUIComponentToUpdateByAjax(uicomp);

         //Update UserToolbarGroupPortlet
         UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChild(UIWorkingWorkspace.class);
         uiWorkingWS.updatePortletsByName("UserToolbarGroupPortlet");
View Full Code Here

   {
      public void execute(Event<UISiteManagement> event) throws Exception
      {
         UISiteManagement uicomp = event.getSource();
         String portalName = event.getRequestContext().getRequestParameter(OBJECTID);
         DataStorage dataService = uicomp.getApplicationComponent(DataStorage.class);
         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApplication = context.getUIApplication();
        
         //Minh Hoang TO: User could edit navigation if he/she has edit permissions on PortalConfig. That is not
         //at all logical and should be modified after release 3.1 GA
         UserPortalConfigService configService = uicomp.getApplicationComponent(UserPortalConfigService.class);
         UserPortalConfig userPortalConfig = configService.getUserPortalConfig(portalName, context.getRemoteUser());
         if(userPortalConfig == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
               new String[]{portalName}));
            return;
         }
        
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(userPortalConfig.getPortalConfig()))
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));;
            return;
         }
        
         PageNavigation edittedNavigation = dataService.getPageNavigation(PortalConfig.PORTAL_TYPE, portalName);
        
        
         //Minh Hoang TO: For release 3.1, Edit Permission check would be rollback to former checks on PortalConfig
         /*
         if (edittedNavigation == null)
View Full Code Here

   }

   @SuppressWarnings("unchecked")
   public void loadPortalConfigs() throws Exception
   {
      DataStorage service = getApplicationComponent(DataStorage.class);

      Query<PortalConfig> query = new Query<PortalConfig>(null, null, null, null, PortalConfig.class);
      LazyPageList<PortalConfig> temp = service.find(query, new Comparator<PortalConfig>()
      {
         public int compare(PortalConfig pconfig1, PortalConfig pconfig2)
         {
            return pconfig1.getName().toLowerCase().compareTo(pconfig2.getName().toLowerCase());
         }
View Full Code Here

         page.setModifiable(true);
         if (page.getChildren() == null)
            page.setChildren(new ArrayList<ModelObject>());

         // check page is exist
         DataStorage dataService = uiForm.getApplicationComponent(DataStorage.class);
         Page existPage = dataService.getPage(page.getPageId());
         if (existPage != null)
         {
            uiPortalApp.addMessage(new ApplicationMessage("UIPageForm.msg.sameName", null));
            pcontext.addUIComponentToUpdateByAjax(uiPortalApp.getUIPopupMessages());
            return;
         }

         // save page to database
         dataService.create(page);
         pageSelector.setValue(page.getPageId());
      }
View Full Code Here

   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

      {
         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

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

         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

    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

TOP

Related Classes of org.exoplatform.portal.config.DataStorage

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.