Interface AssetCollaborationInterface
public interface AssetCollaborationInterface
AssetCollaborationInterface defines the operations to manage comments snd note logs attached
to assets and their attachments.
-
Method Summary
Modifier and TypeMethodDescriptionaddCommentReply
(String userId, String commentGUID, boolean isPublic, CommentProperties properties) Adds a comment to another comment.addCommentToElement
(String userId, String elementGUID, boolean isPublic, CommentProperties properties) Adds a comment to the element.void
clearAcceptedAnswer
(String userId, String questionCommentGUID, String answerCommentGUID) Unlink a comment that contains an answer to a question posed in another comment.createNote
(String userId, String noteLogGUID, NoteProperties noteProperties) Create a new metadata element to represent a note.createNoteLog
(String userId, String elementGUID, boolean isPublic, NoteLogProperties noteLogProperties) Create a new metadata element to represent a note log and attach it to an element (if supplied).findComments
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of comment metadata elements that contain the search string.findNoteLogs
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of note log metadata elements that contain the search string.Retrieve the list of note metadata elements that contain the search string.getAttachedComments
(String userId, String elementGUID, int startFrom, int pageSize) Return the comments attached to an element.getComment
(String userId, String commentGUID) Return the requested comment.getNoteByGUID
(String userId, String noteGUID) Retrieve the note metadata element with the supplied unique identifier.getNoteLogByGUID
(String userId, String noteLogGUID) Retrieve the note log metadata element with the supplied unique identifier.getNoteLogsByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of note log metadata elements with a matching qualified or display name.getNoteLogsForElement
(String userId, String elementGUID, int startFrom, int pageSize) Retrieve the list of note log metadata elements attached to the element.getNotesForNoteLog
(String userId, String noteLogGUID, int startFrom, int pageSize) Retrieve the list of notes associated with a note log.void
removeComment
(String userId, String commentGUID) Removes a comment added to the element by this user.void
removeNote
(String userId, String noteGUID) Remove the metadata element representing a note.void
removeNoteLog
(String userId, String noteLogGUID) Remove the metadata element representing a note log.void
setupAcceptedAnswer
(String userId, String questionCommentGUID, String answerCommentGUID, FeedbackProperties properties) Link a comment that contains the best answer to a question posed in another comment.void
updateComment
(String userId, String commentGUID, boolean isMergeUpdate, boolean isPublic, CommentProperties properties) Update an existing comment.void
updateNote
(String userId, String noteGUID, boolean isMergeUpdate, NoteProperties noteProperties) Update the properties of the metadata element representing a note.void
updateNoteLog
(String userId, String noteLogGUID, boolean isMergeUpdate, boolean isPublic, NoteLogProperties noteLogProperties) Update the metadata element representing a note log.
-
Method Details
-
addCommentToElement
String addCommentToElement(String userId, String elementGUID, boolean isPublic, CommentProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a comment to the element.- Parameters:
userId
- userId of user making request.elementGUID
- unique identifier for the element.isPublic
- is this comment visible to other people.properties
- properties of the comment- Returns:
- guid of new comment.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the element properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addCommentReply
String addCommentReply(String userId, String commentGUID, boolean isPublic, CommentProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a comment to another comment.- Parameters:
userId
- userId of user making request.commentGUID
- unique identifier for an existing comment. Used to add a reply to a comment.properties
- properties of the commentisPublic
- who can retrieve the relationship- Returns:
- guid of new comment.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the element properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
updateComment
void updateComment(String userId, String commentGUID, boolean isMergeUpdate, boolean isPublic, CommentProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update an existing comment.- Parameters:
userId
- userId of user making request.commentGUID
- unique identifier for the comment to change.isMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?isPublic
- is this visible to other peopleproperties
- properties of the comment- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the element properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
setupAcceptedAnswer
void setupAcceptedAnswer(String userId, String questionCommentGUID, String answerCommentGUID, FeedbackProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Link a comment that contains the best answer to a question posed in another comment.- Parameters:
userId
- calling userquestionCommentGUID
- unique identifier of the comment containing the questionanswerCommentGUID
- unique identifier of the comment containing the accepted answerproperties
- is this visible to other people- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearAcceptedAnswer
void clearAcceptedAnswer(String userId, String questionCommentGUID, String answerCommentGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Unlink a comment that contains an answer to a question posed in another comment.- Parameters:
userId
- calling userquestionCommentGUID
- unique identifier of the comment containing the questionanswerCommentGUID
- unique identifier of the comment containing the accepted answer- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeComment
void removeComment(String userId, String commentGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes a comment added to the element by this user.- Parameters:
userId
- userId of user making request.commentGUID
- unique identifier for the comment object.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the element properties in the property server.UserNotAuthorizedException
- the user does not have permission to perform this request.
-
getComment
CommentElement getComment(String userId, String commentGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the requested comment.- Parameters:
userId
- userId of user making request.commentGUID
- unique identifier for the comment object.- Returns:
- comment properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the element properties in the property server.UserNotAuthorizedException
- the user does not have permission to perform this request.
-
getAttachedComments
List<CommentElement> getAttachedComments(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the comments attached to an element.- Parameters:
userId
- userId of user making request.elementGUID
- unique identifier for the element that the comments are connected to (maybe a comment too).startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of comments
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the element properties in the property server.UserNotAuthorizedException
- the user does not have permission to perform this request.
-
findComments
List<CommentElement> findComments(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of comment metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createNoteLog
String createNoteLog(String userId, String elementGUID, boolean isPublic, NoteLogProperties noteLogProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a note log and attach it to an element (if supplied). Any supplied element becomes the note log's anchor, causing the note log to be deleted if/when the element is deleted.- Parameters:
userId
- calling userelementGUID
- unique identifier of the element where the note log is locatednoteLogProperties
- properties about the note log to storeisPublic
- is this element visible to other people.- Returns:
- unique identifier of the new note log
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateNoteLog
void updateNoteLog(String userId, String noteLogGUID, boolean isMergeUpdate, boolean isPublic, NoteLogProperties noteLogProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing a note log.- Parameters:
userId
- calling usernoteLogGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?isPublic
- is this element visible to other people.noteLogProperties
- new properties for the metadata element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeNoteLog
void removeNoteLog(String userId, String noteLogGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing a note log.- Parameters:
userId
- calling usernoteLogGUID
- unique identifier of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findNoteLogs
List<NoteLogElement> findNoteLogs(String userId, String searchString, int startFrom, int pageSize) 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 usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getNoteLogsByName
List<NoteLogElement> getNoteLogsByName(String userId, String name, int startFrom, int pageSize) 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 username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getNoteLogsForElement
List<NoteLogElement> getNoteLogsForElement(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of note log metadata elements attached to the element.- Parameters:
userId
- calling userelementGUID
- element to start fromstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getNoteLogByGUID
NoteLogElement getNoteLogByGUID(String userId, String noteLogGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the note log metadata element with the supplied unique identifier.- Parameters:
userId
- calling usernoteLogGUID
- unique identifier of the requested metadata element- Returns:
- requested metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createNote
String createNote(String userId, String noteLogGUID, NoteProperties noteProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a note.- Parameters:
userId
- calling usernoteLogGUID
- unique identifier of the element where the note is locatednoteProperties
- properties for the note- Returns:
- unique identifier of the new metadata element for the note
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateNote
void updateNote(String userId, String noteGUID, boolean isMergeUpdate, NoteProperties noteProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of the metadata element representing a note.- Parameters:
userId
- calling usernoteGUID
- unique identifier of the note to updateisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?noteProperties
- new properties for the note- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeNote
void removeNote(String userId, String noteGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing a note.- Parameters:
userId
- calling usernoteGUID
- unique identifier of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findNotes
List<NoteElement> findNotes(String userId, String searchString, int startFrom, int pageSize) 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 usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getNotesForNoteLog
List<NoteElement> getNotesForNoteLog(String userId, String noteLogGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of notes associated with a note log.- Parameters:
userId
- calling usernoteLogGUID
- unique identifier of the note log of intereststartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of associated metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getNoteByGUID
NoteElement getNoteByGUID(String userId, String noteGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the note metadata element with the supplied unique identifier.- Parameters:
userId
- calling usernoteGUID
- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-