Commit 3ea95ef9 authored by Artem Dobrynin (EPAM)'s avatar Artem Dobrynin (EPAM)
Browse files

GONRG-1547: Audit. Implement some audit events for Schema [publish]

https://jiraeu.epam.com/browse/GONRG-1547

* Added audit logger
* Added logging events in the `SchemaService`
parent c8d0df67
......@@ -37,6 +37,7 @@ import org.opengroup.osdu.schema.service.ISchemaService;
import org.opengroup.osdu.schema.service.ISourceService;
import org.opengroup.osdu.schema.util.SchemaResolver;
import org.opengroup.osdu.schema.util.SchemaUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
......@@ -67,13 +68,18 @@ public class SchemaService implements ISchemaService {
private final SchemaUtil schemaUtil;
private final SchemaResolver schemaResolver;
private SchemaResolver schemaResolver;
@Value("${shared.tenant.name:common}")
private String sharedTenant;
final JaxRsDpsLog log;
@Autowired
public void setSchemaResolver(SchemaResolver schemaResolver) {
this.schemaResolver = schemaResolver;
}
final DpsHeaders headers;
/**
......
......@@ -95,7 +95,8 @@ public class SchemaServiceTest {
@Before
public void setUp() {
ReflectionTestUtils.setField(schemaService, "sharedTenant", "common");
schemaService.setSchemaResolver(schemaResolver);
ReflectionTestUtils.setField(schemaService, "sharedTenant", "common");
}
@Test
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment