Class AssetManagerBaseClient

java.lang.Object
org.odpi.openmetadata.accessservices.assetmanager.client.AssetManagerBaseClient
All Implemented Interfaces:
ExternalIdentifierManagerInterface
Direct Known Subclasses:
CollaborationExchangeClient, ExchangeClientBase, GlossaryExchangeClient

public class AssetManagerBaseClient extends Object implements ExternalIdentifierManagerInterface
AssetManagerBaseClient supports the common properties and functions for the Asset Manager OMAS.
  • Field Details

  • Constructor Details

    • AssetManagerBaseClient

      public AssetManagerBaseClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog, int maxPageSize) throws InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      auditLog - logging destination
      maxPageSize - maximum value allowed for page size
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • AssetManagerBaseClient

      public AssetManagerBaseClient(String serverName, String serverPlatformURLRoot, int maxPageSize) throws InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      maxPageSize - maximum value allowed for page size
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • AssetManagerBaseClient

      public AssetManagerBaseClient(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) throws InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      maxPageSize - maximum value allowed for page size
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • AssetManagerBaseClient

      public AssetManagerBaseClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, int maxPageSize) throws InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      auditLog - logging destination
      maxPageSize - maximum value allowed for page size
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • AssetManagerBaseClient

      public AssetManagerBaseClient(String serverName, String serverPlatformURLRoot, AssetManagerRESTClient restClient, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
      Create a new client that is going to be used in an OMAG Server.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      restClient - client that issues the REST API calls
      maxPageSize - maximum number of results supported by this server
      auditLog - logging destination
      Throws:
      InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
  • Method Details

    • handleMissingScope

      protected void handleMissingScope(String externalIdentifier, String methodName) throws InvalidParameterException
      Throw an exception because the asset manager's GUID has not been passed with an external identifier.
      Parameters:
      externalIdentifier - external identifier
      methodName - calling method
      Throws:
      InvalidParameterException - resulting exception
    • getCorrelationProperties

      protected MetadataCorrelationProperties getCorrelationProperties(String assetManagerGUID, String assetManagerName, String externalIdentifier, String methodName) throws InvalidParameterException
      Set up the correlation properties for update.
      Parameters:
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      externalIdentifier - unique identifier of the glossary in the external asset manager
      methodName - calling method
      Returns:
      filled out correlation properties
      Throws:
      InvalidParameterException - missing external identifier
    • getUpdateRequestBody

      protected UpdateRequestBody getUpdateRequestBody(String assetManagerGUID, String assetManagerName, String externalIdentifier, Date effectiveTime, String methodName) throws InvalidParameterException
      Set up the correlation properties for update.
      Parameters:
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      externalIdentifier - unique identifier of the glossary in the external asset manager
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Returns:
      filled out correlation properties
      Throws:
      InvalidParameterException - missing external identifier
    • getCorrelationProperties

      protected MetadataCorrelationProperties getCorrelationProperties(String assetManagerGUID, String assetManagerName, String externalIdentifier, String externalIdentifierName, String externalIdentifierUsage, String externalIdentifierSource, KeyPattern externalIdentifierKeyPattern, Map<String,String> mappingProperties, String methodName) throws InvalidParameterException
      Set up the correlation properties for request.
      Parameters:
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      externalIdentifier - unique identifier of the element in the external asset manager
      externalIdentifierName - name of property for the external identifier in the external asset manager
      externalIdentifierUsage - optional usage description for the external identifier when calling the external asset manager
      externalIdentifierSource - component that issuing this request.
      externalIdentifierKeyPattern - pattern for the external identifier within the external asset manager (default is LOCAL_KEY)
      mappingProperties - additional properties to help with the mapping of the elements in the external asset manager and open metadata
      methodName - calling method
      Returns:
      filled out correlation properties
      Throws:
      InvalidParameterException - missing external identifier
    • getCorrelationProperties

      protected MetadataCorrelationProperties getCorrelationProperties(String assetManagerGUID, String assetManagerName, ExternalIdentifierProperties externalIdentifierProperties, String methodName) throws InvalidParameterException
      Set up the correlation properties for request.
      Parameters:
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      externalIdentifierProperties - optional properties used to define an external identifier
      methodName - calling method
      Returns:
      filled out correlation properties
      Throws:
      InvalidParameterException - missing external identifier
    • getAssetManagerIdentifiersRequestBody

      protected AssetManagerIdentifiersRequestBody getAssetManagerIdentifiersRequestBody(String assetManagerGUID, String assetManagerName)
      Return the asset manager identifiers packaged in an appropriate request body (or null if assetManagerGUID is null).
      Parameters:
      assetManagerGUID - unique identifier for the asset manager
      assetManagerName - unique name for the asset manager
      Returns:
      request body
    • getEffectiveTimeQueryRequestBody

      protected EffectiveTimeQueryRequestBody getEffectiveTimeQueryRequestBody(String assetManagerGUID, String assetManagerName, Date effectiveTime)
      Return the asset manager identifiers packaged in an appropriate request body.
      Parameters:
      assetManagerGUID - unique identifier for the asset manager
      assetManagerName - unique name for the asset manager
      effectiveTime - the time that the retrieved elements must be effective for
      Returns:
      request body
    • getGlossaryTermRelationshipRequestBody

      protected GlossaryTermRelationshipRequestBody getGlossaryTermRelationshipRequestBody(String assetManagerGUID, String assetManagerName, String relationshipTypeName, List<GlossaryTermRelationshipStatus> limitResultsByStatus, Date effectiveTime)
      Return the asset manager identifiers packaged in an appropriate request body.
      Parameters:
      assetManagerGUID - unique identifier for the asset manager
      assetManagerName - unique name for the asset manager
      relationshipTypeName - optional name of relationship
      limitResultsByStatus - By default, term relationships in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.
      effectiveTime - the time that the retrieved elements must be effective for
      Returns:
      request body
    • getRelationshipRequestBody

      protected RelationshipRequestBody getRelationshipRequestBody(String assetManagerGUID, String assetManagerName, Date effectiveTime, RelationshipProperties relationshipProperties)
      Return the asset manager identifiers packaged with relevant properties in an appropriate request body.
      Parameters:
      assetManagerGUID - unique identifier for the asset manager
      assetManagerName - unique name for the asset manager
      effectiveTime - the time that the retrieved elements must be effective for
      relationshipProperties - relationship properties
      Returns:
      request body
    • getNameRequestBody

      protected NameRequestBody getNameRequestBody(String assetManagerGUID, String assetManagerName, String name, String nameParameterName, Date effectiveTime)
      Return the asset manager identifiers packaged with relevant properties in an appropriate request body.
      Parameters:
      assetManagerGUID - unique identifier for the asset manager
      assetManagerName - unique name for the asset manager
      name - name to search for
      nameParameterName - parameter name
      effectiveTime - the time that the retrieved elements must be effective for
      Returns:
      request body
    • getNameRequestBody

      protected NameRequestBody getNameRequestBody(String assetManagerGUID, String assetManagerName, String name, Date effectiveTime, String methodName) throws InvalidParameterException
      Return the asset manager identifiers packaged with relevant properties in an appropriate request body.
      Parameters:
      assetManagerGUID - unique identifier for the asset manager
      assetManagerName - unique name for the asset manager
      name - name to search for
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Returns:
      request body
      Throws:
      InvalidParameterException - blank name
    • getQualifiedNameRequestBody

      protected NameRequestBody getQualifiedNameRequestBody(String assetManagerGUID, String assetManagerName, String qualifiedName, Date effectiveTime)
      Return the asset manager identifiers packaged with relevant properties in an appropriate request body.
      Parameters:
      assetManagerGUID - unique identifier for the asset manager
      assetManagerName - unique qualifiedName for the asset manager
      qualifiedName - qualifiedName to search for
      effectiveTime - the time that the retrieved elements must be effective for
      Returns:
      request body
    • getSearchStringRequestBody

      protected SearchStringRequestBody getSearchStringRequestBody(String assetManagerGUID, String assetManagerName, String searchString, Date effectiveTime, String methodName) throws InvalidParameterException
      Return the asset manager identifiers packaged with relevant properties in an appropriate request body.
      Parameters:
      assetManagerGUID - unique identifier for the asset manager
      assetManagerName - unique name for the asset manager
      searchString - string to find in the properties
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Returns:
      request body
      Throws:
      InvalidParameterException - blank name
    • addExternalIdentifier

      public void addExternalIdentifier(String userId, String assetManagerGUID, String assetManagerName, String openMetadataElementGUID, String openMetadataElementTypeName, ExternalIdentifierProperties externalIdentifierProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Add a new external identifier to an existing open metadata element.
      Specified by:
      addExternalIdentifier in interface ExternalIdentifierManagerInterface
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      openMetadataElementGUID - unique identifier (GUID) of the element in the open metadata ecosystem
      openMetadataElementTypeName - type name for the open metadata element
      externalIdentifierProperties - optional properties used to define an external identifier
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • updateExternalIdentifier

      public void updateExternalIdentifier(String userId, String assetManagerGUID, String assetManagerName, String openMetadataElementGUID, String openMetadataElementTypeName, ExternalIdentifierProperties externalIdentifierProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the description of a specific external identifier.
      Specified by:
      updateExternalIdentifier in interface ExternalIdentifierManagerInterface
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      openMetadataElementGUID - unique identifier (GUID) of the element in the open metadata ecosystem
      openMetadataElementTypeName - type name for the open metadata element
      externalIdentifierProperties - optional properties used to define an external identifier
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • removeExternalIdentifier

      public void removeExternalIdentifier(String userId, String assetManagerGUID, String assetManagerName, String openMetadataElementGUID, String openMetadataElementTypeName, String externalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove an external identifier from an existing open metadata element. The open metadata element is not affected.
      Specified by:
      removeExternalIdentifier in interface ExternalIdentifierManagerInterface
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      openMetadataElementGUID - unique identifier (GUID) of the element in the open metadata ecosystem
      openMetadataElementTypeName - type name for the open metadata element
      externalIdentifier - unique identifier of this element in the third party asset manager
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • confirmSynchronization

      public void confirmSynchronization(String userId, String assetManagerGUID, String assetManagerName, String openMetadataElementGUID, String openMetadataElementTypeName, String externalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Confirm that the values of a particular metadata element have been synchronized. This is important from an audit point of view, and to allow bidirectional updates of metadata using optimistic locking.
      Specified by:
      confirmSynchronization in interface ExternalIdentifierManagerInterface
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      openMetadataElementGUID - unique identifier (GUID) of this element in open metadata
      openMetadataElementTypeName - type name for the open metadata element
      externalIdentifier - unique identifier of this element in the external asset manager
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • getElementsForExternalIdentifier

      public List<ElementHeader> getElementsForExternalIdentifier(String userId, String assetManagerGUID, String assetManagerName, String externalIdentifier, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the list of headers for open metadata elements that are associated with a particular external identifier.
      Specified by:
      getElementsForExternalIdentifier in interface ExternalIdentifierManagerInterface
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      externalIdentifier - unique identifier of this element in the external asset manager
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of element headers
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - user not authorized to issue this request
      PropertyServerException - problem accessing the property server
    • validateExternalIdentifier

      protected void validateExternalIdentifier(String userId, String assetManagerGUID, String assetManagerName, String openMetadataElementGUID, String openMetadataElementTypeName, String elementExternalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Check that the supplied external identifier matches the element GUID.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      openMetadataElementGUID - element guid used for the lookup
      openMetadataElementTypeName - type name for the open metadata element
      elementExternalIdentifier - external identifier value
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      UserNotAuthorizedException - the user is not authorized to make this request.
      PropertyServerException - the repository is not available or not working properly.
    • getMetadataCorrelationHeaders

      protected List<MetadataCorrelationHeader> getMetadataCorrelationHeaders(String userId, String assetManagerGUID, String assetManagerName, String openMetadataElementGUID, String openMetadataElementTypeName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Assemble the correlation headers attached to the supplied element guid.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      openMetadataElementGUID - unique identifier (GUID) of this element in open metadata
      openMetadataElementTypeName - type name for the open metadata element
      Returns:
      list of correlation headers (note if asset manager identifiers are present, only the matching correlation header is returned)
      Throws:
      InvalidParameterException - one of the parameters is invalid.
      UserNotAuthorizedException - the user is not authorized to make this request.
      PropertyServerException - the repository is not available or not working properly.
    • createReferenceable

      protected String createReferenceable(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, ExternalIdentifierProperties externalIdentifierProperties, ReferenceableProperties properties, String propertiesParameterName, String urlTemplate, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element that does not link to another element on create.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      assetManagerIsHome - ensure that only the asset manager can update this element
      externalIdentifierProperties - optional properties used to define an external identifier
      properties - properties about the element to store
      propertiesParameterName - name of parameter passing the properties
      urlTemplate - URL to call (no expected placeholders)
      methodName - calling method
      Returns:
      unique identifier of the new element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • createReferenceableFromTemplate

      protected String createReferenceableFromTemplate(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String templateGUID, TemplateProperties templateProperties, ExternalIdentifierProperties externalIdentifierProperties, String urlTemplate, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a community using an existing metadata element as a template.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      assetManagerIsHome - ensure that only the asset manager can update this element
      templateGUID - unique identifier of the metadata element to copy
      templateProperties - properties that override the template
      externalIdentifierProperties - optional properties used to define an external identifier
      urlTemplate - URL to call (with placeholders)
      methodName - calling method
      Returns:
      unique identifier of the new community
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • createReferenceableFromTemplate

      protected String createReferenceableFromTemplate(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String templateGUID, TemplateProperties templateProperties, ExternalIdentifierProperties externalIdentifierProperties, String urlTemplate, boolean deepCopy, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a community using an existing metadata element as a template.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      assetManagerIsHome - ensure that only the asset manager can update this element
      templateGUID - unique identifier of the metadata element to copy
      templateProperties - properties that override the template
      externalIdentifierProperties - optional properties used to define an external identifier
      urlTemplate - URL to call (with placeholders)
      deepCopy - should the template creation extend to the anchored elements or just the direct entity?
      methodName - calling method
      Returns:
      unique identifier of the new community
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • createReferenceableFromTemplateWithParent

      protected String createReferenceableFromTemplateWithParent(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String parentGUID, String parentGUIDParameterName, String templateGUID, TemplateProperties templateProperties, ExternalIdentifierProperties externalIdentifierProperties, String urlTemplate, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a community using an existing metadata element as a template.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      assetManagerIsHome - ensure that only the asset manager can update this element
      parentGUID - unique identifier of the parent element
      parentGUIDParameterName - name of parameter passing the parentGUID
      templateGUID - unique identifier of the metadata element to copy
      templateProperties - properties that override the template
      externalIdentifierProperties - optional properties used to define an external identifier
      urlTemplate - URL to call (with placeholders)
      methodName - calling method
      Returns:
      unique identifier of the new community
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • createReferenceableFromTemplateWithParent

      protected String createReferenceableFromTemplateWithParent(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String parentGUID, String parentGUIDParameterName, String templateGUID, TemplateProperties templateProperties, ExternalIdentifierProperties externalIdentifierProperties, boolean deepCopy, String urlTemplate, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a community using an existing metadata element as a template.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      assetManagerIsHome - ensure that only the asset manager can update this element
      parentGUID - unique identifier of the parent element
      parentGUIDParameterName - name of parameter passing the parentGUID
      templateGUID - unique identifier of the metadata element to copy
      templateProperties - properties that override the template
      externalIdentifierProperties - optional properties used to define an external identifier
      urlTemplate - URL to call (with placeholders)
      deepCopy - should the template creation extend to the anchored elements or just the direct entity?
      methodName - calling method
      Returns:
      unique identifier of the new community
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • createFeedbackFromTemplateWithParent

      protected String createFeedbackFromTemplateWithParent(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String parentGUID, String parentGUIDParameterName, boolean isPublic, String templateGUID, TemplateProperties templateProperties, ExternalIdentifierProperties externalIdentifierProperties, boolean deepCopy, String urlTemplate, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a community using an existing metadata element as a template.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      assetManagerIsHome - ensure that only the asset manager can update this element
      parentGUID - unique identifier of the parent element
      parentGUIDParameterName - name of parameter passing the parentGUID
      isPublic - is this element visible to other people.
      templateGUID - unique identifier of the metadata element to copy
      templateProperties - properties that override the template
      externalIdentifierProperties - optional properties used to define an external identifier
      urlTemplate - URL to call (with placeholders)
      deepCopy - should the template creation extend to the anchored elements or just the direct entity?
      methodName - calling method
      Returns:
      unique identifier of the new community
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • createReferenceableWithParent

      protected String createReferenceableWithParent(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String parentGUID, String parentGUIDParameterName, ReferenceableProperties properties, String propertiesParameterName, ExternalIdentifierProperties externalIdentifierProperties, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element that is attached to the parent.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      assetManagerIsHome - ensure that only the asset manager can update this element
      parentGUID - unique identifier of the parent element
      parentGUIDParameterName - name of parameter passing the parentGUID
      properties - properties about the element to store
      propertiesParameterName - name of parameter passing the properties
      externalIdentifierProperties - optional properties used to define an external identifier
      urlTemplate - URL to call (no expected placeholders)
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      unique identifier of the new element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • createFeedbackWithParent

      protected String createFeedbackWithParent(String userId, String assetManagerGUID, String assetManagerName, boolean assetManagerIsHome, String parentGUID, String parentGUIDParameterName, boolean isPublic, ReferenceableProperties properties, String propertiesParameterName, ExternalIdentifierProperties externalIdentifierProperties, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element that is attached to the parent.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      assetManagerIsHome - ensure that only the asset manager can update this element
      parentGUID - unique identifier of the parent element
      parentGUIDParameterName - name of parameter passing the parentGUID
      isPublic - is this element visible to other people.
      properties - properties about the element to store
      propertiesParameterName - name of parameter passing the properties
      externalIdentifierProperties - optional properties used to define an external identifier
      urlTemplate - URL to call (no expected placeholders)
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      unique identifier of the new element
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • updateReferenceable

      protected void updateReferenceable(String userId, String assetManagerGUID, String assetManagerName, String elementGUID, String elementGUIDParameterName, String externalIdentifierName, boolean isMergeUpdate, ReferenceableProperties properties, String propertiesParameterName, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the metadata element. It is possible to use the subtype property classes or set up specialized properties in extended properties.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      elementGUID - unique identifier of the metadata element to update
      elementGUIDParameterName - name of parameter passing the elementGUID
      externalIdentifierName - optional external identifier
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      properties - new properties for the metadata element
      propertiesParameterName - name of parameter passing the properties
      urlTemplate - URL to call (no expected placeholders)
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • updateFeedback

      protected void updateFeedback(String userId, String assetManagerGUID, String assetManagerName, String elementGUID, String elementGUIDParameterName, String externalIdentifierName, boolean isMergeUpdate, boolean isPublic, ReferenceableProperties properties, String propertiesParameterName, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the metadata element. It is possible to use the subtype property classes or set up specialized properties in extended properties.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      elementGUID - unique identifier of the metadata element to update
      elementGUIDParameterName - name of parameter passing the elementGUID
      externalIdentifierName - optional external identifier
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      isPublic - is this element visible to other people.
      properties - new properties for the metadata element
      propertiesParameterName - name of parameter passing the properties
      urlTemplate - URL to call (no expected placeholders)
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • setReferenceableClassification

      protected void setReferenceableClassification(String userId, String assetManagerGUID, String assetManagerName, String elementGUID, String elementGUIDParameter, String externalIdentifierName, ClassificationProperties properties, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Add or update classification on referenceable.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      elementGUID - unique identifier of the metadata element to classify
      elementGUIDParameter - parameter name for elementGUID
      externalIdentifierName - optional name used to define an external identifier
      properties - properties of security at the site
      urlTemplate - URL to call with placeholder for guid
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • removeReferenceableClassification

      protected void removeReferenceableClassification(String userId, String assetManagerGUID, String assetManagerName, String elementGUID, String elementGUIDParameter, String externalIdentifierName, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove classification from the referenceable.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      elementGUID - unique identifier of the metadata element to classify
      elementGUIDParameter - parameter name for elementGUID
      externalIdentifierName - optional name used to define an external identifier
      urlTemplate - URL to call with placeholder for guid
      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
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • setupRelationship

      protected void setupRelationship(String userId, String assetManagerGUID, String assetManagerName, String primaryElementGUID, String primaryElementGUIDParameterName, RelationshipProperties properties, String secondaryElementGUID, String secondaryElementGUIDParameterName, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a relationship between a primary element and a secondary element.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      primaryElementGUID - unique identifier of the primary element
      primaryElementGUIDParameterName - name of parameter passing the primaryElementGUID
      properties - describes the properties for the relationship
      secondaryElementGUID - unique identifier of the element to connect it to
      secondaryElementGUIDParameterName - name of parameter passing the secondaryElementGUID
      urlTemplate - URL to call (no expected placeholders)
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • setupRelationship

      protected void setupRelationship(String userId, String assetManagerGUID, String assetManagerName, String primaryElementGUID, String primaryElementGUIDParameterName, String relationshipTypeName, String relationshipTypeNameParameterName, RelationshipProperties properties, String secondaryElementGUID, String secondaryElementGUIDParameterName, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a relationship between a primary element and a secondary element.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      primaryElementGUID - unique identifier of the primary element
      primaryElementGUIDParameterName - name of parameter passing the primaryElementGUID
      relationshipTypeName - type of relationship to create
      relationshipTypeNameParameterName - name of the parameter passing relationshipTypeName
      properties - describes the properties for the relationship
      secondaryElementGUID - unique identifier of the element to connect it to
      secondaryElementGUIDParameterName - name of parameter passing the secondaryElementGUID
      urlTemplate - URL to call (no expected placeholders)
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • clearRelationship

      protected void clearRelationship(String userId, String assetManagerGUID, String assetManagerName, String primaryElementGUID, String primaryElementGUIDParameterName, String secondaryElementGUID, String secondaryElementGUIDParameterName, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a relationship.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      primaryElementGUID - unique identifier of the primary element
      primaryElementGUIDParameterName - name of parameter passing the primaryElementGUID
      secondaryElementGUID - unique identifier of the element to connect it to
      secondaryElementGUIDParameterName - name of parameter passing the secondaryElementGUID
      urlTemplate - URL to call (no expected placeholders)
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • clearRelationship

      protected void clearRelationship(String userId, String assetManagerGUID, String assetManagerName, String primaryElementGUID, String primaryElementGUIDParameterName, String relationshipTypeName, String relationshipTypeNameParameterName, String secondaryElementGUID, String secondaryElementGUIDParameterName, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a relationship.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      primaryElementGUID - unique identifier of the primary element
      primaryElementGUIDParameterName - name of parameter passing the primaryElementGUID
      relationshipTypeName - type of relationship to create
      relationshipTypeNameParameterName - name of the parameter passing relationshipTypeName
      secondaryElementGUID - unique identifier of the element to connect it to
      secondaryElementGUIDParameterName - name of parameter passing the secondaryElementGUID
      urlTemplate - URL to call (no expected placeholders)
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getRelatedElements

      protected List<RelatedElement> getRelatedElements(String userId, String assetManagerGUID, String assetManagerName, String startingElementGUID, String startingElementGUIDParameterName, String urlTemplate, int startFrom, int pageSize, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve a relationship.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      startingElementGUID - unique identifier of the primary element
      startingElementGUIDParameterName - name of parameter passing the startingElementGUID
      urlTemplate - URL to call (no expected placeholders)
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      list of related elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getClassifiedElements

      protected List<ElementStub> getClassifiedElements(String userId, String assetManagerGUID, String assetManagerName, FindProperties properties, String urlTemplate, int startFrom, int pageSize, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve a collection of classified elements.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      properties - values to search on
      urlTemplate - URL to call (no expected placeholders)
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      list of related elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • removeReferenceable

      protected void removeReferenceable(String userId, String assetManagerGUID, String assetManagerName, String elementGUID, String elementGUIDParameterName, String externalIdentifierName, String urlTemplate, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software capability representing the caller
      assetManagerName - unique name of software capability representing the caller
      elementGUID - unique identifier of the metadata element to remove
      elementGUIDParameterName - name of parameter passing the elementGUID
      urlTemplate - URL to call (no expected placeholders)
      externalIdentifierName - unique identifier of the element in the external asset manager
      effectiveTime - the time that the retrieved elements must be effective for
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)