Package org.exoplatform.portal.config

Examples of org.exoplatform.portal.config.DataStorage


   {
      if (state != null)
      {
         try
         {
            DataStorage ds = getApplicationComponent(DataStorage.class);
            String gadgetId = ds.getId(state);

            //
            this.gadgetId = gadgetId;
            this.state = state;
         }
View Full Code Here


   @Override
   public boolean isRendered()
   {
      try
      {
         DataStorage service = getApplicationComponent(DataStorage.class);
         service.load(state, ApplicationType.GADGET);
         if (getApplication() == null)
         {
            throw new Exception();
         }
      }
View Full Code Here

   public boolean isLossData()
   {
      try
      {
         DataStorage service = getApplicationComponent(DataStorage.class);
         service.load(state, ApplicationType.GADGET);
         if (getApplication() == null)
         {
            throw new Exception();
         }
      }
View Full Code Here

    * @return the string represents user preference of gadget application
    * @throws Exception when can't convert object to string
    */
   public String getUserPref() throws Exception
   {
      DataStorage service = getApplicationComponent(DataStorage.class);
      org.exoplatform.portal.pom.spi.gadget.Gadget pp = service.load(state, ApplicationType.GADGET);
      return pp != null ? pp.getUserPref() : null;
   }
View Full Code Here

      return pp != null ? pp.getUserPref() : null;
   }

   public void addUserPref(String addedUserPref) throws Exception
   {
      DataStorage service = getApplicationComponent(DataStorage.class);
      org.exoplatform.portal.pom.spi.gadget.Gadget gadget = service.load(state, ApplicationType.GADGET);
      if (gadget == null)
      {
         gadget = new org.exoplatform.portal.pom.spi.gadget.Gadget();
      }

      //
      gadget.addUserPref(addedUserPref);

      //
      state = service.save(state, gadget);

      // WARNING :
      // This is used to force a state save and it should not be copied else where to make things
      // convenient as this could lead to a severe performance degradation
      ModelDataStorage mds = getApplicationComponent(ModelDataStorage.class);
View Full Code Here

               showedUIPortal.setSelectedNode(targetPageNode);
               showedUIPortal.setSelectedPath(targetedPathNodes);
               uiPortalApp.setShowedUIPortal(showedUIPortal);
              
               //Temporary solution to fix edit inline error while switching between navigations
               DataStorage storageService = uiPortalApp.getApplicationComponent(DataStorage.class);
               PortalConfig associatedPortalConfig = storageService.getPortalConfig(newNavType, newNavId);
               UserPortalConfig userPortalConfig = uiPortalApp.getUserPortalConfig();
              
               //Update layout-related data on UserPortalConfig
               userPortalConfig.setPortal(associatedPortalConfig);
View Full Code Here

         return nodes;
      }

      private UIPortal buildUIPortal(PageNavigation newPageNav, UIPortalApplication uiPortalApp, UserPortalConfig userPortalConfig) throws Exception
      {
         DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
         if(storage == null){
            return null;
         }
         PortalConfig portalConfig = storage.getPortalConfig(newPageNav.getOwnerType(), newPageNav.getOwnerId());
         Container layout = portalConfig.getPortalLayout();
         if(layout != null)
         {
            userPortalConfig.setPortal(portalConfig);
         }
View Full Code Here

         String uri = (uiPortal.getSelectedNode() != null)? (uiPortal.getSelectedNode().getUri()) : null;
       
         if (uiComposer.isPortalExist(editPortal))
         {
            DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
            PortalConfig pConfig =
               storage.getPortalConfig(uiPortal.getSelectedNavigation().getOwnerType(), uiPortal
                  .getSelectedNavigation().getOwnerId());
            if (pConfig != null)
            {
               uiPortalApp.getUserPortalConfig().setPortal(pConfig);
            }
View Full Code Here

                  Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
                  if (page.getChildren() == null)
                  {
                     page.setChildren(new ArrayList<ModelObject>());
                  }
                  DataStorage dataService = uiPage.getApplicationComponent(DataStorage.class);
                  dataService.save(page);
               }
               break;
            }
         }
         PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();
View Full Code Here

            Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
            if (page.getChildren() == null)
            {
               page.setChildren(new ArrayList<ModelObject>());
            }
            DataStorage dataService = uiPage.getApplicationComponent(DataStorage.class);
            dataService.save(page);
            pcontext.setFullRender(false);
            pcontext.setResponseComplete(true);
            pcontext.getWriter().write(EventListener.RESULT_OK);
         }
         else
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.