Package com.sodius.oslc.server.audit
Class AuditStore
- java.lang.Object
-
- com.sodius.oslc.server.audit.AuditStore
-
public abstract class AuditStore extends Object
A storage of Audit Events. Products should extend this class to dispatch to existing audit capability of the platform they integrate in, if any.- Since:
- 3.7.0
- See Also:
AuditEvent
-
-
Constructor Summary
Constructors Constructor Description AuditStore()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static AuditStore
getInstance()
Returns the current store instance.static void
setInstance(AuditStore store)
Replaces the current store instance with the given one.abstract void
store(AuditEvent event)
Stores the given audit event.
-
-
-
Method Detail
-
getInstance
public static AuditStore getInstance()
Returns the current store instance. If no instance was set, returns a store that ignores submitted events and does not store any information.- Returns:
- the current instance.
- See Also:
setInstance(AuditStore)
-
setInstance
public static void setInstance(AuditStore store)
Replaces the current store instance with the given one.- Parameters:
store
- the new store.- Throws:
NullPointerException
- if store is null
-
store
public abstract void store(AuditEvent event)
Stores the given audit event.- Parameters:
event
- an audit event to store- Throws:
NullPointerException
- if event is null or one of its required property is empty
-
-