1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
package info.magnolia.module.googlesitemap; |
35 |
|
|
36 |
|
import javax.inject.Singleton; |
37 |
|
|
38 |
|
import org.apache.commons.lang3.StringUtils; |
39 |
|
import org.apache.commons.lang3.time.FastDateFormat; |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
@Singleton |
|
|
| 46.7% |
Uncovered Elements: 8 (15) |
Complexity: 7 |
Complexity Density: 1.4 |
|
47 |
|
public class GoogleSiteMapConfiguration { |
48 |
|
|
49 |
|
public static final String WORKSPACE = "googleSitemaps"; |
50 |
|
|
51 |
|
private String dateFormat = "yyyy-MM-dd"; |
52 |
|
private FastDateFormat fastDateFormat; |
53 |
|
|
54 |
|
public static final double DEFAULT_PRIORITY = 0.5; |
55 |
|
public static final String DEFAULT_CHANGE_FREQUENCY = "weekly"; |
56 |
|
private String changeFrequency; |
57 |
|
private Double priority; |
58 |
|
|
59 |
|
|
60 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
61 |
23 |
public GoogleSiteMapConfiguration() {... |
62 |
|
} |
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
67 |
|
public String getDateFormat() {... |
68 |
|
return dateFormat; |
69 |
|
} |
70 |
|
|
71 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
72 |
|
public void setDateFormat(String dateFormat) {... |
73 |
|
this.dateFormat = dateFormat; |
74 |
|
this.fastDateFormat = FastDateFormat.getInstance(this.dateFormat); |
75 |
|
} |
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
80 |
108 |
public FastDateFormat getFastDateFormat() {... |
81 |
108 |
if(this.fastDateFormat == null) { |
82 |
21 |
this.fastDateFormat = FastDateFormat.getInstance(getDateFormat()); |
83 |
|
} |
84 |
108 |
return this.fastDateFormat; |
85 |
|
} |
86 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
87 |
0 |
public String getChangeFrequency() {... |
88 |
0 |
return StringUtils.isBlank(changeFrequency) ? DEFAULT_CHANGE_FREQUENCY : changeFrequency; |
89 |
|
} |
90 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
91 |
|
public void setChangeFrequency(String changeFrequency) {... |
92 |
|
this.changeFrequency = changeFrequency; |
93 |
|
} |
94 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
95 |
0 |
public Double getPriority() {... |
96 |
0 |
return priority == null ? DEFAULT_PRIORITY : priority; |
97 |
|
} |
98 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
99 |
|
public void setPriority(Double priority) {... |
100 |
|
this.priority = priority; |
101 |
|
} |
102 |
|
|
103 |
|
} |