Package org.exoplatform.web.application

Examples of org.exoplatform.web.application.RequestContext


        }
        return null;
    }

    public String createToken(String gadgetURL, Long moduleId) {
        RequestContext context = RequestContext.getCurrentInstance();
        // context.get
        String rUser = context.getRemoteUser();
        String viewer = rUser;

        return createToken(gadgetURL, viewer, rUser, moduleId, "default");
    }
View Full Code Here


            MetaInfo meta = info.getMeta();
            displayName = meta.getMetaValue(MetaInfo.DISPLAY_NAME);
            String value = null;
            if (displayName != null)
            {
               RequestContext i = PortalRequestContext.getCurrentInstance();
               Locale locale = i.getLocale();
               value = displayName.getString(locale, true);
            }
            if (value == null || value.length() == 0)
            {
               value = info.getName();
            }
            return value;
         }
         else
         {
            return "";
         }
      }
      else
      {
         String value = null;
         if (displayName != null)
         {
            RequestContext i = PortalRequestContext.getCurrentInstance();
            Locale locale = i.getLocale();
            value = displayName.getString(locale, true);
         }
         if (value == null || value.length() == 0)
         {
            org.gatein.pc.api.Portlet portlet = getProducedOfferedPortlet();
View Full Code Here

                PortletInfo info = portlet.getInfo();
                MetaInfo meta = info.getMeta();
                displayName = meta.getMetaValue(MetaInfo.DISPLAY_NAME);
                String value = null;
                if (displayName != null) {
                    RequestContext i = PortalRequestContext.getCurrentInstance();
                    Locale locale = i.getLocale();
                    value = displayName.getString(locale, true);
                }
                if (value == null || value.length() == 0) {
                    value = info.getName();
                }
                return value;
            } else {
                return "";
            }
        } else {
            RequestContext i = PortalRequestContext.getCurrentInstance();
            Locale locale = i.getLocale();
            String value = displayName.getString(locale, true);

            if (ParameterValidation.isNullOrEmpty(value)) {
                org.gatein.pc.api.Portlet portlet = getProducedOfferedPortlet();
                PortletInfo info = portlet.getInfo();
View Full Code Here

        uicomponentToUpdateByAjax.add(uicomponent);
    }

    public ResourceResolver getResourceResolver(String uri) {
        Application app = getApplication();
        RequestContext pcontext = this;
        while (app != null) {
            ApplicationResourceResolver appResolver = app.getResourceResolver();
            ResourceResolver resolver = appResolver.getResourceResolver(uri);
            if (resolver != null) {
                return resolver;
            }
            pcontext = pcontext.getParentAppRequestContext();
            if (pcontext != null) {
                app = pcontext.getApplication();
            } else {
                app = null;
            }
        }
        return null;
View Full Code Here

*/
public class RefreshCurrentUserPortal extends Listener<NavigationService, SiteKey> {

    @Override
    public void onEvent(Event<NavigationService, SiteKey> event) throws Exception {
        RequestContext ctx = RequestContext.getCurrentInstance();
        if (ctx != null) {
            UserPortal userPortal = ctx.getUserPortal();
            if (userPortal != null) {
                userPortal.refresh();
            }
        }
    }
View Full Code Here

      {
         ApplicationResourceResolver appResolver = app.getResourceResolver();
         ResourceResolver resolver = appResolver.getResourceResolver(uri);
         if (resolver != null)
            return resolver;
         RequestContext pcontext = getParentAppRequestContext();
         if (pcontext != null)
            app = pcontext.getApplication();
         else
            app = null;
      }
      return null;
   }
View Full Code Here

{

   @Override
   public void onEvent(Event<NavigationService, SiteKey> event) throws Exception
   {
      RequestContext ctx = RequestContext.getCurrentInstance();
      if (ctx != null)
      {
         UserPortal userPortal = ctx.getUserPortal();
         if (userPortal != null)
         {
            userPortal.refresh();
         }
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.web.application.RequestContext

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.