%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.jetspeed.statistics.impl.LogRecord |
|
|
1 | /* |
|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
3 | * contributor license agreements. See the NOTICE file distributed with |
|
4 | * this work for additional information regarding copyright ownership. |
|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
6 | * (the "License"); you may not use this file except in compliance with |
|
7 | * the License. You may obtain a copy of the License at |
|
8 | * |
|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
10 | * |
|
11 | * Unless required by applicable law or agreed to in writing, software |
|
12 | * 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 and |
|
15 | * limitations under the License. |
|
16 | */ |
|
17 | package org.apache.jetspeed.statistics.impl; |
|
18 | ||
19 | import java.sql.Timestamp; |
|
20 | ||
21 | /** |
|
22 | * LogRecord |
|
23 | * <P> |
|
24 | * Abstract class that holds the fields of a log entry generated by |
|
25 | * implementations of the PortalStatistics interface. |
|
26 | * <P> |
|
27 | * Some of the fields are common to all types of log entries; those fields are |
|
28 | * implemented in LogRecord. The fields that are specific to a particular type |
|
29 | * 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 | */ |
|
34 | public abstract class LogRecord |
|
35 | { |
|
36 | ||
37 | public static final String TYPE_PORTLET = "PORTLET"; |
|
38 | ||
39 | public static final String TYPE_PAGE = "PAGE"; |
|
40 | ||
41 | public static final String TYPE_USER = "USER"; |
|
42 | ||
43 | 0 | protected String ipAddress = null; |
44 | ||
45 | 0 | protected String logType = null; |
46 | ||
47 | 0 | protected long msElapsedTime = 0; |
48 | ||
49 | 0 | protected int status = 0; |
50 | ||
51 | 0 | protected Timestamp timeStamp = null; |
52 | ||
53 | 0 | protected String userName = null; |
54 | ||
55 | public LogRecord(String logType) |
|
56 | 0 | { |
57 | 0 | this.logType = logType; |
58 | 0 | } |
59 | ||
60 | /** |
|
61 | * @return Returns the ipAddress. |
|
62 | */ |
|
63 | public String getIpAddress() |
|
64 | { |
|
65 | 0 | return ipAddress; |
66 | } |
|
67 | ||
68 | /** |
|
69 | * @param ipAddress |
|
70 | * The ipAddress to set. |
|
71 | */ |
|
72 | public void setIpAddress(String ipAddress) |
|
73 | { |
|
74 | 0 | this.ipAddress = ipAddress; |
75 | 0 | } |
76 | ||
77 | /** |
|
78 | * @return Returns the logType. |
|
79 | */ |
|
80 | public String getLogType() |
|
81 | { |
|
82 | 0 | return logType; |
83 | } |
|
84 | ||
85 | /** |
|
86 | * @param logType |
|
87 | * The logType to set. |
|
88 | */ |
|
89 | public void setLogType(String logType) |
|
90 | { |
|
91 | 0 | this.logType = logType; |
92 | 0 | } |
93 | ||
94 | /** |
|
95 | * @return Returns the msElapsedTime. |
|
96 | */ |
|
97 | public long getMsElapsedTime() |
|
98 | { |
|
99 | 0 | return msElapsedTime; |
100 | } |
|
101 | ||
102 | /** |
|
103 | * @param msElapsedTime |
|
104 | * The msElapsedTime to set. |
|
105 | */ |
|
106 | public void setMsElapsedTime(long msElapsedTime) |
|
107 | { |
|
108 | 0 | this.msElapsedTime = msElapsedTime; |
109 | 0 | } |
110 | ||
111 | /** |
|
112 | * @return Returns the status. |
|
113 | */ |
|
114 | public int getStatus() |
|
115 | { |
|
116 | 0 | return status; |
117 | } |
|
118 | ||
119 | /** |
|
120 | * @param status |
|
121 | * The status to set. |
|
122 | */ |
|
123 | public void setStatus(int status) |
|
124 | { |
|
125 | 0 | this.status = status; |
126 | 0 | } |
127 | ||
128 | /** |
|
129 | * @return Returns the timeStamp. |
|
130 | */ |
|
131 | public Timestamp getTimeStamp() |
|
132 | { |
|
133 | 0 | return timeStamp; |
134 | } |
|
135 | ||
136 | /** |
|
137 | * @param timeStamp |
|
138 | * The timeStamp to set. |
|
139 | */ |
|
140 | public void setTimeStamp(Timestamp timeStamp) |
|
141 | { |
|
142 | 0 | this.timeStamp = timeStamp; |
143 | 0 | } |
144 | ||
145 | /** |
|
146 | * @return Returns the userName. |
|
147 | */ |
|
148 | public String getUserName() |
|
149 | { |
|
150 | 0 | return userName; |
151 | } |
|
152 | ||
153 | /** |
|
154 | * @param userName |
|
155 | * The userName to set. |
|
156 | */ |
|
157 | public void setUserName(String userName) |
|
158 | { |
|
159 | 0 | this.userName = userName; |
160 | 0 | } |
161 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |