1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.stats.impl; |
21 |
|
|
22 |
|
import java.util.Date; |
23 |
|
|
24 |
|
import com.xpn.xwiki.stats.impl.StatsUtil.PeriodType; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@version |
30 |
|
|
|
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 10 |
Complexity Density: 0.77 |
|
31 |
|
public class DocumentStats extends XWikiStats |
32 |
|
{ |
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@version |
37 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
38 |
|
public enum Property |
39 |
|
{ |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
action, |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
uniqueVisitors, |
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
visits |
54 |
|
} |
55 |
|
|
56 |
|
|
57 |
|
@link |
58 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
59 |
0 |
public DocumentStats()... |
60 |
|
{ |
61 |
|
} |
62 |
|
|
63 |
|
|
64 |
|
@param |
65 |
|
@param |
66 |
|
@param |
67 |
|
@param |
68 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
69 |
0 |
public DocumentStats(String docName, String action, Date periodDate, PeriodType periodType)... |
70 |
|
{ |
71 |
0 |
super(periodDate, periodType); |
72 |
|
|
73 |
0 |
setName(docName); |
74 |
0 |
String nb = action + getPeriod(); |
75 |
0 |
setNumber(nb.hashCode()); |
76 |
0 |
setAction(action); |
77 |
|
} |
78 |
|
|
79 |
|
|
80 |
|
@return |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0 |
public String getAction()... |
83 |
|
{ |
84 |
0 |
return getStringValue(Property.action.toString()); |
85 |
|
} |
86 |
|
|
87 |
|
|
88 |
|
@param |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
90 |
0 |
public void setAction(String action)... |
91 |
|
{ |
92 |
0 |
setStringValue(Property.action.toString(), action); |
93 |
|
} |
94 |
|
|
95 |
|
|
96 |
|
@return |
97 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
98 |
0 |
public int getUniqueVisitors()... |
99 |
|
{ |
100 |
0 |
return getIntValue(Property.uniqueVisitors.toString()); |
101 |
|
} |
102 |
|
|
103 |
|
|
104 |
|
@param |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
0 |
public void setUniqueVisitors(int uniqueVisitors)... |
107 |
|
{ |
108 |
0 |
setIntValue(Property.uniqueVisitors.toString(), uniqueVisitors); |
109 |
|
} |
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
114 |
0 |
public void incUniqueVisitors()... |
115 |
|
{ |
116 |
0 |
setIntValue(Property.uniqueVisitors.toString(), getUniqueVisitors() + 1); |
117 |
|
} |
118 |
|
|
119 |
|
|
120 |
|
@return |
121 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
122 |
0 |
public int getVisits()... |
123 |
|
{ |
124 |
0 |
return getIntValue(Property.visits.toString()); |
125 |
|
} |
126 |
|
|
127 |
|
|
128 |
|
@param |
129 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
130 |
0 |
public void setVisits(int visits)... |
131 |
|
{ |
132 |
0 |
setIntValue(Property.visits.toString(), visits); |
133 |
|
} |
134 |
|
|
135 |
|
|
136 |
|
|
137 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
138 |
0 |
public void incVisits()... |
139 |
|
{ |
140 |
0 |
setIntValue(Property.visits.toString(), getVisits() + 1); |
141 |
|
} |
142 |
|
} |