Class AuditableDiscoveryService
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.Connector
-
- org.odpi.openmetadata.frameworks.connectors.ConnectorBase
-
- org.odpi.openmetadata.frameworks.discovery.DiscoveryService
-
- org.odpi.openmetadata.adapters.connectors.discoveryservices.AuditableDiscoveryService
-
- All Implemented Interfaces:
AuditLoggingComponent
- Direct Known Subclasses:
CSVDiscoveryService,DuplicateSuspectDiscoveryService
public abstract class AuditableDiscoveryService extends DiscoveryService implements AuditLoggingComponent
AuditableDiscoveryService is a base class for discovery services that wish to use the audit log.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.frameworks.discovery.DiscoveryService
auditLog, discoveryContext, discoveryServiceName
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, securedProperties
-
-
Constructor Summary
Constructors Constructor Description AuditableDiscoveryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetAssetTypeName(AssetUniverse asset, String methodName)Return the type name for the asset.protected List<String>getNetworkAddresses(AssetUniverse asset)Return the network address of this asset.protected voidlogNoAsset(String assetGUID, String methodName)Log that no asset has been returned to the discovery service.protected voidlogWrongTypeOfAsset(String assetGUID, String assetType, String supportedAssetType, String methodName)Log that the discovery service can not process the type of asset it has been passed.voidsetAuditLog(AuditLog auditLog)Receive an audit log object that can be used to record audit log messages.-
Methods inherited from class org.odpi.openmetadata.frameworks.discovery.DiscoveryService
disconnect, getDiscoveryContext, getEmbeddedDiscoveryServices, handleUnexpectedException, setDiscoveryContext, setDiscoveryServiceName, start
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, isActive, toString
-
-
-
-
Method Detail
-
setAuditLog
public void setAuditLog(AuditLog auditLog)
Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.- Specified by:
setAuditLogin interfaceAuditLoggingComponent- Overrides:
setAuditLogin classDiscoveryService- Parameters:
auditLog- audit log object
-
logNoAsset
protected void logNoAsset(String assetGUID, String methodName) throws ConnectorCheckedException
Log that no asset has been returned to the discovery service. It is unable to proceed without this basic information.- Parameters:
assetGUID- the unique identifier of the asset from the discovery contextmethodName- calling method- Throws:
ConnectorCheckedException- resulting exception
-
logWrongTypeOfAsset
protected void logWrongTypeOfAsset(String assetGUID, String assetType, String supportedAssetType, String methodName) throws ConnectorCheckedException
Log that the discovery service can not process the type of asset it has been passed.- Parameters:
assetGUID- identifier of the assetassetType- type of the assetsupportedAssetType- supported asset typesmethodName- calling method- Throws:
ConnectorCheckedException- resulting exception
-
getAssetTypeName
protected String getAssetTypeName(AssetUniverse asset, String methodName) throws ConnectorCheckedException
Return the type name for the asset. An exception is thrown if the type name is not available.- Parameters:
asset- asset universemethodName- calling method- Returns:
- asset's type name
- Throws:
ConnectorCheckedException- resulting exception
-
getNetworkAddresses
protected List<String> getNetworkAddresses(AssetUniverse asset)
Return the network address of this asset.- Parameters:
asset- asset to extract address from- Returns:
- the list of network addresses
-
-