Example usage for com.liferay.portal.kernel.util SessionClicks put

List of usage examples for com.liferay.portal.kernel.util SessionClicks put

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util SessionClicks put.

Prototype

public static void put(HttpSession session, String key, String value) 

Source Link

Usage

From source file:com.liferay.calendar.web.internal.portlet.action.CalendarConfigurationAction.java

License:Open Source License

protected void updateUserSettings(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {

    PortletPreferences portletPreferences = actionRequest.getPreferences();

    int defaultDuration = ParamUtil.getInteger(actionRequest, "defaultDuration");
    String defaultView = ParamUtil.getString(actionRequest, "defaultView");
    String timeFormat = ParamUtil.getString(actionRequest, "timeFormat");
    String timeZoneId = ParamUtil.getString(actionRequest, "timeZoneId");
    boolean usePortalTimeZone = ParamUtil.getBoolean(actionRequest, "usePortalTimeZone");
    int weekStartsOn = ParamUtil.getInteger(actionRequest, "weekStartsOn");

    portletPreferences.setValue("defaultDuration", String.valueOf(defaultDuration));
    portletPreferences.setValue("defaultView", defaultView);
    portletPreferences.setValue("timeFormat", timeFormat);
    portletPreferences.setValue("timeZoneId", timeZoneId);
    portletPreferences.setValue("usePortalTimeZone", String.valueOf(usePortalTimeZone));
    portletPreferences.setValue("weekStartsOn", String.valueOf(weekStartsOn));

    HttpServletRequest httpServletRequest = _portal.getHttpServletRequest(actionRequest);

    SessionClicks.put(httpServletRequest, "com.liferay.calendar.web_defaultView", defaultView);

    portletPreferences.store();//from w  w  w .j a  va 2  s.c o m
}

From source file:com.liferay.site.internal.application.list.LatentGroupProvider.java

License:Open Source License

@Override
public void setGroup(HttpServletRequest request, Group group) {
    HttpServletRequest originalRequest = _portal.getOriginalServletRequest(request);

    SessionClicks.put(originalRequest.getSession(), _KEY_LATENT_GROUP, String.valueOf(group.getGroupId()));
}

From source file:com.liferay.site.util.RecentGroupManager.java

License:Open Source License

private void _setRecentGroupsValue(HttpServletRequest request, String value) {

    SessionClicks.put(request, _KEY_RECENT_GROUPS, value);
}