Class NoteLogExchangeHandler

java.lang.Object
org.odpi.openmetadata.accessservices.assetmanager.handlers.NoteLogExchangeHandler

public class NoteLogExchangeHandler extends Object
NoteLogExchangeHandler is the server side handler for managing note logs and their associated notes.
  • Field Details

  • Constructor Details

    • NoteLogExchangeHandler

      public NoteLogExchangeHandler(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 note log exchange handler with information needed to work with note log related objects for Asset Manager OMAS.
      Parameters:
      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 instances from.
      defaultZones - list of zones that the access service should set in all new instances.
      publishZones - list of zones that the access service sets up in published instances.
      auditLog - destination for audit log events.
  • Method Details

    • createNoteLog

      public String createNoteLog(String userId, String elementGUID, MetadataCorrelationProperties correlationProperties, boolean assetManagerIsHome, NoteLogProperties noteLogProperties, boolean isPublic, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a note log.
      Parameters:
      userId - calling user
      elementGUID - unique identifier of the element where the note log is located
      correlationProperties - properties to help with the mapping of the elements in the external asset manager and open metadata
      assetManagerIsHome - ensure that only the asset manager can update this element
      noteLogProperties - properties about the note log to store
      effectiveTime - the time that the retrieved elements must be effective for
      isPublic - should this be visible to all or private to the caller
      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 note log
      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)
    • updateNoteLog

      public void updateNoteLog(String userId, MetadataCorrelationProperties correlationProperties, String noteLogGUID, NoteLogProperties noteLogProperties, boolean isMergeUpdate, boolean isPublic, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the metadata element representing a note log.
      Parameters:
      userId - calling user
      correlationProperties - properties to help with the mapping of the elements in the external asset manager and open metadata
      noteLogGUID - unique identifier of the metadata element to update
      noteLogProperties - new properties for the metadata element
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      isPublic - is this element visible to other people.
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • removeNoteLog

      public void removeNoteLog(String userId, MetadataCorrelationProperties correlationProperties, String noteLogGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a note log.
      Parameters:
      userId - calling user
      correlationProperties - properties to help with the mapping of the elements in the external asset manager and open metadata
      noteLogGUID - unique identifier of the metadata element to remove
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • findNoteLogs

      public List<NoteLogElement> findNoteLogs(String userId, String assetManagerGUID, String assetManagerName, String searchString, String searchStringParameterName, int startFrom, int pageSize, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of note log metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      searchString - string to find in the properties
      searchStringParameterName - name of parameter for searchString
      startFrom - paging start point
      pageSize - maximum results that can be returned
      effectiveTime - optional date for effective time of the query. Null means any effective time
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      methodName - calling method
      Returns:
      list of matching metadata 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)
    • getNoteLogsByName

      public List<NoteLogElement> getNoteLogsByName(String userId, String assetManagerGUID, String assetManagerName, String name, String nameParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of note log metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      name - name to search for
      nameParameterName - parameter name
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      methodName - calling method
      Returns:
      list of matching metadata 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)
    • getNoteLogsForElement

      public List<NoteLogElement> getNoteLogsForElement(String userId, String assetManagerGUID, String assetManagerName, String elementGUID, String elementParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of note log metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      elementGUID - guid to search for
      elementParameterName - parameter name
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      methodName - calling method
      Returns:
      list of matching metadata 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)
    • getNoteLogByGUID

      public NoteLogElement getNoteLogByGUID(String userId, String assetManagerGUID, String assetManagerName, String openMetadataGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the note log metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      openMetadataGUID - unique identifier of the requested metadata element
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      methodName - calling method
      Returns:
      requested metadata 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)
    • createNote

      public String createNote(String userId, String noteLogGUID, MetadataCorrelationProperties correlationProperties, boolean assetManagerIsHome, NoteProperties noteProperties, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new metadata element to represent a note.
      Parameters:
      userId - calling user
      noteLogGUID - unique identifier of the element where the note is located
      correlationProperties - properties to help with the mapping of the elements in the external asset manager and open metadata
      assetManagerIsHome - ensure that only the asset manager can update this element
      noteProperties - properties for the note
      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 metadata element for the note
      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)
    • updateNote

      public void updateNote(String userId, MetadataCorrelationProperties correlationProperties, String noteGUID, NoteProperties noteProperties, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the properties of the metadata element representing a note.
      Parameters:
      userId - calling user
      correlationProperties - properties to help with the mapping of the elements in the external asset manager and open metadata
      noteGUID - unique identifier of the note to update
      noteProperties - new properties for the note
      isMergeUpdate - should the properties be merged with the existing properties or completely over-write them
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • removeNote

      public void removeNote(String userId, MetadataCorrelationProperties correlationProperties, String noteGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing a note.
      Parameters:
      userId - calling user
      correlationProperties - properties to help with the mapping of the elements in the external asset manager and open metadata
      noteGUID - unique identifier of the metadata element to update
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • findNotes

      public List<NoteElement> findNotes(String userId, String assetManagerGUID, String assetManagerName, String searchString, String searchStringParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of note metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      searchString - string to find in the properties
      searchStringParameterName - parameter supplying search string
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      methodName - calling method
      Returns:
      list of matching metadata 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)
    • getNotesForNoteLog

      public List<NoteElement> getNotesForNoteLog(String userId, String assetManagerGUID, String assetManagerName, String noteLogGUID, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of notes associated with a note log.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      noteLogGUID - unique identifier of the note log of interest
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      methodName - calling method
      Returns:
      list of associated metadata 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)
    • getNoteByGUID

      public NoteElement getNoteByGUID(String userId, String assetManagerGUID, String assetManagerName, String guid, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the note metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      assetManagerGUID - unique identifier of software server capability representing the caller
      assetManagerName - unique name of software server capability representing the caller
      guid - unique identifier of the requested metadata element
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      methodName - calling method
      Returns:
      matching metadata 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)
    • setElementAsDataField

      public void setElementAsDataField(String userId, MetadataCorrelationProperties correlationProperties, String elementGUID, DataFieldValuesProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Classify the element to indicate that it describes a data field and supply properties that describe the characteristics of the data values found within.
      Parameters:
      userId - calling user
      correlationProperties - properties to help with the mapping of the elements in the external asset manager and open metadata
      elementGUID - unique identifier of the metadata element to update
      properties - characterizations of the data values stored in the data field
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)
    • clearElementAsDataField

      public void clearElementAsDataField(String userId, MetadataCorrelationProperties correlationProperties, String elementGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the data field designation from the element.
      Parameters:
      userId - calling user
      correlationProperties - properties to help with the mapping of the elements in the external asset manager and open metadata
      elementGUID - unique identifier of the metadata element to update
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - optional date for effective time of the query. Null means any effective time
      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)