Type Parameters:
B - class that represents the asset

public class AssetHandler<B> extends ReferenceableHandler<B>
AssetHandler manages B objects and optionally connections in the property server. It runs server-side in the OMAG Server Platform and retrieves Assets and Connections through the OMRSRepositoryConnector.
  • Constructor Details

    • AssetHandler

      public AssetHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, AuditLog auditLog)
      Construct the handler with information needed to work with B objects.
      Parameters:
      converter - specific converter for this bean class
      beanClass - name of bean class that is represented by the generic class B
      serviceName - name of this service
      serverName - name of the local server
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      localServerUserId - userId for this server
      securityVerifier - open metadata security services verifier
      auditLog - destination for audit log events.
  • Method Details

    • getAssetWithConnection

      public B getAssetWithConnection(String userId, String assetGUID, String assetGUIDParameterName, String assetTypeName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return an asset along with any associated connection.
      Parameters:
      userId - calling user
      assetGUID - unique identifier of the asset
      assetGUIDParameterName - name of parameter supplying assetGUID
      assetTypeName - type name of asset
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      an asset bean (with embedded connection details if available)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      PropertyServerException - a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.