RED-10071 - Create system-managed entities automatically

- remove commented code
This commit is contained in:
corinaolariu 2024-10-15 10:56:53 +03:00
parent a65e9e1086
commit ffca299cb4

View File

@ -23,24 +23,18 @@ import lombok.extern.slf4j.Slf4j;
@RequiredArgsConstructor
public class SystemManagedTypesImport {
@Value("${application.type}")
private String applicationType;
private final ObjectMapper objectMapper = ObjectMapperFactory.create();
private List<Type> rmSystemManagedTypeList = new ArrayList<>();
// List<Type> dmSystemManagedTypeList = new ArrayList<>();
@PostConstruct
public void init() {
Resource redactManagerResource = new ClassPathResource("files/systemtypes/rm/systemTypes.json");
// Resource docuMineResource = new ClassPathResource("files/systemtypes/dm/systemTypes.json");
try {
rmSystemManagedTypeList = objectMapper.readValue(redactManagerResource.getContentAsByteArray(), new TypeReference<>() {
});
// dmSystemManagedTypeList = objectMapper.readValue(docuMineResource.getContentAsByteArray(), new TypeReference<>() {
// });
} catch (IOException e) {
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() {
// if (applicationType.equals("DocuMine")) {
// return dmSystemManagedTypeList;
// }
return this.rmSystemManagedTypeList;
}