001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.monitoring.statistics.portal;
016    
017    import com.liferay.portal.kernel.util.StringBundler;
018    import com.liferay.portal.monitoring.MonitorNames;
019    import com.liferay.portal.monitoring.statistics.BaseDataSample;
020    
021    /**
022     * @author Rajesh Thiagarajan
023     * @author Michael C. Han
024     * @author Brian Wing Shun Chan
025     */
026    public class PortalRequestDataSample extends BaseDataSample {
027    
028            public PortalRequestDataSample(
029                    long companyId, String user, String requestURI, String requestURL) {
030    
031                    setCompanyId(companyId);
032                    setUser(user);
033                    setNamespace(MonitorNames.PORTAL);
034                    setName(requestURI);
035                    _requestURL = requestURL;
036            }
037    
038            public String getRequestURL() {
039                    return _requestURL;
040            }
041    
042            @Override
043            public String toString() {
044                    StringBundler sb = new StringBundler(5);
045    
046                    sb.append("{requestURL=");
047                    sb.append(_requestURL);
048                    sb.append(", ");
049                    sb.append(super.toString());
050                    sb.append("}");
051    
052                    return sb.toString();
053            }
054    
055            private String _requestURL;
056    
057    }