Class AssetLineageRestServices
java.lang.Object
org.odpi.openmetadata.accessservices.assetlineage.server.AssetLineageRestServices
The AssetLineageRESTServices provides the server-side implementation of the Asset Lineage Open Metadata
Assess Service (OMAS). This interface provides connections to assets and APIs for adding feedback
on the asset.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOutTopicConnection
(String serverName, String userId, String callerId) Return the client side connection object for the Asset Lineage OMAS's out topic.publishAssetContext
(String serverName, String userId, String entityType, String guid) Publish asset context on the Out Topic.publishEntities
(String serverName, String userId, String entityType, FindEntitiesParameters findEntitiesParameters) //TODO: To be renamed to publishLineage() publishLineage interface is used to request lineage related metadata to be sent out on-demand for scenarios such as initial load of metadata or pull based changes.publishEntity
(String serverName, String userId, String entityType, String guid) Find the entity the element with the provided guid and the given type Publish the context for the entity on the AL OMAS out Topic
-
Constructor Details
-
AssetLineageRestServices
public AssetLineageRestServices()Default constructor
-
-
Method Details
-
publishEntities
public GUIDListResponse publishEntities(String serverName, String userId, String entityType, FindEntitiesParameters findEntitiesParameters) //TODO: To be renamed to publishLineage() publishLineage interface is used to request lineage related metadata to be sent out on-demand for scenarios such as initial load of metadata or pull based changes. The method provides non-blocking like, async interface for executing time/resource intensive tasks in background thread (i.e. building lineage context for collection of entities). It is implemented using concurrent processing APIs based onCompletableFuture
How it works: Based on the findEntitiesParameters provided, scans the cohort for the given type and finds list of matching entities. Providing updatedAfter filed in findEntitiesParameters will retrieve only the entities that were changed from that point in time. Once entities are found, it spins up *asynchronous* background task that will build the lineage context and publish respective output as events on the asset-lineage output topic. Note that only single background task can be active at given time (per server instance controlled by `publishLineageTaskActive`). All subsequent requests will result in empty response until the task if finished. At the end lineage sync event is published to notify the external systems sending summary of the work completed.- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userentityType
- the type of the entity to search forfindEntitiesParameters
- filtering used to reduce the scope of the search- Returns:
- a collection of unique identifiers (guids) of the available entities that will produce lineage events. OR empty collection in case there is noting to be processed or the background task is already busy (active).
-
publishEntity
public GUIDListResponse publishEntity(String serverName, String userId, String entityType, String guid) Find the entity the element with the provided guid and the given type Publish the context for the entity on the AL OMAS out Topic- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userentityType
- the type of the entity to search forguid
- the guid of the searched entity- Returns:
- the unique identifier (guid) of the entity that was processed
-
publishAssetContext
public GUIDListResponse publishAssetContext(String serverName, String userId, String entityType, String guid) Publish asset context on the Out Topic. Provides a list with asset context entities' GUIDs.- Parameters:
serverName
- the server nameuserId
- the user identityType
- the entity typeguid
- the GUID of the entity for which the context is published- Returns:
- a list with asset context entities' GUIDs
-
getOutTopicConnection
Return the client side connection object for the Asset Lineage OMAS's out topic.- Parameters:
serverName
- name of the service to route the request to.userId
- identifier of calling user.callerId
- unique identifier of the caller- Returns:
- connection object for the out topic or InvalidParameterException one of the parameters is null or invalid or UserNotAuthorizedException user not authorized to issue this request or PropertyServerException problem retrieving the discovery engine definition.
-