| 1 | package fr.sii.ogham.spring.sms; | |
| 2 | ||
| 3 | import org.springframework.boot.context.properties.NestedConfigurationProperty; | |
| 4 | ||
| 5 | public class EncoderProperties { | |
| 6 | @NestedConfigurationProperty | |
| 7 | private AutoGuessProperties autoGuess = new AutoGuessProperties(); | |
| 8 | /** | |
| 9 | * Set which Cloudhopper Charset should be used if nothing else is | |
| 10 | * configured.<br /> | |
| 11 | * <br /> | |
| 12 | * Default: <i>"GSM"</i> | |
| 13 | */ | |
| 14 | private String defaultCharset; | |
| 15 | @NestedConfigurationProperty | |
| 16 | private Gsm7bitPackedProperties gsm7bitPacked = new Gsm7bitPackedProperties(); | |
| 17 | @NestedConfigurationProperty | |
| 18 | private Gsm8bitProperties gsm8bit = new Gsm8bitProperties(); | |
| 19 | @NestedConfigurationProperty | |
| 20 | private Latin1Properties latin1 = new Latin1Properties(); | |
| 21 | @NestedConfigurationProperty | |
| 22 | private Ucs2Properties ucs2 = new Ucs2Properties(); | |
| 23 | ||
| 24 | public static class AutoGuessProperties { | |
| 25 | /** | |
| 26 | * Enable/disable automatic guessing of message encoding. | |
| 27 | * | |
| 28 | * <p> | |
| 29 | * If enables, it automatically guess the best supported encoding in | |
| 30 | * order to use the minimum octets: | |
| 31 | * <ul> | |
| 32 | * <li>It encodes using GSM 7-bit default alphabet if the message | |
| 33 | * contains only characters defined in the table. Message is packed so | |
| 34 | * the message can have a maximum length of 160 characters. This is | |
| 35 | * enable only if automatic guessing is enabled (using | |
| 36 | * {@link #autoGuess(Boolean)}) and GSM 7-bit is enabled (using | |
| 37 | * {@link #gsm7bitPacked(Integer)}).</li> | |
| 38 | * <li>It encodes using GSM 8-bit data encoding if the message contains | |
| 39 | * only characters that can be encoded on one octet. This is enable only | |
| 40 | * if automatic guessing is enabled (using {@link #autoGuess(Boolean)} | |
| 41 | * and GSM 8-bit is enabled (using {@link #gsm8bit(Integer)}).</li> | |
| 42 | * <li>It encodes using Latin 1 (ISO-8859-1) data encoding if the | |
| 43 | * message contains only characters that can be encoded on one octet. | |
| 44 | * This is enable only if automatic guessing is enabled (using | |
| 45 | * {@link #autoGuess(Boolean)} and GSM 8-bit is enabled (using | |
| 46 | * {@link #latin1(Integer)}).</li> | |
| 47 | * <li>It encodes using UCS-2 encoding if the message contains special | |
| 48 | * characters that can't be encoded on one octet. Each character is | |
| 49 | * encoded on two octets. This is enable only if automatic guessing is | |
| 50 | * enabled (using {@link #autoGuess(Boolean)}) and UCS-2 is enabled | |
| 51 | * (using {@link #ucs2(Integer)}).</li> | |
| 52 | * </ul> | |
| 53 | * | |
| 54 | * Default: <i>true</i> | |
| 55 | */ | |
| 56 | private Boolean enable; | |
| 57 | ||
| 58 | public Boolean getEnable() { | |
| 59 |
3
1. getEnable : replaced Boolean return with True for fr/sii/ogham/spring/sms/EncoderProperties$AutoGuessProperties::getEnable → SURVIVED 2. getEnable : replaced Boolean return with False for fr/sii/ogham/spring/sms/EncoderProperties$AutoGuessProperties::getEnable → KILLED 3. getEnable : replaced Boolean return with False for fr/sii/ogham/spring/sms/EncoderProperties$AutoGuessProperties::getEnable → KILLED |
return enable; |
| 60 | } | |
| 61 | ||
| 62 | public void setEnable(Boolean enable) { | |
| 63 | this.enable = enable; | |
| 64 | } | |
| 65 | ||
| 66 | } | |
| 67 | ||
| 68 | public static class Gsm7bitPackedProperties { | |
| 69 | /** | |
| 70 | * Set priority for encoding text messages using GSM 7-bit encoding. GSM | |
| 71 | * 7-bit encoding and GSM 8-bit encoding use the same character tables. | |
| 72 | * Only 7 bits are necessary to represents characters. In GSM 8-bit | |
| 73 | * encoding a leading 0 is added. However, GSM 7-bit encoding is packed. | |
| 74 | * Every character is "merged" with the next one in order to use more | |
| 75 | * characters for the same number of octets.<br /> | |
| 76 | * <br /> | |
| 77 | * | |
| 78 | * If priority value is 0 or negative, it disables GSM 7-bit | |
| 79 | * encoding.<br /> | |
| 80 | * <br /> | |
| 81 | * | |
| 82 | * It is disabled by default as most services doesn't support it.<br /> | |
| 83 | * <br /> | |
| 84 | * | |
| 85 | * Default: <i>0</i> | |
| 86 | */ | |
| 87 | private Integer priority; | |
| 88 | ||
| 89 | public Integer getPriority() { | |
| 90 |
2
1. getPriority : replaced Integer return value with 0 for fr/sii/ogham/spring/sms/EncoderProperties$Gsm7bitPackedProperties::getPriority → SURVIVED 2. getPriority : replaced Integer return value with 0 for fr/sii/ogham/spring/sms/EncoderProperties$Gsm7bitPackedProperties::getPriority → TIMED_OUT |
return priority; |
| 91 | } | |
| 92 | ||
| 93 | public void setPriority(Integer priority) { | |
| 94 | this.priority = priority; | |
| 95 | } | |
| 96 | } | |
| 97 | ||
| 98 | public static class Gsm8bitProperties { | |
| 99 | /** | |
| 100 | * Set priority for encoding text messages using GSM 8-bit encoding. GSM | |
| 101 | * 7-bit encoding and GSM 8-bit encoding use the same character tables. | |
| 102 | * Only 7 bits are necessary to represents characters. In GSM 8-bit | |
| 103 | * encoding a leading 0 is added.<br /> | |
| 104 | * <br /> | |
| 105 | * | |
| 106 | * If priority value is 0 or negative, it disables GSM 8-bit | |
| 107 | * encoding.<br /> | |
| 108 | * <br /> | |
| 109 | * | |
| 110 | * Default: <i>99000</i> | |
| 111 | * | |
| 112 | */ | |
| 113 | private Integer priority; | |
| 114 | ||
| 115 | public Integer getPriority() { | |
| 116 |
1
1. getPriority : replaced Integer return value with 0 for fr/sii/ogham/spring/sms/EncoderProperties$Gsm8bitProperties::getPriority → SURVIVED |
return priority; |
| 117 | } | |
| 118 | ||
| 119 | public void setPriority(Integer priority) { | |
| 120 | this.priority = priority; | |
| 121 | } | |
| 122 | } | |
| 123 | ||
| 124 | public static class Latin1Properties { | |
| 125 | /** | |
| 126 | * Set priority for encoding text messages using Latin-1 | |
| 127 | * (ISO-8859-1).<br /> | |
| 128 | * <br /> | |
| 129 | * | |
| 130 | * If priority value is 0 or negative, it disables Latin-1 | |
| 131 | * encoding.<br /> | |
| 132 | * <br /> | |
| 133 | * | |
| 134 | * Default: <i>98000</i> | |
| 135 | */ | |
| 136 | private Integer priority; | |
| 137 | ||
| 138 | public Integer getPriority() { | |
| 139 |
1
1. getPriority : replaced Integer return value with 0 for fr/sii/ogham/spring/sms/EncoderProperties$Latin1Properties::getPriority → SURVIVED |
return priority; |
| 140 | } | |
| 141 | ||
| 142 | public void setPriority(Integer priority) { | |
| 143 | this.priority = priority; | |
| 144 | } | |
| 145 | } | |
| 146 | ||
| 147 | public static class Ucs2Properties { | |
| 148 | /** | |
| 149 | * Set priority for encoding text messages using UCS-2. UCS-2 uses two | |
| 150 | * octets per character.<br /> | |
| 151 | * <br /> | |
| 152 | * | |
| 153 | * If priority value is 0 or negative, it disables UCS-2 encoding.<br /> | |
| 154 | * <br /> | |
| 155 | * | |
| 156 | * Default: <i>90000</i> | |
| 157 | * | |
| 158 | */ | |
| 159 | private Integer priority; | |
| 160 | ||
| 161 | public Integer getPriority() { | |
| 162 |
1
1. getPriority : replaced Integer return value with 0 for fr/sii/ogham/spring/sms/EncoderProperties$Ucs2Properties::getPriority → SURVIVED |
return priority; |
| 163 | } | |
| 164 | ||
| 165 | public void setPriority(Integer priority) { | |
| 166 | this.priority = priority; | |
| 167 | } | |
| 168 | } | |
| 169 | ||
| 170 | public AutoGuessProperties getAutoGuess() { | |
| 171 |
2
1. getAutoGuess : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getAutoGuess → KILLED 2. getAutoGuess : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getAutoGuess → KILLED |
return autoGuess; |
| 172 | } | |
| 173 | ||
| 174 | public void setAutoGuess(AutoGuessProperties autoGuess) { | |
| 175 | this.autoGuess = autoGuess; | |
| 176 | } | |
| 177 | ||
| 178 | public String getDefaultCharset() { | |
| 179 |
2
1. getDefaultCharset : replaced return value with "" for fr/sii/ogham/spring/sms/EncoderProperties::getDefaultCharset → SURVIVED 2. getDefaultCharset : replaced return value with "" for fr/sii/ogham/spring/sms/EncoderProperties::getDefaultCharset → TIMED_OUT |
return defaultCharset; |
| 180 | } | |
| 181 | ||
| 182 | public void setDefaultCharset(String defaultCharset) { | |
| 183 | this.defaultCharset = defaultCharset; | |
| 184 | } | |
| 185 | ||
| 186 | public Gsm7bitPackedProperties getGsm7bitPacked() { | |
| 187 |
2
1. getGsm7bitPacked : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getGsm7bitPacked → KILLED 2. getGsm7bitPacked : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getGsm7bitPacked → KILLED |
return gsm7bitPacked; |
| 188 | } | |
| 189 | ||
| 190 | public void setGsm7bitPacked(Gsm7bitPackedProperties gsm7bitPacked) { | |
| 191 | this.gsm7bitPacked = gsm7bitPacked; | |
| 192 | } | |
| 193 | ||
| 194 | public Gsm8bitProperties getGsm8bit() { | |
| 195 |
2
1. getGsm8bit : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getGsm8bit → KILLED 2. getGsm8bit : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getGsm8bit → KILLED |
return gsm8bit; |
| 196 | } | |
| 197 | ||
| 198 | public void setGsm8bitPacked(Gsm8bitProperties gsm8bitPacked) { | |
| 199 | this.gsm8bit = gsm8bitPacked; | |
| 200 | } | |
| 201 | ||
| 202 | public Latin1Properties getLatin1() { | |
| 203 |
2
1. getLatin1 : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getLatin1 → KILLED 2. getLatin1 : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getLatin1 → KILLED |
return latin1; |
| 204 | } | |
| 205 | ||
| 206 | public void setLatin1(Latin1Properties latin1) { | |
| 207 | this.latin1 = latin1; | |
| 208 | } | |
| 209 | ||
| 210 | public Ucs2Properties getUcs2() { | |
| 211 |
2
1. getUcs2 : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getUcs2 → KILLED 2. getUcs2 : replaced return value with null for fr/sii/ogham/spring/sms/EncoderProperties::getUcs2 → KILLED |
return ucs2; |
| 212 | } | |
| 213 | ||
| 214 | public void setUcs2(Ucs2Properties ucs2) { | |
| 215 | this.ucs2 = ucs2; | |
| 216 | } | |
| 217 | } | |
Mutations | ||
| 59 |
1.1 2.2 3.3 |
|
| 90 |
1.1 2.2 |
|
| 116 |
1.1 |
|
| 139 |
1.1 |
|
| 162 |
1.1 |
|
| 171 |
1.1 2.2 |
|
| 179 |
1.1 2.2 |
|
| 187 |
1.1 2.2 |
|
| 195 |
1.1 2.2 |
|
| 203 |
1.1 2.2 |
|
| 211 |
1.1 2.2 |