| 1 | package fr.sii.ogham.spring.template; | |
| 2 | ||
| 3 | import org.springframework.boot.context.properties.ConfigurationProperties; | |
| 4 | import org.springframework.boot.context.properties.NestedConfigurationProperty; | |
| 5 | ||
| 6 | @ConfigurationProperties("ogham.freemarker") | |
| 7 | public class OghamFreemarkerProperties { | |
| 8 | /** | |
| 9 | * Default charset encoding for Freemarker templates | |
| 10 | */ | |
| 11 | private String defaultEncoding; | |
| 12 | @NestedConfigurationProperty | |
| 13 | private SpringBeansProperties springBeans = new SpringBeansProperties(); | |
| 14 | @NestedConfigurationProperty | |
| 15 | private StaticMethodAccess staticMethodAccess = new StaticMethodAccess(); | |
| 16 | ||
| 17 | public String getDefaultEncoding() { | |
| 18 |
2
1. getDefaultEncoding : replaced return value with "" for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getDefaultEncoding → KILLED 2. getDefaultEncoding : replaced return value with "" for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getDefaultEncoding → KILLED |
return defaultEncoding; |
| 19 | } | |
| 20 | ||
| 21 | public void setDefaultEncoding(String defaultEncoding) { | |
| 22 | this.defaultEncoding = defaultEncoding; | |
| 23 | } | |
| 24 | ||
| 25 | public SpringBeansProperties getSpringBeans() { | |
| 26 |
2
1. getSpringBeans : replaced return value with null for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getSpringBeans → KILLED 2. getSpringBeans : replaced return value with null for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getSpringBeans → KILLED |
return springBeans; |
| 27 | } | |
| 28 | ||
| 29 | public void setSpringBeans(SpringBeansProperties springBeans) { | |
| 30 | this.springBeans = springBeans; | |
| 31 | } | |
| 32 | ||
| 33 | public StaticMethodAccess getStaticMethodAccess() { | |
| 34 |
2
1. getStaticMethodAccess : replaced return value with null for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getStaticMethodAccess → KILLED 2. getStaticMethodAccess : replaced return value with null for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getStaticMethodAccess → KILLED |
return staticMethodAccess; |
| 35 | } | |
| 36 | ||
| 37 | public void setStaticMethodAccess(StaticMethodAccess staticMethodAccess) { | |
| 38 | this.staticMethodAccess = staticMethodAccess; | |
| 39 | } | |
| 40 | ||
| 41 | public static class SpringBeansProperties { | |
| 42 | /** | |
| 43 | * Access Spring beans from templates using | |
| 44 | * {@code @beanName.methodName(args)} | |
| 45 | */ | |
| 46 | private boolean enable = true; | |
| 47 | ||
| 48 | public boolean isEnable() { | |
| 49 |
3
1. isEnable : replaced boolean return with true for fr/sii/ogham/spring/template/OghamFreemarkerProperties$SpringBeansProperties::isEnable → SURVIVED 2. isEnable : replaced boolean return with false for fr/sii/ogham/spring/template/OghamFreemarkerProperties$SpringBeansProperties::isEnable → KILLED 3. isEnable : replaced boolean return with false for fr/sii/ogham/spring/template/OghamFreemarkerProperties$SpringBeansProperties::isEnable → KILLED |
return enable; |
| 50 | } | |
| 51 | ||
| 52 | public void setEnable(boolean enable) { | |
| 53 | this.enable = enable; | |
| 54 | } | |
| 55 | } | |
| 56 | ||
| 57 | public static class StaticMethodAccess { | |
| 58 | /** | |
| 59 | * Access static methods from templates using | |
| 60 | * {@code ${statics['full.package.name.ClassName'].method(args)}}<br /> | |
| 61 | * <br /> | |
| 62 | * You can change the name of the variable used to access static methods | |
| 63 | * by setting the property | |
| 64 | * ogham.freemarker.static-method-access.variable-name | |
| 65 | */ | |
| 66 | private boolean enable = true; | |
| 67 | /** | |
| 68 | * Change the name of the variable name used in templates to access | |
| 69 | * static methods | |
| 70 | */ | |
| 71 | private String variableName = "statics"; | |
| 72 | ||
| 73 | public boolean isEnable() { | |
| 74 |
3
1. isEnable : replaced boolean return with false for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::isEnable → SURVIVED 2. isEnable : replaced boolean return with true for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::isEnable → SURVIVED 3. isEnable : replaced boolean return with true for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::isEnable → KILLED |
return enable; |
| 75 | } | |
| 76 | ||
| 77 | public void setEnable(boolean enable) { | |
| 78 | this.enable = enable; | |
| 79 | } | |
| 80 | ||
| 81 | public String getVariableName() { | |
| 82 |
2
1. getVariableName : replaced return value with "" for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::getVariableName → KILLED 2. getVariableName : replaced return value with "" for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::getVariableName → KILLED |
return variableName; |
| 83 | } | |
| 84 | ||
| 85 | public void setVariableName(String variableName) { | |
| 86 | this.variableName = variableName; | |
| 87 | } | |
| 88 | } | |
| 89 | } | |
Mutations | ||
| 18 |
1.1 2.2 |
|
| 26 |
1.1 2.2 |
|
| 34 |
1.1 2.2 |
|
| 49 |
1.1 2.2 3.3 |
|
| 74 |
1.1 2.2 3.3 |
|
| 82 |
1.1 2.2 |