PrefixSuffixProperties.java

1
package fr.sii.ogham.spring.common;
2
3
public class PrefixSuffixProperties {
4
	// @formatter:off
5
	/**
6
	 * You can set the path prefix for resource resolution. The aim is to define
7
	 * only the name of the resource (or a subset) and the system will find it
8
	 * for you. It avoids to explicitly write the whole path and let you change
9
	 * the resource resolution easily.<br /><br />
10
	 * 
11
	 * For example, you have one template located into
12
	 * "/foo/template/createAccount.html" and you have one template located into
13
	 * "/foo/template/resetPassword.html".<br /><br />
14
	 * 
15
	 * So you can set the prefix path to "/foo/template/". You can now reference
16
	 * the templates using only the file name: "createAccount.html" and
17
	 * "resetPassword.html".<br /><br />
18
	 * 
19
	 * Path prefix can be set globally, by template engine, by sending system
20
	 * and by resolver.
21
	 * For FreeMarker template engine, the priority order for
22
	 * email and template loaded from classpath is (from highest priority to lowest):<br /><br />
23
	 * 
24
	 * - (1) `ogham.email.freemarker.classpath.path-prefix`,<br />
25
	 * - (2) `ogham.email.template.classpath.path-prefix`,<br />
26
	 * - (3) `ogham.email.freemarker.path-prefix`,<br />
27
	 * - (4) `ogham.email.template.path-prefix`,<br />
28
	 * - (5) `ogham.template.path-prefix`,<br />
29
	 * - (6) `spring.freemarker.prefix`<br /><br />
30
	 * 
31
	 * For Thymeleaf template engine, the priority order for
32
	 * email and template loaded from classpath is (from highest priority to lowest):<br /><br />
33
	 * 
34
	 * - (1) `ogham.email.thymeleaf.classpath.path-prefix`, <br />
35
	 * - (2) `ogham.email.template.classpath.path-prefix`,<br />
36
	 * - (3) `ogham.email.thymeleaf.path-prefix`,<br />
37
	 * - (4) `ogham.email.template.path-prefix`,<br />
38
	 * - (5) `ogham.template.path-prefix`,<br />
39
	 * - (6) `spring.thymeleaf.prefix`<br />
40
	 */
41
	// @formatter:on
42
	private String pathPrefix;
43
44
	// @formatter:off
45
	/**
46
	 * You can set the path suffix for resource resolution. The aim is to define
47
	 * only the name of the resource (or a subset) and the system will find it
48
	 * for you. It avoids to explicitly write the whole path and let you change
49
	 * the resource resolution easily.<br /><br />
50
	 * 
51
	 * For example, you have one template located into "createAccount.html" and
52
	 * you have one template located into "resetPassword.html".<br /><br />
53
	 * 
54
	 * So you can set the suffix path to ".html". You can now reference the
55
	 * templates using the file name: "createAccount" and "resetPassword".<br /><br />
56
	 * 
57
	 * Path suffix can be set globally, by template engine, by sending system
58
	 * and by resolver.
59
	 * For FreeMarker template engine, the priority order for
60
	 * email and template loaded from classpath is (from highest priority to lowest):<br /><br />
61
	 * 
62
	 * (1) `ogham.email.freemarker.classpath.path-suffix`, <br />
63
	 * (2) `ogham.email.template.classpath.path-suffix`,<br />
64
	 * (3) `ogham.email.freemarker.path-suffix`,<br />
65
	 * (4) `ogham.email.template.path-suffix`,<br />
66
	 * (5) `ogham.template.path-suffix`,<br />
67
	 * (6) `spring.freemarker.suffix`<br />
68
	 * 
69
	 * For Thymeleaf template engine, the priority order for
70
	 * email and template loaded from classpath is (from highest priority to lowest):<br /><br />
71
	 * 
72
	 * (1) `ogham.email.thymeleaf.classpath.path-prefix`, <br />
73
	 * (2) `ogham.email.template.classpath.path-prefix`,<br />
74
	 * (3) `ogham.email.thymeleaf.path-prefix`,<br />
75
	 * (4) `ogham.email.template.path-prefix`,<br />
76
	 * (5) `ogham.template.path-prefix`,<br />
77
	 * (6) `spring.thymeleaf.prefix`<br />
78
	 */
79
	// @formatter:on
80
	private String pathSuffix;
81
82
	public String getPathPrefix() {
83 1 1. getPathPrefix : replaced return value with "" for fr/sii/ogham/spring/common/PrefixSuffixProperties::getPathPrefix → SURVIVED
		return pathPrefix;
84
	}
85
86
	public void setPathPrefix(String pathPrefix) {
87
		this.pathPrefix = pathPrefix;
88
	}
89
90
	public String getPathSuffix() {
91 1 1. getPathSuffix : replaced return value with "" for fr/sii/ogham/spring/common/PrefixSuffixProperties::getPathSuffix → SURVIVED
		return pathSuffix;
92
	}
93
94
	public void setPathSuffix(String pathSuffix) {
95
		this.pathSuffix = pathSuffix;
96
	}
97
98
}

Mutations

83

1.1
Location : getPathPrefix
Killed by : none
replaced return value with "" for fr/sii/ogham/spring/common/PrefixSuffixProperties::getPathPrefix → SURVIVED

91

1.1
Location : getPathSuffix
Killed by : none
replaced return value with "" for fr/sii/ogham/spring/common/PrefixSuffixProperties::getPathSuffix → SURVIVED

Active mutators

Tests examined


Report generated by PIT OGHAM