1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * 9 * http://www.apache.org/licenses/LICENSE-2.010 * 11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17packageorg.apache.jetspeed.statistics.impl;
1819import java.sql.Timestamp;
2021/***22 * LogRecord23 * <P>24 * Abstract class that holds the fields of a log entry generated by25 * implementations of the PortalStatistics interface.26 * <P>27 * Some of the fields are common to all types of log entries; those fields are28 * implemented in LogRecord. The fields that are specific to a particular type29 * of log entry need to be implemented in a class that extends LogRecord.30 * 31 * @author <a href="mailto:rklein@bluesunrise.com">Richard D. Klein </a>32 * @version $Id: LogRecord.java 188420 2005-03-23 22:25:50Z rdk $33 */34publicabstractclassLogRecord35 {
3637publicstaticfinal String TYPE_PORTLET = "PORTLET";
3839publicstaticfinal String TYPE_PAGE = "PAGE";
4041publicstaticfinal String TYPE_USER = "USER";
4243protected String ipAddress = null;
4445protected String logType = null;
4647protectedlong msElapsedTime = 0;
4849protectedint status = 0;
5051protected Timestamp timeStamp = null;
5253protected String userName = null;
5455publicLogRecord(String logType)
56 {
57this.logType = logType;
58 }
5960/***61 * @return Returns the ipAddress.62 */63public String getIpAddress()
64 {
65return ipAddress;
66 }
6768/***69 * @param ipAddress70 * The ipAddress to set.71 */72publicvoid setIpAddress(String ipAddress)
73 {
74this.ipAddress = ipAddress;
75 }
7677/***78 * @return Returns the logType.79 */80public String getLogType()
81 {
82return logType;
83 }
8485/***86 * @param logType87 * The logType to set.88 */89publicvoid setLogType(String logType)
90 {
91this.logType = logType;
92 }
9394/***95 * @return Returns the msElapsedTime.96 */97publiclong getMsElapsedTime()
98 {
99return msElapsedTime;
100 }
101102/***103 * @param msElapsedTime104 * The msElapsedTime to set.105 */106publicvoid setMsElapsedTime(long msElapsedTime)
107 {
108this.msElapsedTime = msElapsedTime;
109 }
110111/***112 * @return Returns the status.113 */114publicint getStatus()
115 {
116return status;
117 }
118119/***120 * @param status121 * The status to set.122 */123publicvoid setStatus(int status)
124 {
125this.status = status;
126 }
127128/***129 * @return Returns the timeStamp.130 */131public Timestamp getTimeStamp()
132 {
133return timeStamp;
134 }
135136/***137 * @param timeStamp138 * The timeStamp to set.139 */140publicvoid setTimeStamp(Timestamp timeStamp)
141 {
142this.timeStamp = timeStamp;
143 }
144145/***146 * @return Returns the userName.147 */148public String getUserName()
149 {
150return userName;
151 }
152153/***154 * @param userName155 * The userName to set.156 */157publicvoid setUserName(String userName)
158 {
159this.userName = userName;
160 }
161 }