org.apache.jsp.members.user_005fdisplay_jsp.java Source code

Java tutorial

Introduction

Here is the source code for org.apache.jsp.members.user_005fdisplay_jsp.java

Source

package org.apache.jsp.members;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import com.liferay.client.json.ipgeocoder.model.IPInfo;
import com.liferay.client.json.ipgeocoder.util.IPGeocoderUtil;
import com.liferay.portal.NoSuchUserException;
import com.liferay.portal.kernel.dao.search.ResultRow;
import com.liferay.portal.kernel.dao.search.SearchContainer;
import com.liferay.portal.kernel.dao.search.SearchEntry;
import com.liferay.portal.kernel.dao.search.TextSearchEntry;
import com.liferay.portal.kernel.language.LanguageUtil;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.messaging.DestinationNames;
import com.liferay.portal.kernel.messaging.MessageBusUtil;
import com.liferay.portal.kernel.servlet.ImageServletTokenUtil;
import com.liferay.portal.kernel.util.CalendarFactoryUtil;
import com.liferay.portal.kernel.util.ContentTypes;
import com.liferay.portal.kernel.util.FastDateFormatFactoryUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.HtmlUtil;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.model.Contact;
import com.liferay.portal.model.Group;
import com.liferay.portal.model.GroupConstants;
import com.liferay.portal.model.Layout;
import com.liferay.portal.model.LayoutConstants;
import com.liferay.portal.model.Organization;
import com.liferay.portal.model.Portlet;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.GroupLocalServiceUtil;
import com.liferay.portal.service.LayoutLocalServiceUtil;
import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.PortletLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.service.permission.UserPermissionUtil;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.util.PortletKeys;
import com.liferay.portal.util.comparator.UserLoginDateComparator;
import com.liferay.portlet.blogs.service.BlogsStatsUserLocalServiceUtil;
import com.liferay.portlet.expando.service.ExpandoValueLocalServiceUtil;
import com.liferay.portlet.messageboards.service.MBStatsUserLocalServiceUtil;
import com.liferay.portlet.social.model.SocialActivity;
import com.liferay.portlet.social.model.SocialRelationConstants;
import com.liferay.portlet.social.model.SocialRequestConstants;
import com.liferay.portlet.social.service.SocialActivityLocalServiceUtil;
import com.liferay.portlet.social.service.SocialRelationLocalServiceUtil;
import com.liferay.portlet.social.service.SocialRequestLocalServiceUtil;
import com.liferay.socialnetworking.NoSuchMeetupsEntryException;
import com.liferay.socialnetworking.NoSuchMeetupsRegistrationException;
import com.liferay.socialnetworking.friends.social.FriendsRequestKeys;
import com.liferay.socialnetworking.members.social.MembersRequestKeys;
import com.liferay.socialnetworking.meetups.util.MeetupsConstants;
import com.liferay.socialnetworking.model.MeetupsEntry;
import com.liferay.socialnetworking.model.MeetupsRegistration;
import com.liferay.socialnetworking.model.WallEntry;
import com.liferay.socialnetworking.service.MeetupsEntryLocalServiceUtil;
import com.liferay.socialnetworking.service.MeetupsRegistrationLocalServiceUtil;
import com.liferay.socialnetworking.service.WallEntryLocalServiceUtil;
import com.liferay.socialnetworking.util.PortletPropsValues;
import com.liferay.util.RSSUtil;
import com.liferay.util.portlet.PortletProps;
import java.text.Format;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import javax.portlet.ActionRequest;
import javax.portlet.PortletURL;
import javax.portlet.WindowState;

public final class user_005fdisplay_jsp extends org.apache.jasper.runtime.HttpJspBase
        implements org.apache.jasper.runtime.JspSourceDependent {

    private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

    private static java.util.List _jspx_dependants;

    static {
        _jspx_dependants = new java.util.ArrayList(7);
        _jspx_dependants.add("/init.jsp");
        _jspx_dependants.add("/WEB-INF/tld/c.tld");
        _jspx_dependants.add("/WEB-INF/tld/liferay-portlet.tld");
        _jspx_dependants.add("/WEB-INF/tld/liferay-aui.tld");
        _jspx_dependants.add("/WEB-INF/tld/liferay-theme.tld");
        _jspx_dependants.add("/WEB-INF/tld/liferay-ui.tld");
        _jspx_dependants.add("/WEB-INF/tld/liferay-util.tld");
    }

    private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody;
    private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody;
    private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fliferay_002dui_005fuser_002ddisplay_0026_005fuserName_005fuserId_005fnobody;

    private javax.el.ExpressionFactory _el_expressionfactory;
    private org.apache.AnnotationProcessor _jsp_annotationprocessor;

    public Object getDependants() {
        return _jspx_dependants;
    }

    public void _jspInit() {
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody = org.apache.jasper.runtime.TagHandlerPool
                .getTagHandlerPool(getServletConfig());
        _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody = org.apache.jasper.runtime.TagHandlerPool
                .getTagHandlerPool(getServletConfig());
        _005fjspx_005ftagPool_005fliferay_002dui_005fuser_002ddisplay_0026_005fuserName_005fuserId_005fnobody = org.apache.jasper.runtime.TagHandlerPool
                .getTagHandlerPool(getServletConfig());
        _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext())
                .getExpressionFactory();
        _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext()
                .getAttribute(org.apache.AnnotationProcessor.class.getName());
    }

    public void _jspDestroy() {
        _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody.release();
        _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody.release();
        _005fjspx_005ftagPool_005fliferay_002dui_005fuser_002ddisplay_0026_005fuserName_005fuserId_005fnobody
                .release();
    }

    public void _jspService(HttpServletRequest request, HttpServletResponse response)
            throws java.io.IOException, ServletException {

        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        JspWriter _jspx_out = null;
        PageContext _jspx_page_context = null;

        try {
            response.setContentType("text/html");
            pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
            _jspx_page_context = pageContext;
            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();
            _jspx_out = out;

            /**
             * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
             *
             * This library is free software; you can redistribute it and/or modify it under
             * the terms of the GNU Lesser General Public License as published by the Free
             * Software Foundation; either version 2.1 of the License, or (at your option)
             * any later version.
             *
             * This library is distributed in the hope that it will be useful, but WITHOUT
             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
             * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
             * details.
             */

            out.write("\r\n");
            out.write("\r\n");

            /**
             * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
             *
             * This library is free software; you can redistribute it and/or modify it under
             * the terms of the GNU Lesser General Public License as published by the Free
             * Software Foundation; either version 2.1 of the License, or (at your option)
             * any later version.
             *
             * This library is distributed in the hope that it will be useful, but WITHOUT
             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
             * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
             * details.
             */

            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            out.write("\r\n");
            //  portlet:defineObjects
            com.liferay.taglib.portlet.DefineObjectsTag _jspx_th_portlet_005fdefineObjects_005f0 = (com.liferay.taglib.portlet.DefineObjectsTag) _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .get(com.liferay.taglib.portlet.DefineObjectsTag.class);
            _jspx_th_portlet_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
            _jspx_th_portlet_005fdefineObjects_005f0.setParent(null);
            int _jspx_eval_portlet_005fdefineObjects_005f0 = _jspx_th_portlet_005fdefineObjects_005f0.doStartTag();
            if (_jspx_th_portlet_005fdefineObjects_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                        .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
                return;
            }
            _005fjspx_005ftagPool_005fportlet_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_portlet_005fdefineObjects_005f0);
            javax.portlet.ActionRequest actionRequest = null;
            javax.portlet.ActionResponse actionResponse = null;
            javax.portlet.EventRequest eventRequest = null;
            javax.portlet.EventResponse eventResponse = null;
            javax.portlet.PortletConfig portletConfig = null;
            java.lang.String portletName = null;
            javax.portlet.PortletPreferences portletPreferences = null;
            java.util.Map portletPreferencesValues = null;
            javax.portlet.PortletSession portletSession = null;
            java.util.Map portletSessionScope = null;
            javax.portlet.RenderRequest renderRequest = null;
            javax.portlet.RenderResponse renderResponse = null;
            javax.portlet.ResourceRequest resourceRequest = null;
            javax.portlet.ResourceResponse resourceResponse = null;
            actionRequest = (javax.portlet.ActionRequest) _jspx_page_context.findAttribute("actionRequest");
            actionResponse = (javax.portlet.ActionResponse) _jspx_page_context.findAttribute("actionResponse");
            eventRequest = (javax.portlet.EventRequest) _jspx_page_context.findAttribute("eventRequest");
            eventResponse = (javax.portlet.EventResponse) _jspx_page_context.findAttribute("eventResponse");
            portletConfig = (javax.portlet.PortletConfig) _jspx_page_context.findAttribute("portletConfig");
            portletName = (java.lang.String) _jspx_page_context.findAttribute("portletName");
            portletPreferences = (javax.portlet.PortletPreferences) _jspx_page_context
                    .findAttribute("portletPreferences");
            portletPreferencesValues = (java.util.Map) _jspx_page_context.findAttribute("portletPreferencesValues");
            portletSession = (javax.portlet.PortletSession) _jspx_page_context.findAttribute("portletSession");
            portletSessionScope = (java.util.Map) _jspx_page_context.findAttribute("portletSessionScope");
            renderRequest = (javax.portlet.RenderRequest) _jspx_page_context.findAttribute("renderRequest");
            renderResponse = (javax.portlet.RenderResponse) _jspx_page_context.findAttribute("renderResponse");
            resourceRequest = (javax.portlet.ResourceRequest) _jspx_page_context.findAttribute("resourceRequest");
            resourceResponse = (javax.portlet.ResourceResponse) _jspx_page_context
                    .findAttribute("resourceResponse");
            out.write("\r\n");
            out.write("\r\n");
            //  liferay-theme:defineObjects
            com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 = (com.liferay.taglib.theme.DefineObjectsTag) _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                    .get(com.liferay.taglib.theme.DefineObjectsTag.class);
            _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
            _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null);
            int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 = _jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                    .doStartTag();
            if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                    .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                        .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
                return;
            }
            _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
            com.liferay.portal.theme.ThemeDisplay themeDisplay = null;
            com.liferay.portal.model.Company company = null;
            com.liferay.portal.model.Account account = null;
            com.liferay.portal.model.User user = null;
            com.liferay.portal.model.User realUser = null;
            com.liferay.portal.model.Contact contact = null;
            com.liferay.portal.model.Layout layout = null;
            java.util.List layouts = null;
            java.lang.Long plid = null;
            com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null;
            java.lang.Long scopeGroupId = null;
            com.liferay.portal.security.permission.PermissionChecker permissionChecker = null;
            java.util.Locale locale = null;
            java.util.TimeZone timeZone = null;
            com.liferay.portal.model.Theme theme = null;
            com.liferay.portal.model.ColorScheme colorScheme = null;
            com.liferay.portal.theme.PortletDisplay portletDisplay = null;
            java.lang.Long portletGroupId = null;
            themeDisplay = (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay");
            company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company");
            account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account");
            user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user");
            realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser");
            contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact");
            layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout");
            layouts = (java.util.List) _jspx_page_context.findAttribute("layouts");
            plid = (java.lang.Long) _jspx_page_context.findAttribute("plid");
            layoutTypePortlet = (com.liferay.portal.model.LayoutTypePortlet) _jspx_page_context
                    .findAttribute("layoutTypePortlet");
            scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
            permissionChecker = (com.liferay.portal.security.permission.PermissionChecker) _jspx_page_context
                    .findAttribute("permissionChecker");
            locale = (java.util.Locale) _jspx_page_context.findAttribute("locale");
            timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone");
            theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme");
            colorScheme = (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme");
            portletDisplay = (com.liferay.portal.theme.PortletDisplay) _jspx_page_context
                    .findAttribute("portletDisplay");
            portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
            out.write("\r\n");
            out.write("\r\n");

            WindowState windowState = renderRequest.getWindowState();

            String currentURL = PortalUtil.getCurrentURL(request);

            Group group = GroupLocalServiceUtil.getGroup(scopeGroupId);

            Organization organization = null;
            User user2 = null;

            if (group.isOrganization()) {
                organization = OrganizationLocalServiceUtil.getOrganization(group.getClassPK());
            } else if (group.isUser()) {
                user2 = UserLocalServiceUtil.getUserById(group.getClassPK());
            }

            Format dateFormatDate = FastDateFormatFactoryUtil.getDate(locale, timeZone);
            Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);

            NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
            NumberFormat percentFormat = NumberFormat.getPercentInstance(locale);

            out.write("\r\n");
            out.write("\r\n");

            ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);

            User member = (User) row.getObject();

            out.write("\r\n");
            out.write("\r\n");
            //  liferay-ui:user-display
            com.liferay.portal.model.User userDisplay = null;
            com.liferay.taglib.ui.UserDisplayTag _jspx_th_liferay_002dui_005fuser_002ddisplay_005f0 = (com.liferay.taglib.ui.UserDisplayTag) _005fjspx_005ftagPool_005fliferay_002dui_005fuser_002ddisplay_0026_005fuserName_005fuserId_005fnobody
                    .get(com.liferay.taglib.ui.UserDisplayTag.class);
            _jspx_th_liferay_002dui_005fuser_002ddisplay_005f0.setPageContext(_jspx_page_context);
            _jspx_th_liferay_002dui_005fuser_002ddisplay_005f0.setParent(null);
            // /members/user_display.jsp(25,0) name = userId type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_liferay_002dui_005fuser_002ddisplay_005f0.setUserId(member.getUserId());
            // /members/user_display.jsp(25,0) name = userName type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_liferay_002dui_005fuser_002ddisplay_005f0.setUserName(member.getFullName());
            int _jspx_eval_liferay_002dui_005fuser_002ddisplay_005f0 = _jspx_th_liferay_002dui_005fuser_002ddisplay_005f0
                    .doStartTag();
            userDisplay = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("userDisplay");
            if (_jspx_th_liferay_002dui_005fuser_002ddisplay_005f0
                    .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _005fjspx_005ftagPool_005fliferay_002dui_005fuser_002ddisplay_0026_005fuserName_005fuserId_005fnobody
                        .reuse(_jspx_th_liferay_002dui_005fuser_002ddisplay_005f0);
                return;
            }
            userDisplay = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("userDisplay");
            _005fjspx_005ftagPool_005fliferay_002dui_005fuser_002ddisplay_0026_005fuserName_005fuserId_005fnobody
                    .reuse(_jspx_th_liferay_002dui_005fuser_002ddisplay_005f0);
        } catch (Throwable t) {
            if (!(t instanceof SkipPageException)) {
                out = _jspx_out;
                if (out != null && out.getBufferSize() != 0)
                    try {
                        out.clearBuffer();
                    } catch (java.io.IOException e) {
                    }
                if (_jspx_page_context != null)
                    _jspx_page_context.handlePageException(t);
            }
        } finally {
            _jspxFactory.releasePageContext(_jspx_page_context);
        }
    }
}