Class OMRSAuditLogStoreConnectorBase
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.repositoryservices.connectors.stores.auditlogstore.OMRSAuditLogStoreConnectorBase
- All Implemented Interfaces:
org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension,org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension,OMRSAuditLogStore
public abstract class OMRSAuditLogStoreConnectorBase
extends org.odpi.openmetadata.frameworks.connectors.ConnectorBase
implements OMRSAuditLogStore
OMRSAuditLogStoreConnectorBase is the base class for connectors that support the OMRSAuditLog.
It has implementations of the query methods that throw "function not supported". This means that
log destinations that do not support queries can ignore these methods.
It also supports the start and stop method for the connector which only need to be
overridden if the connector has work to do at these times
-
Method Summary
Modifier and TypeMethodDescriptiongetAuditLogRecord(String logRecordId) Retrieve a specific audit log record.getAuditLogRecordsByComponent(String component, Date startDate, Date endDate, int offset, int maximumRecords) Retrieve a list of log records written by a specific component.getAuditLogRecordsBySeverity(String severity, Date startDate, Date endDate, int offset, int maximumRecords) Retrieve a list of log records that have specific severity.getAuditLogRecordsByTimeStamp(Date startDate, Date endDate, int offset, int maximumRecords) Retrieve a list of log records written in a specified time period.Return the name of this audit log destination.Return the list of supported severities that this destination is configured to support.voidinitialize(String connectorInstanceId, org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties connectionProperties) Call made by the ConnectorProvider to initialize the Connector with the base services.storeLogRecord(org.odpi.openmetadata.frameworks.auditlog.AuditLogRecord logRecord) Store the audit log record in the audit log store.abstract StringstoreLogRecord(OMRSAuditLogRecord logRecord) Store the audit log record in the audit log store.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
disconnect, equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, start, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Method Details
-
getDestinationName
Return the name of this audit log destination.- Specified by:
getDestinationNamein interfaceOMRSAuditLogStore- Returns:
- string display name suitable for messages.
-
getSupportedSeverities
Return the list of supported severities that this destination is configured to support.- Specified by:
getSupportedSeveritiesin interfaceOMRSAuditLogStore- Returns:
- list of severity names (see OMRSAuditLogRecordSeverity)
-
storeLogRecord
public abstract String storeLogRecord(OMRSAuditLogRecord logRecord) throws InvalidParameterException, RepositoryErrorException Store the audit log record in the audit log store.- Specified by:
storeLogRecordin interfaceOMRSAuditLogStore- Parameters:
logRecord- log record to store- Returns:
- unique identifier assigned to the log record
- Throws:
InvalidParameterException- indicates that the logRecord parameter is invalid.RepositoryErrorException- indicates that the audit log store is not available or has an error.
-
storeLogRecord
public String storeLogRecord(org.odpi.openmetadata.frameworks.auditlog.AuditLogRecord logRecord) throws InvalidParameterException, RepositoryErrorException Store the audit log record in the audit log store.- Parameters:
logRecord- log record to store- Returns:
- unique identifier assigned to the log record
- Throws:
InvalidParameterException- indicates that the logRecord parameter is invalid.RepositoryErrorException- indicates that the audit log store is not available or has an error.
-
getAuditLogRecord
public OMRSAuditLogRecord getAuditLogRecord(String logRecordId) throws InvalidParameterException, FunctionNotSupportedException, RepositoryErrorException Retrieve a specific audit log record.- Specified by:
getAuditLogRecordin interfaceOMRSAuditLogStore- Parameters:
logRecordId- unique identifier for the log record- Returns:
- requested audit log record
- Throws:
InvalidParameterException- 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.
-
getAuditLogRecordsByTimeStamp
public List<OMRSAuditLogRecord> getAuditLogRecordsByTimeStamp(Date startDate, Date endDate, int offset, int maximumRecords) throws InvalidParameterException, PagingErrorException, FunctionNotSupportedException, RepositoryErrorException Retrieve a list of log records written in a specified time period. The offset and maximumRecords parameters support a paging- Specified by:
getAuditLogRecordsByTimeStampin interfaceOMRSAuditLogStore- Parameters:
startDate- start of time periodendDate- end of time periodoffset- offset of full collection to begin the return resultsmaximumRecords- maximum number of log records to return- Returns:
- list of log records from the specified time period
- Throws:
InvalidParameterException- 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.
-
getAuditLogRecordsBySeverity
public List<OMRSAuditLogRecord> getAuditLogRecordsBySeverity(String severity, Date startDate, Date endDate, int offset, int maximumRecords) throws InvalidParameterException, PagingErrorException, FunctionNotSupportedException, RepositoryErrorException Retrieve a list of log records that have specific severity. The offset and maximumRecords parameters support a paging model.- Specified by:
getAuditLogRecordsBySeverityin interfaceOMRSAuditLogStore- Parameters:
severity- 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 return- Returns:
- list of log records from the specified time period
- Throws:
InvalidParameterException- 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.
-
getAuditLogRecordsByComponent
public List<OMRSAuditLogRecord> getAuditLogRecordsByComponent(String component, Date startDate, Date endDate, int offset, int maximumRecords) throws InvalidParameterException, PagingErrorException, FunctionNotSupportedException, RepositoryErrorException Retrieve a list of log records written by a specific component. The offset and maximumRecords parameters support a paging model.- Specified by:
getAuditLogRecordsByComponentin interfaceOMRSAuditLogStore- Parameters:
component- 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 return- Returns:
- list of log records from the specified time period
- Throws:
InvalidParameterException- 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.
-
initialize
public void initialize(String connectorInstanceId, org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties connectionProperties) Call made by the ConnectorProvider to initialize the Connector with the base services.- Overrides:
initializein classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Parameters:
connectorInstanceId- unique id for the connector instance useful for messages etcconnectionProperties- POJO for the configuration used to create the connector.
-