List of usage examples for com.liferay.portal.kernel.portlet PortalPreferences setSignedIn
public void setSignedIn(boolean signedIn);
From source file:com.liferay.portlet.PortletPreferencesFactoryImpl.java
License:Open Source License
public PortalPreferences getPortalPreferences(HttpSession session, long companyId, long userId, boolean signedIn) throws SystemException { long ownerId = userId; int ownerType = PortletKeys.PREFS_OWNER_TYPE_USER; PortalPreferences portalPreferences = null; if (signedIn) { PortalPreferencesWrapper portalPreferencesWrapper = (PortalPreferencesWrapper) PortalPreferencesLocalServiceUtil .getPreferences(companyId, ownerId, ownerType); portalPreferences = portalPreferencesWrapper.getPortalPreferencesImpl(); } else {// w w w . j a v a 2 s . com if (session != null) { portalPreferences = (PortalPreferences) session.getAttribute(WebKeys.PORTAL_PREFERENCES); } if (portalPreferences == null) { PortalPreferencesWrapper portalPreferencesWrapper = (PortalPreferencesWrapper) PortalPreferencesLocalServiceUtil .getPreferences(companyId, ownerId, ownerType); PortalPreferencesImpl portalPreferencesImpl = portalPreferencesWrapper.getPortalPreferencesImpl(); portalPreferences = (PortalPreferences) portalPreferencesImpl.clone(); if (session != null) { session.setAttribute(WebKeys.PORTAL_PREFERENCES, portalPreferences); } } } portalPreferences.setSignedIn(signedIn); return portalPreferences; }