Class AssetAnalysisClient
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.discovery.DiscoveryEngine
-
- org.odpi.openmetadata.engineservices.assetanalysis.client.AssetAnalysisClient
-
- All Implemented Interfaces:
AssetAnalysisAPI
public class AssetAnalysisClient extends DiscoveryEngine implements AssetAnalysisAPI
AssetAnalysisClient is a client-side library for calling a specific discovery engine with an engine host server.
-
-
Constructor Summary
Constructors Constructor Description AssetAnalysisClient(String serverPlatformRootURL, String serverName, String discoveryEngineName)Create a client-side object for calling a discovery engine.AssetAnalysisClient(String serverPlatformRootURL, String serverName, String discoveryEngineName, String userId, String password)Create a client-side object for calling a discovery engine.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdiscoverAsset(String userId, String assetGUID, String discoveryRequestType)Request the execution of a discovery service to explore a specific asset.StringdiscoverAsset(String userId, String assetGUID, String discoveryRequestType, Map<String,String> analysisParameters)Request the execution of a discovery service to explore a specific asset.StringdiscoverAsset(String userId, String assetGUID, String discoveryRequestType, Map<String,String> analysisParameters, List<String> annotationTypes)Request the execution of a discovery service to explore a specific asset.AnnotationgetAnnotation(String userId, String annotationGUID)Retrieve a single annotation by unique identifier.DiscoveryAnalysisReportgetDiscoveryReport(String userId, String discoveryRequestGUID)Request the discovery report for a discovery request that has completed.List<Annotation>getDiscoveryReportAnnotations(String userId, String discoveryRequestGUID, int startingFrom, int maximumResults)Return the annotations linked direction to the report.DiscoveryRequestStatusgetDiscoveryStatus(String userId, String discoveryRequestGUID)Request the status of an executing discovery request.List<Annotation>getExtendedAnnotations(String userId, String annotationGUID, int startingFrom, int maximumResults)Return any annotations attached to this annotation.voidscanAllAssets(String userId, String discoveryRequestType, Map<String,String> analysisParameters, List<String> annotationTypes)Explore each of the assets in the asset store.ConnectorReportvalidateConnector(String userId, String connectorProviderClassName)Validate the connector and return its connector type.
-
-
-
Constructor Detail
-
AssetAnalysisClient
public AssetAnalysisClient(String serverPlatformRootURL, String serverName, String discoveryEngineName) throws InvalidParameterException
Create a client-side object for calling a discovery engine.- Parameters:
serverPlatformRootURL- the root url of the platform where the discovery engine is running.serverName- the name of the engine host server where the discovery engine is runningdiscoveryEngineName- the unique name of the discovery engine.- Throws:
InvalidParameterException- one of the parameters is null or invalid.
-
AssetAnalysisClient
public AssetAnalysisClient(String serverPlatformRootURL, String serverName, String discoveryEngineName, String userId, String password) throws InvalidParameterException
Create a client-side object for calling a discovery engine.- Parameters:
serverPlatformRootURL- the root url of the platform where the discovery engine is running.serverName- the name of the engine host server where the discovery engine is runningdiscoveryEngineName- the unique name of the discovery engine.userId- user id for the HTTP requestpassword- password for the HTTP request- Throws:
InvalidParameterException- one of the parameters is null or invalid.
-
-
Method Detail
-
validateConnector
public ConnectorReport validateConnector(String userId, String connectorProviderClassName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Validate the connector and return its connector type.- Specified by:
validateConnectorin interfaceAssetAnalysisAPI- Parameters:
userId- calling userconnectorProviderClassName- name of a specific connector or null for all connectors- Returns:
- connector report for this connector
- Throws:
InvalidParameterException- the connector provider class name is not a valid connector fo this serviceUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- there was a problem detected by the integration service
-
discoverAsset
public String discoverAsset(String userId, String assetGUID, String discoveryRequestType) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Request the execution of a discovery service to explore a specific asset.- Specified by:
discoverAssetin classDiscoveryEngine- Parameters:
userId- identifier of calling userassetGUID- identifier of the asset to analyze.discoveryRequestType- identifier of the type of analysis - this determines which discovery service to run.- Returns:
- unique id for the discovery request.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
discoverAsset
public String discoverAsset(String userId, String assetGUID, String discoveryRequestType, Map<String,String> analysisParameters) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Request the execution of a discovery service to explore a specific asset.- Specified by:
discoverAssetin classDiscoveryEngine- Parameters:
userId- identifier of calling userassetGUID- identifier of the asset to analyze.discoveryRequestType- identifier of the type of analysis - this determines which discovery service to run.analysisParameters- name value properties to control the analysis- Returns:
- unique id for the discovery request.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
discoverAsset
public String discoverAsset(String userId, String assetGUID, String discoveryRequestType, Map<String,String> analysisParameters, List<String> annotationTypes) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Request the execution of a discovery service to explore a specific asset.- Specified by:
discoverAssetin classDiscoveryEngine- Parameters:
userId- identifier of calling userassetGUID- identifier of the asset to analyze.discoveryRequestType- identifier of the type of analysis - this determines which discovery service to run.analysisParameters- name value properties to control the analysisannotationTypes- list of the types of annotations to produce (and no others)- Returns:
- unique id for the discovery request.
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
scanAllAssets
public void scanAllAssets(String userId, String discoveryRequestType, Map<String,String> analysisParameters, List<String> annotationTypes) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Explore each of the assets in the asset store. A new instance of the discovery service is started for each retrieved asset.- Specified by:
scanAllAssetsin classDiscoveryEngine- Parameters:
userId- identifier of calling userdiscoveryRequestType- identifier of the type of analysis - this determines which discovery service to run.analysisParameters- name value properties to control the analysisannotationTypes- list of the types of annotations to produce (and no others)- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
getDiscoveryStatus
public DiscoveryRequestStatus getDiscoveryStatus(String userId, String discoveryRequestGUID) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Request the status of an executing discovery request.- Specified by:
getDiscoveryStatusin classDiscoveryEngine- Parameters:
userId- identifier of calling userdiscoveryRequestGUID- identifier of the discovery request.- Returns:
- status enum
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
getDiscoveryReport
public DiscoveryAnalysisReport getDiscoveryReport(String userId, String discoveryRequestGUID) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Request the discovery report for a discovery request that has completed.- Specified by:
getDiscoveryReportin classDiscoveryEngine- Parameters:
userId- identifier of calling userdiscoveryRequestGUID- identifier of the discovery request.- Returns:
- discovery report
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
getDiscoveryReportAnnotations
public List<Annotation> getDiscoveryReportAnnotations(String userId, String discoveryRequestGUID, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Return the annotations linked direction to the report.- Specified by:
getDiscoveryReportAnnotationsin classDiscoveryEngine- Parameters:
userId- identifier of calling userdiscoveryRequestGUID- identifier of the discovery request.startingFrom- initial position in the stored list.maximumResults- maximum number of definitions to return on this call.- Returns:
- list of annotations
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
getExtendedAnnotations
public List<Annotation> getExtendedAnnotations(String userId, String annotationGUID, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Return any annotations attached to this annotation.- Specified by:
getExtendedAnnotationsin classDiscoveryEngine- Parameters:
userId- identifier of calling userannotationGUID- anchor annotationstartingFrom- starting position in the listmaximumResults- maximum number of annotations that can be returned.- Returns:
- list of Annotation objects
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
getAnnotation
public Annotation getAnnotation(String userId, String annotationGUID) throws InvalidParameterException, UserNotAuthorizedException, DiscoveryEngineException
Retrieve a single annotation by unique identifier. This call is typically used to retrieve the latest values for an annotation.- Specified by:
getAnnotationin classDiscoveryEngine- Parameters:
userId- identifier of calling userannotationGUID- unique identifier of the annotation- Returns:
- Annotation object
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.DiscoveryEngineException- there was a problem detected by the discovery engine.
-
-