-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathTestService.java
33 lines (27 loc) · 939 Bytes
/
TestService.java
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
// SPDX-FileCopyrightText: the secureCodeBox authors
//
// SPDX-License-Identifier: Apache-2.0
package io.securecodebox.persistence.defectdojo.service;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import io.securecodebox.persistence.defectdojo.config.Config;
import io.securecodebox.persistence.defectdojo.model.PaginatedResult;
import io.securecodebox.persistence.defectdojo.model.Test;
public class TestService extends GenericDefectDojoService<Test> {
public TestService(Config config) {
super(config);
}
@Override
protected String getUrlPath() {
return "tests";
}
@Override
protected Class<Test> getModelClass() {
return Test.class;
}
@Override
protected PaginatedResult<Test> deserializeList(String response) throws JsonProcessingException {
return this.objectMapper.readValue(response, new TypeReference<>() {
});
}
}