public abstract class OMRSAuditLogStoreConnectorBase extends ConnectorBase implements OMRSAuditLogStore
ConnectorBase.ProtectedConnectionconnectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, isActive, securedProperties| Modifier | Constructor and Description |
|---|---|
protected |
OMRSAuditLogStoreConnectorBase()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
OMRSAuditLogRecord |
getAuditLogRecord(String logRecordId)
Retrieve a specific audit log record.
|
List<OMRSAuditLogRecord> |
getAuditLogRecordsByComponent(String component,
Date startDate,
Date endDate,
int offset,
int maximumRecords)
Retrieve a list of log records written by a specific component.
|
List<OMRSAuditLogRecord> |
getAuditLogRecordsBySeverity(String severity,
Date startDate,
Date endDate,
int offset,
int maximumRecords)
Retrieve a list of log records that have specific severity.
|
List<OMRSAuditLogRecord> |
getAuditLogRecordsByTimeStamp(Date startDate,
Date endDate,
int offset,
int maximumRecords)
Retrieve a list of log records written in a specified time period.
|
String |
getDestinationName()
Return the name of this audit log destination.
|
protected String |
getJSONLogRecord(OMRSAuditLogRecord logRecord,
String methodName)
Create JSON version of the log record.
|
List<String> |
getSupportedSeverities()
Return the list of supported severities that this destination is configured to support.
|
void |
initialize(String connectorInstanceId,
ConnectionProperties connectionProperties)
Call made by the ConnectorProvider to initialize the Connector with the base services.
|
protected boolean |
isSupportedSeverity(OMRSAuditLogRecord logRecord)
Should the record be written to this destination?
|
String |
storeLogRecord(AuditLogRecord logRecord)
Store the audit log record in the audit log store.
|
abstract String |
storeLogRecord(OMRSAuditLogRecord logRecord)
Store the audit log record in the audit log store.
|
protected void |
validateLogRecord(OMRSAuditLogRecord logRecord,
String methodName)
Validate that the log record supplied by the OMRS is properly filled out.
|
disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initializeConnectedAssetProperties, isActive, start, toStringprotected OMRSAuditLogStoreConnectorBase()
public String getDestinationName()
getDestinationName in interface OMRSAuditLogStorepublic List<String> getSupportedSeverities()
getSupportedSeverities in interface OMRSAuditLogStorepublic abstract String storeLogRecord(OMRSAuditLogRecord logRecord) throws InvalidParameterException, RepositoryErrorException
storeLogRecord in interface OMRSAuditLogStorelogRecord - log record to storeInvalidParameterException - indicates that the logRecord parameter is invalid.RepositoryErrorException - indicates that the audit log store is not available or has an error.public String storeLogRecord(AuditLogRecord logRecord) throws InvalidParameterException, RepositoryErrorException
logRecord - log record to storeInvalidParameterException - indicates that the logRecord parameter is invalid.RepositoryErrorException - indicates that the audit log store is not available or has an error.public OMRSAuditLogRecord getAuditLogRecord(String logRecordId) throws InvalidParameterException, FunctionNotSupportedException, RepositoryErrorException
getAuditLogRecord in interface OMRSAuditLogStorelogRecordId - unique identifier for the log recordInvalidParameterException - indicates that the logRecordId parameter is invalid.FunctionNotSupportedException - indicates that the audit log store does not support queries.RepositoryErrorException - indicates that the audit log store is not available or has an error.public List<OMRSAuditLogRecord> getAuditLogRecordsByTimeStamp(Date startDate, Date endDate, int offset, int maximumRecords) throws InvalidParameterException, PagingErrorException, FunctionNotSupportedException, RepositoryErrorException
getAuditLogRecordsByTimeStamp in interface OMRSAuditLogStorestartDate - start of time periodendDate - end of time periodoffset - offset of full collection to begin the return resultsmaximumRecords - maximum number of log records to returnInvalidParameterException - indicates that the start and/or end date parameters are invalid.PagingErrorException - indicates that the offset or the maximumRecords parameters are invalid.FunctionNotSupportedException - indicates that the audit log store does not support queries.RepositoryErrorException - indicates that the audit log store is not available or has an error.public List<OMRSAuditLogRecord> getAuditLogRecordsBySeverity(String severity, Date startDate, Date endDate, int offset, int maximumRecords) throws InvalidParameterException, PagingErrorException, FunctionNotSupportedException, RepositoryErrorException
getAuditLogRecordsBySeverity in interface OMRSAuditLogStoreseverity - the severity value of messages to returnstartDate - start of time periodendDate - end of time periodoffset - offset of full collection to begin the return resultsmaximumRecords - maximum number of log records to returnInvalidParameterException - indicates that the severity, start and/or end date parameters are invalid.PagingErrorException - indicates that the offset or the maximumRecords parameters are invalid.FunctionNotSupportedException - indicates that the audit log store does not support queries.RepositoryErrorException - indicates that the audit log store is not available or has an error.public List<OMRSAuditLogRecord> getAuditLogRecordsByComponent(String component, Date startDate, Date endDate, int offset, int maximumRecords) throws InvalidParameterException, PagingErrorException, FunctionNotSupportedException, RepositoryErrorException
getAuditLogRecordsByComponent in interface OMRSAuditLogStorecomponent - name of the component to retrieve events fromstartDate - start of time periodendDate - end of time periodoffset - offset of full collection to begin the return resultsmaximumRecords - maximum number of log records to returnInvalidParameterException - indicates that the component, start and/or end date parameters are invalid.PagingErrorException - indicates that the offset or the maximumRecords parameters are invalid.FunctionNotSupportedException - indicates that the audit log store does not support queries.RepositoryErrorException - indicates that the audit log store is not available or has an error.protected void validateLogRecord(OMRSAuditLogRecord logRecord, String methodName) throws InvalidParameterException
logRecord - supplied by the OMRSmethodName - calling methodInvalidParameterException - the log record is not validprotected boolean isSupportedSeverity(OMRSAuditLogRecord logRecord)
logRecord - record to logprotected String getJSONLogRecord(OMRSAuditLogRecord logRecord, String methodName) throws InvalidParameterException
logRecord - log recordmethodName - calling methodInvalidParameterException - unable to convert the log record.public void initialize(String connectorInstanceId, ConnectionProperties connectionProperties)
initialize in class ConnectorBaseconnectorInstanceId - unique id for the connector instance useful for messages etcconnectionProperties - POJO for the configuration used to create the connector.Copyright © 2018–2020 ODPi. All rights reserved.