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, 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

    • createAssetInRepository

      public String createAssetInRepository(String userId, String externalSourceGUID, String externalSourceName, String qualifiedName, String name, String resourceName, String versionIdentifier, String resourceDescription, String deployedImplementationType, Map<String,String> additionalProperties, String typeName, Map<String,Object> extendedProperties, InstanceStatus instanceStatus, Date effectiveFrom, Date effectiveTo, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Add a simple asset description to the metadata repository. Null values for requested typename, ownership, zone membership and latest change are filled in with default values.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      qualifiedName - unique name for this asset
      name - the stored name property for the asset
      resourceName - the full name from the resource
      versionIdentifier - the stored versionIdentifier property for the asset
      resourceDescription - the stored description property associated with the asset
      deployedImplementationType - type of technology
      additionalProperties - any arbitrary properties not part of the type system
      typeName - name of the type that is a subtype of asset - or null to create standard type
      extendedProperties - properties from any subtype
      instanceStatus - initial status of the Asset in the metadata repository
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      unique identifier of the new asset
      Throws:
      InvalidParameterException - the bean properties are invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • createAssetWithConnection

      public String createAssetWithConnection(String userId, String externalSourceGUID, String externalSourceName, String assetGUIDParameterName, String assetQualifiedName, String name, String resourceName, String versionIdentifier, String resourceDescription, String deployedImplementationType, Map<String,String> additionalProperties, String assetTypeName, Map<String,Object> extendedProperties, InstanceStatus instanceStatus, boolean anchorEndpointToAsset, Map<String,Object> configurationProperties, String connectorProviderClassName, String networkAddress, String protocol, String encryptionMethod, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Add a simple asset description to the metadata repository. Null values for requested typename, ownership, zone membership and latest change are filled in with default values.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      assetGUIDParameterName - parameter name of the resulting asset's GUID
      assetQualifiedName - unique name for this asset
      name - the stored name property for the asset
      versionIdentifier - the stored versionIdentifier property for the asset
      resourceDescription - the stored description property associated with the asset
      deployedImplementationType - type of technology
      additionalProperties - any arbitrary properties not part of the type system
      assetTypeName - name of the type that is a subtype of asset - or null to create standard type
      extendedProperties - properties from any subtype
      instanceStatus - initial status of the Asset in the metadata repository
      anchorEndpointToAsset - set to true if the network address is unique for the asset and should not be reused. False if this is an endpoint that is relevant for multiple assets.
      configurationProperties - configuration properties for the connection
      connectorProviderClassName - Java class name for the connector provider
      networkAddress - the network address (typically the URL but this depends on the protocol)
      protocol - the name of the protocol to use to connect to the endpoint
      encryptionMethod - encryption method to use when passing data to this endpoint
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      serviceSupportedZones - supported zones for this service
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Returns:
      unique identifier of the new asset
      Throws:
      InvalidParameterException - the bean properties are invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • getAssetWithConnection

      public B getAssetWithConnection(String userId, String assetGUID, String assetGUIDParameterName, String assetTypeName, boolean forLineage, boolean forDuplicateProcessing, List<String> serviceSupportedZones, 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
      serviceSupportedZones - supported zones for this service
      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 - there is a problem retrieving information from the property server(s).
      UserNotAuthorizedException - the requesting user is not authorized to issue this request.