Class RelatedAssetHandler<B>


public class RelatedAssetHandler<B> extends OpenMetadataAPIGenericHandler<B>
RelatedAssetHandler 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

    • RelatedAssetHandler

      public RelatedAssetHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, 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
      supportedZones - list of zones that the access service is allowed to serve B instances from.
      defaultZones - list of zones that the access service should set in all new B instances.
      publishZones - list of zones that the access service sets up in published B instances.
      auditLog - destination for audit log events.
  • Method Details

    • getRelatedAssets

      public List<B> getRelatedAssets(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, String relationshipTypeGUID, String relationshipTypeName, String relatedAssetsTypeName, List<String> serviceSupportedZones, int startingEnd, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Return the assets and relationship properties attached to an element by the specified relationship type. If all related assets are required then specify null for the relationship type GUID and name.
      Parameters:
      userId - calling user
      elementGUID - identifier for the asset that the related assets are attached to
      elementGUIDParameterName - parameter passing the elementGUID
      elementTypeName - name of the type of the starting element
      relationshipTypeGUID - unique identifier for relationship type
      relationshipTypeName - unique name for relationship type
      serviceSupportedZones - override the default supported zones
      relatedAssetsTypeName - expected type of asset at the end of the relationship
      startingEnd - which end of the relationship to start at 0=either end; 1=end1 and 2=end 2
      startFrom - starting element (used in paging through large result sets)
      pageSize - maximum number of results to return
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      list of retrieved objects
      Throws:
      InvalidParameterException - the input properties are invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server