Package com.liferay.portal.model

Examples of com.liferay.portal.model.PortletPreferences


                 * getString() method is called on a LONG field on an Oracle database. Because of this,
                 * the object is loaded from liferay and DotConnect is not used
                 * http://jira.dotmarketing.net/browse/DOTCMS-1911
                 */
                for (int j = 0; j < l.size(); j++) {
                    PortletPreferences portletPreferences = (PortletPreferences)l.get(j);
                    DotConnect dc = new DotConnect();
                    dc.setSQL("insert into portletpreferences values (?,?,?,?)");
                    dc.addParam(portletPreferences.getPortletId());
                    dc.addParam(portletPreferences.getUserId());
                    dc.addParam(portletPreferences.getLayoutId());
                    dc.addParam(portletPreferences.getPreferences());
                    dc.getResults();
                }
            }else if (_importClass.equals(User.class)) {
                for (int j = 0; j < l.size(); j++) {
                    User u = (User)l.get(j);
View Full Code Here


    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

  public PortletPreferences updatePreferences(
      PortletPreferencesPK pk, PortletPreferencesImpl prefs)
    throws PortalException, SystemException {

    PortletPreferences portletPrefences =
      PortletPreferencesUtil.findByPrimaryKey(pk);

    String xml = PortletPreferencesSerializer.toXML(prefs);

    PortletPreferencesLocalUtil.getPreferencesPool(
      pk.userId).put(pk, prefs);

    portletPrefences.setPreferences(xml);

    PortletPreferencesUtil.update(portletPrefences);

    return portletPrefences;
  }
View Full Code Here

    }
    else if (portletPreferencesPK == null) {
      return null;
    }
    else {
      PortletPreferences obj = null;
      String key = portletPreferencesPK.toString();

      if (Validator.isNull(key)) {
        return null;
      }
View Full Code Here

    }
    else if (portletPreferencesPK == null) {
      return null;
    }
    else {
      PortletPreferences obj = null;
      String key = portletPreferencesPK.toString();

      if (Validator.isNull(key)) {
        return null;
      }
View Full Code Here

TOP

Related Classes of com.liferay.portal.model.PortletPreferences

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.