RED-10071 - Create system-managed entities automatically
- remove commented code
This commit is contained in:
parent
a65e9e1086
commit
ffca299cb4
@ -23,24 +23,18 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SystemManagedTypesImport {
|
public class SystemManagedTypesImport {
|
||||||
|
|
||||||
@Value("${application.type}")
|
|
||||||
private String applicationType;
|
|
||||||
private final ObjectMapper objectMapper = ObjectMapperFactory.create();
|
private final ObjectMapper objectMapper = ObjectMapperFactory.create();
|
||||||
private List<Type> rmSystemManagedTypeList = new ArrayList<>();
|
private List<Type> rmSystemManagedTypeList = new ArrayList<>();
|
||||||
// List<Type> dmSystemManagedTypeList = new ArrayList<>();
|
|
||||||
|
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
|
|
||||||
Resource redactManagerResource = new ClassPathResource("files/systemtypes/rm/systemTypes.json");
|
Resource redactManagerResource = new ClassPathResource("files/systemtypes/rm/systemTypes.json");
|
||||||
// Resource docuMineResource = new ClassPathResource("files/systemtypes/dm/systemTypes.json");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
rmSystemManagedTypeList = objectMapper.readValue(redactManagerResource.getContentAsByteArray(), new TypeReference<>() {
|
rmSystemManagedTypeList = objectMapper.readValue(redactManagerResource.getContentAsByteArray(), new TypeReference<>() {
|
||||||
});
|
});
|
||||||
// dmSystemManagedTypeList = objectMapper.readValue(docuMineResource.getContentAsByteArray(), new TypeReference<>() {
|
|
||||||
// });
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.info("Could not read the system managed types for dossier templates error: {}", e.getMessage());
|
log.info("Could not read the system managed types for dossier templates error: {}", e.getMessage());
|
||||||
@ -50,9 +44,6 @@ public class SystemManagedTypesImport {
|
|||||||
|
|
||||||
public List<Type> getSystemManagedTypeList() {
|
public List<Type> getSystemManagedTypeList() {
|
||||||
|
|
||||||
// if (applicationType.equals("DocuMine")) {
|
|
||||||
// return dmSystemManagedTypeList;
|
|
||||||
// }
|
|
||||||
return this.rmSystemManagedTypeList;
|
return this.rmSystemManagedTypeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user