Package com.liferay.portlet

Examples of com.liferay.portlet.CachePortlet


    Portlet portlet =
      PortletManagerUtil.getPortletById(companyId, portletId);

    ServletContext ctx = (ServletContext)req.getAttribute(WebKeys.CTX);

    CachePortlet cachePortlet = PortalUtil.getPortletInstance(portlet, ctx);

    if (user != null) {
      CachePortlet.clearResponse(ses, layout, portletId);
    }

//    PortletPreferences portletPrefs =
//      PortletPreferencesManagerUtil.getPreferences(
//        companyId, PortalUtil.getPortletPreferencesPK(req, portletId));

    PortletPreferences portletPrefs = null;
   
    PortletConfig portletConfig = PortalUtil.getPortletConfig(portlet, ctx);
    PortletContext portletCtx = portletConfig.getPortletContext();

    WindowState windowState = new WindowState(
      ParamUtil.getString(req, "p_p_state"));

    PortletMode portletMode = new PortletMode(
      ParamUtil.getString(req, "p_p_mode"));

    if (action) {
      ActionRequestImpl actionRequest = new ActionRequestImpl(
        req, portlet, cachePortlet, portletCtx, windowState,
        portletMode, portletPrefs, layout.getId());

      ActionResponseImpl actionResponse = new ActionResponseImpl(
        actionRequest, res, portletId, user, layout, windowState,
        portletMode);

      actionRequest.defineObjects(portletConfig, actionResponse);

      cachePortlet.processAction(actionRequest, actionResponse);

      RenderParametersPool.put(
        req, layout.getId(), portletId,
        actionResponse.getRenderParameters());
    }
View Full Code Here


    if (map == null) {
      return;
    }

    CachePortlet portletInstance =
      (CachePortlet)map.get(portlet.getPortletId());

    if (portletInstance != null) {
      portletInstance.destroy();

      map.remove(portlet.getPortletId());
    }

    if (portlet.isWARFile()) {
View Full Code Here

      map = CollectionFactory.getSyncHashMap();

      SimpleCachePool.put(scpId, map);
    }

    CachePortlet portletInstance =
      (CachePortlet)map.get(portlet.getPortletId());

    if (portletInstance == null) {
      PortletConfig portletConfig = getPortletConfig(portlet, ctx);
View Full Code Here

   */
  public CachePortlet init(
      PortletConfig portletConfig, com.dotcms.repackage.javax.portlet.Portlet portletInstance)
    throws PortletException {

    CachePortlet cachePortlet = null;

    try {
      if (portletInstance == null) {
        portletInstance = (com.dotcms.repackage.javax.portlet.Portlet)
          Class.forName(getPortletClass()).newInstance();
      }

      cachePortlet = new CachePortlet(
        portletInstance, portletConfig.getPortletContext(),
        getExpCache());

      cachePortlet.init(portletConfig);
    }
    catch (ClassNotFoundException cnofe) {
      throw new UnavailableException(cnofe.getMessage());
    }
    catch (InstantiationException ie) {
View Full Code Here

    String portletId = portlet.getPortletId();

    ServletContext ctx =
      (ServletContext)req.getAttribute(WebKeys.CTX);

    CachePortlet cachePortlet = PortalUtil.getPortletInstance(portlet, ctx);

    PortletPreferences portletPrefs =
      PortletPreferencesManagerUtil.getPreferences(
        portlet.getCompanyId(),
        PortalUtil.getPortletPreferencesPK(req, portletId));
View Full Code Here

TOP

Related Classes of com.liferay.portlet.CachePortlet

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.