Package com.liferay.portlet

Examples of com.liferay.portlet.PortletPreferencesImpl


    throws IOException, ValidatorException {

    PortletPreferencesWrapper prefsWrapper =
      (PortletPreferencesWrapper)prefs;

    PortletPreferencesImpl prefsImpl =
      (PortletPreferencesImpl)prefsWrapper.getPreferencesImpl();

    prefsImpl.store();
  }
View Full Code Here


//    }

    Map prefsPool = PortletPreferencesLocalUtil.getPreferencesPool(
      pk.userId);

    PortletPreferencesImpl prefs =
      (PortletPreferencesImpl)prefsPool.get(pk);

    if (prefs == null) {
      PortletPreferences portletPreferences = null;

      Portlet portlet = null;
//      if (groupId != null) {
//        portlet = PortletManagerUtil.getPortletById(
//          companyId, groupId, pk.portletId);
//      }
//      else {
        portlet = PortletManagerUtil.getPortletById(
          companyId, pk.portletId);
//      }

      try {
        portletPreferences =
          PortletPreferencesUtil.findByPrimaryKey(pk);
      }
      catch (NoSuchPortletPreferencesException nsppe) {
        portletPreferences = PortletPreferencesUtil.create(pk);

        portletPreferences.setPreferences(
          portlet.getDefaultPreferences());

        PortletPreferencesUtil.update(portletPreferences);
      }

      prefs = PortletPreferencesSerializer.fromXML(
        companyId, pk, portletPreferences.getPreferences());

      prefsPool.put(pk, prefs);
    }

    return (PortletPreferencesImpl)prefs.clone();
  }
View Full Code Here

TOP

Related Classes of com.liferay.portlet.PortletPreferencesImpl

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.