Commits

Mads Falch Udengaard authored bb9f735ba56
SDS-7326: Lav integrations test TreatmentWillDeceasedCleanupITCase og LivingWillDeceasedCleanupITCase
No tags

btr-common/src/main/java/dk/sundhedsdatastyrelsen/livstestamente/conf/Properties.java

Moved
19 19 *
20 20 *
21 21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 27 * SOFTWARE.
28 28 */
29 -package dk.sundhedsdatastyrelsen.livstestamente.util;
29 +package dk.sundhedsdatastyrelsen.livstestamente.conf;
30 30
31 31 import org.apache.log4j.LogManager;
32 32 import org.apache.log4j.Logger;
33 33 import org.springframework.beans.factory.annotation.Value;
34 34 import org.springframework.context.annotation.PropertySource;
35 35 import org.springframework.stereotype.Component;
36 36
37 37 import javax.annotation.PostConstruct;
38 38 import java.time.Duration;
39 39 import java.time.Period;
183 183
184 184 @Value("${deletion.save.deceased}")
185 185 private String deletionSaveDeceased;
186 186
187 187 @Value("${deletion.jobs.batchSize}")
188 188 private int deletionJobsBatchSize;
189 189
190 190 @Value("${personinformation.error.tolerance:0}")
191 191 private int personInformationErrorTolerance;
192 192
193 + @Value("${desired.execution.duration}")
194 + private String desiredExecutionDuration;
195 +
193 196 @PostConstruct
194 197 private void init() {
195 198 try {
196 199 btrOpenDate = ZonedDateTime.parse(btrOpenDateString);
197 200 logger.info("BTR open date set to: " + getBtrOpenDate().format(DateTimeFormatter.ISO_DATE_TIME));
198 201 } catch (DateTimeParseException e) {
199 202 logger.warn("The date in the property 'btr.open-date' could not be parsed. BTR registrations can be created.");
200 203 }
201 204
202 205 logger.info(toString());
243 246 ", idcardSubjectName=" + getIdcardSubjectName() +
244 247 ", idcardSystemName=" + getIdcardSystemName() +
245 248 ", stsEndpoint=" + getStsEndpoint() +
246 249 ", stsTestMode=" + getStsTestMode() +
247 250 ", stsKeystore=" + getStsKeystore() +
248 251 ", stsKeystorePassword=" + getStsKeystorePassword() +
249 252 ", minLogReadActivityTextWithOnlyForcedTreatmentBTR=" + getMinLogReadActivityTextWithOnlyForcedTreatmentBTR() +
250 253 ", jobsDeleteMaxDuration=" + getJobsDeleteMaxDuration() +
251 254 ", DeletionJobsBatchSize=" + getDeletionJobsBatchSize() +
252 255 ", personInformationErrorTolerance=" + getPersonInformationErrorTolerance() +
256 + ", desiredExecutionDuration=" + desiredExecutionDuration +
253 257 '}';
254 258 }
255 259
256 260 public String getDataSourceLtrJNDIName() {
257 261 return dataSourceLtrJNDIName;
258 262 }
259 263
260 264 public String getDataSourceBtrJNDIName() {
261 265 return dataSourceBtrJNDIName;
262 266 }
417 421
418 422 public Period getDeceasedPeriod() {
419 423 return Period.parse(deletionSaveDeceased);
420 424 }
421 425
422 426 public int getDeletionJobsBatchSize() { return deletionJobsBatchSize; }
423 427
424 428 public int getPersonInformationErrorTolerance() {
425 429 return personInformationErrorTolerance;
426 430 }
431 +
432 + public Duration desiredExecutionDuration() {
433 + return Duration.parse(desiredExecutionDuration);
434 + }
427 435 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut