Skip to content

Commit

Permalink
Merge pull request #7620 from mandy-chessell/code2023
Browse files Browse the repository at this point in the history
Add support for notelogs
  • Loading branch information
mandy-chessell committed Apr 17, 2023
2 parents ea12067 + fa6e727 commit 18f8d38
Show file tree
Hide file tree
Showing 29 changed files with 2,932 additions and 896 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.InformalTagElement;
import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteElement;
import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteLogElement;
import org.odpi.openmetadata.accessservices.assetmanager.properties.ArchiveProperties;
import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties;
import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalIdentifierProperties;
import org.odpi.openmetadata.accessservices.assetmanager.properties.FeedbackProperties;
Expand All @@ -15,7 +14,6 @@
import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties;
import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties;
import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties;
import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties;
import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException;
Expand Down Expand Up @@ -615,6 +613,7 @@ List<String> getElementsByTag(String userId,
* @param elementGUID unique identifier of the element where the note log is located
* @param externalIdentifierProperties optional properties used to define an external identifier for the note log
* @param noteLogProperties properties about the note log to store
* @param isPublic is this element visible to other people.
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
* @param forDuplicateProcessing do not merge elements marked as duplicates?
Expand All @@ -632,43 +631,13 @@ String createNoteLog(String userId,
String elementGUID,
ExternalIdentifierProperties externalIdentifierProperties,
NoteLogProperties noteLogProperties,
boolean isPublic,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Create a new metadata element to represent a note log using an existing metadata element as a template.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param assetManagerIsHome ensure that only the asset manager can update this element
* @param elementGUID unique identifier of the element where the note log is located
* @param templateGUID unique identifier of the metadata element to copy
* @param externalIdentifierProperties optional properties used to define an external identifier
* @param templateProperties properties that override the template
*
* @return unique identifier of the new note log
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
String createNoteLogFromTemplate(String userId,
String assetManagerGUID,
String assetManagerName,
boolean assetManagerIsHome,
String elementGUID,
String templateGUID,
ExternalIdentifierProperties externalIdentifierProperties,
TemplateProperties templateProperties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Update the metadata element representing a note log.
*
Expand Down Expand Up @@ -863,37 +832,6 @@ String createNote(String userId,
PropertyServerException;



/**
* Create a new metadata element to represent a note using an existing metadata element as a template.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param assetManagerIsHome ensure that only the asset manager can update this element
* @param noteLogGUID unique identifier of the element where the note is located
* @param templateGUID unique identifier of the metadata element to copy
* @param externalIdentifierProperties optional properties used to define an external identifier
* @param templateProperties properties that override the template
*
* @return unique identifier of the new metadata element for the note
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
String createNoteFromTemplate(String userId,
String assetManagerGUID,
String assetManagerName,
boolean assetManagerIsHome,
String noteLogGUID,
String templateGUID,
ExternalIdentifierProperties externalIdentifierProperties,
TemplateProperties templateProperties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Update the properties of the metadata element representing a note.
*
Expand Down Expand Up @@ -926,64 +864,6 @@ void updateNote(String userId,
PropertyServerException;


/**
* Undo the last update to the note.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param noteGUID unique identifier of the metadata element to update
* @param noteExternalIdentifier unique identifier of the note in the external asset manager
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
* @param forDuplicateProcessing do not merge elements marked as duplicates?
* @return recovered note
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
NoteElement undoNoteUpdate(String userId,
String assetManagerGUID,
String assetManagerName,
String noteGUID,
String noteExternalIdentifier,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Archive the metadata element representing a note. This removes it from normal access. However, it is still available
* for lineage requests.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param noteGUID unique identifier of the metadata element to archive
* @param noteExternalIdentifier unique identifier of the note in the external asset manager
* @param archiveProperties option parameters about the archive process
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forDuplicateProcessing do not merge elements marked as duplicates?
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
void archiveNote(String userId,
String assetManagerGUID,
String assetManagerName,
String noteGUID,
String noteExternalIdentifier,
ArchiveProperties archiveProperties,
Date effectiveTime,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Remove the metadata element representing a note.
*
Expand Down Expand Up @@ -1019,7 +899,6 @@ void removeNote(String userId,
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param elementGUID unique identifier of the element to query
* @param searchString string to find in the properties
* @param startFrom paging start point
* @param pageSize maximum results that can be returned
Expand All @@ -1036,7 +915,6 @@ void removeNote(String userId,
List<NoteElement> findNotes(String userId,
String assetManagerGUID,
String assetManagerName,
String elementGUID,
String searchString,
int startFrom,
int pageSize,
Expand Down Expand Up @@ -1079,41 +957,6 @@ List<NoteElement> getNotesForNoteLog(String userId,
PropertyServerException;


/**
* Retrieve the list of note metadata elements with a matching qualified or display name.
* There are no wildcards supported on this request.
*
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param elementGUID unique identifier of the element to query
* @param name name to search for
* @param startFrom paging start point
* @param pageSize maximum results that can be returned
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
* @param forDuplicateProcessing do not merge elements marked as duplicates?
*
* @return list of matching metadata elements
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
* @throws PropertyServerException there is a problem reported in the open metadata server(s)
*/
List<NoteElement> getNotesByName(String userId,
String assetManagerGUID,
String assetManagerName,
String elementGUID,
String name,
int startFrom,
int pageSize,
Date effectiveTime,
boolean forLineage,
boolean forDuplicateProcessing) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Retrieve the note metadata element with the supplied unique identifier.
*
Expand Down
Loading

0 comments on commit 18f8d38

Please sign in to comment.