Package org.exoplatform.portal.webui.portal

Examples of org.exoplatform.portal.webui.portal.UIPortal


    */
   static public void setupPublicRenderParams(UIPortlet uiPortlet, Map<String, String[]> requestParams)
   {
      if (ParameterValidation.existsAndIsNotEmpty(requestParams))
      {
         UIPortal uiPortal = Util.getUIPortal();
         Map<String, String[]> publicParams = uiPortal.getPublicParameters();

         for (String key : requestParams.keySet())
         {
            String[] value = requestParams.get(key);
            if (uiPortlet.supportsPublicParam(key))
View Full Code Here


    * This methods return the public render parameters names supported by the targeted portlet; in other words, it sorts
    * the full public render params list and only return the ones that the current portlet can handle
    */
   public List<String> getPublicRenderParamNames()
   {
      UIPortal uiPortal = Util.getUIPortal();
      Map<String, String[]> publicParams = uiPortal.getPublicParameters();

      List<String> publicParamsSupportedByPortlet = new ArrayList<String>();
      if (publicParams != null)
      {
         Set<String> keys = publicParams.keySet();
View Full Code Here

   }

   public Map<String, String[]> getPublicParameters()
   {
      Map<String, String[]> publicParamsMap = new HashMap<String, String[]>();
      UIPortal uiPortal = Util.getUIPortal();
      Map<String, String[]> publicParams = uiPortal.getPublicParameters();
      Set<String> allPublicParamsNames = publicParams.keySet();
      List<String> supportedPublicParamNames = getPublicRenderParamNames();
      for (String oneOfAllParams : allPublicParamsNames)
      {
         if (supportedPublicParamNames.contains(oneOfAllParams))
View Full Code Here

         accessPermission[0] = "*:" + ownerId;
         String editPermission = userACL.getMakableMT() + ":" + ownerId;
        
         if (PortalConfig.PORTAL_TYPE.equals(uiForm.getOwnerType()))
         {
            UIPortal uiPortal = Util.getUIPortal();
            accessPermission = uiPortal.getAccessPermissions();
            editPermission = uiPortal.getEditPermission();
         }
        
        
         UIFormStringInput uiPageName = uiInputSet.getChildById("pageName");
         UIFormStringInput uiPageTitle = uiInputSet.getChildById("pageTitle");
View Full Code Here

    */
   static public class EditPortletActionListener extends EventListener<UIPortlet>
   {
      public void execute(Event<UIPortlet> event) throws Exception
      {
         UIPortal uiPortal = Util.getUIPortal();
         UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
         UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
         uiMaskWS.setUpdated(true);
         UIPortlet uiPortlet = event.getSource();
         UIPortletForm uiPortletForm = uiMaskWS.createUIComponent(UIPortletForm.class, null, null);
         uiPortletForm.setValues(uiPortlet);
View Full Code Here

      String title = (String)request_.getAttribute(REQUEST_TITLE);

      //
      if (title == null)
      {
         UIPortal uiportal = Util.getUIPortal();

         //
         PageNode node = uiportal.getSelectedNode();
         if (node != null)
         {
            ExoContainer container = getApplication().getApplicationServiceContainer();
            container.getComponentInstanceOfType(UserPortalConfigService.class);
            UserPortalConfigService configService = (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
View Full Code Here

         //Minh Hoang TO: The cached UIPage objects corresponding to removed Page should be removed here.
         //As we have multiple UIPortal, which means multiple caches of UIPage. It 's unwise to garbage
         // all UIPage caches at once. Better solution is to clear UIPage on browsing to PageNode having Page
         //removed
        
         UIPortal uiPortal = Util.getUIPortal();
         if (uiPortal.getSelectedNode().getPageReference().equals(page.getPageId()))
         {
            PageNodeEvent<UIPortal> pnevent =
               new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uiPortal.getSelectedNode()
                  .getUri());
            uiPortal.broadcast(pnevent, Phase.PROCESS);
         }
         else
         {
            boolean dataAvailable = uiPageBrowser.feedDataWithQuery(uiPageBrowser.getLastQuery());
            if (!dataAvailable)
View Full Code Here

    * @param event
    * @throws Exception
    */
   private static void addApplicationToPage(Event<UIAddNewApplication> event, boolean atStartup) throws Exception
   {
      UIPortal uiPortal = Util.getUIPortal();

      UIPortalApplication uiPortalApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
      UIPage uiPage;
      if (uiPortal.isRendered())
      {
         uiPage = uiPortal.findFirstComponentOfType(UIPage.class);
      }
      else
      {
         UIPortalToolPanel uiPortalToolPanel = uiPortalApp.findFirstComponentOfType(UIPortalToolPanel.class);
         uiPage = uiPortalToolPanel.findFirstComponentOfType(UIPage.class);
View Full Code Here

   static public class ViewStep3ActionListener extends EventListener<UIPageCreationWizard>
   {

      private void setDefaultPermission(Page page, String ownerType, String ownerId)
      {
         UIPortal uiPortal = Util.getUIPortal();
         if (PortalConfig.PORTAL_TYPE.equals(ownerType))
         {
            page.setAccessPermissions(uiPortal.getAccessPermissions());
            page.setEditPermission(uiPortal.getEditPermission());
         }
         else if (PortalConfig.GROUP_TYPE.equals(ownerType))
         {
            UserACL acl = Util.getUIPortalApplication().getApplicationComponent(UserACL.class);
            ownerId = ownerId.startsWith("/") ? ownerId : "/" + ownerId;
View Full Code Here

    */
   public static void createNodeFromPageTemplate(String nodeName, String nodeLabel, String pageId, PageNavigation navi)
      throws Exception
   {

      UIPortal uiPortal = Util.getUIPortal();
      UserPortalConfigService configService = uiPortal.getApplicationComponent(UserPortalConfigService.class);
      String accessUser = Util.getPortalRequestContext().getRemoteUser();
      PageNode node =
         configService.createNodeFromPageTemplate(nodeName, nodeLabel, pageId, PortalConfig.USER_TYPE, accessUser);

      node.setUri(node.getName());
      navi.addNode(node);
     
      DataStorage dataService = uiPortal.getApplicationComponent(DataStorage.class);
      dataService.save(navi);
      setNavigation(uiPortal.getNavigations(), navi);
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.webui.portal.UIPortal

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.