Class CommentExchangeHandler
java.lang.Object
org.odpi.openmetadata.accessservices.assetmanager.handlers.CommentExchangeHandler
CommentExchangeHandler is the server side handler for managing comments.
-
Constructor Summary
ConstructorsConstructorDescriptionCommentExchangeHandler(String serviceName, String serverName, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler repositoryHandler, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String localServerUserId, org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Construct the comment exchange handler with information needed to work with comment related objects for Asset Manager OMAS. -
Method Summary
Modifier and TypeMethodDescriptioncreateComment(String userId, String guid, String guidParameterName, org.odpi.openmetadata.frameworks.openmetadata.properties.MetadataCorrelationProperties correlationProperties, boolean isPublic, org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties commentProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Create a new comment.List<org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CommentElement>getAttachedComments(String userId, String assetManagerGUID, String assetManagerName, String elementGUID, String elementGUIDParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Return the comments attached to an element.org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CommentElementgetCommentByGUID(String userId, String assetManagerGUID, String assetManagerName, String commentGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Retrieve the comment metadata element with the supplied unique identifier.voidremoveComment(String userId, org.odpi.openmetadata.frameworks.openmetadata.properties.MetadataCorrelationProperties correlationProperties, String commentGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Remove the metadata element representing a comment.voidupdateComment(String userId, org.odpi.openmetadata.frameworks.openmetadata.properties.MetadataCorrelationProperties correlationProperties, String commentGUID, org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties commentProperties, boolean isMergeUpdate, boolean isPublic, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Update the metadata element representing a comment.
-
Constructor Details
-
CommentExchangeHandler
public CommentExchangeHandler(String serviceName, String serverName, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler repositoryHandler, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, String localServerUserId, org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) Construct the comment exchange handler with information needed to work with comment related objects for Asset Manager OMAS.- Parameters:
serviceName- name of this serviceserverName- name of the local serverinvalidParameterHandler- handler for managing parameter errorsrepositoryHandler- manages calls to the repository servicesrepositoryHelper- provides utilities for manipulating the repository services objectslocalServerUserId- userId for this serversecurityVerifier- open metadata security services verifiersupportedZones- 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
-
createComment
public String createComment(String userId, String guid, String guidParameterName, org.odpi.openmetadata.frameworks.openmetadata.properties.MetadataCorrelationProperties correlationProperties, boolean isPublic, org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties commentProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException Create a new comment.- Parameters:
userId- calling userguid- unique identifier of the element to attach the comment toguidParameterName- parameter for guidcorrelationProperties- properties to help with the mapping of the elements in the external asset manager and open metadataisPublic- is this visible to other peoplecommentProperties- properties to storeforLineage- return elements marked with the Memento classification?forDuplicateProcessing- do not merge elements marked as duplicates?effectiveTime- when should the elements be effected for - null is anytime; new Date() is nowmethodName- calling method- Returns:
- unique identifier of the new metadata element
- Throws:
org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-
updateComment
public void updateComment(String userId, org.odpi.openmetadata.frameworks.openmetadata.properties.MetadataCorrelationProperties correlationProperties, String commentGUID, org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties commentProperties, boolean isMergeUpdate, boolean isPublic, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException Update the metadata element representing a comment.- Parameters:
userId- calling usercorrelationProperties- properties to help with the mapping of the elements in the external asset manager and open metadatacommentGUID- unique identifier of the metadata element to updatecommentProperties- new properties for this elementisMergeUpdate- should the properties be merged with the existing properties or completely over-write themisPublic- is this visible to other peopleforLineage- return elements marked with the Memento classification?forDuplicateProcessing- do not merge elements marked as duplicates?effectiveTime- when should the elements be effected for - null is anytime; new Date() is nowmethodName- calling method- Throws:
org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-
removeComment
public void removeComment(String userId, org.odpi.openmetadata.frameworks.openmetadata.properties.MetadataCorrelationProperties correlationProperties, String commentGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException Remove the metadata element representing a comment. This will delete the comment and all comment replies.- Parameters:
userId- calling usercorrelationProperties- properties to help with the mapping of the elements in the external asset manager and open metadatacommentGUID- unique identifier of the metadata element to removeforLineage- 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 timemethodName- calling method- Throws:
org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-
getAttachedComments
public List<org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CommentElement> getAttachedComments(String userId, String assetManagerGUID, String assetManagerName, String elementGUID, String elementGUIDParameterName, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException Return the comments attached to an element.- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerelementGUID- unique identifier for the element where the like is attached.elementGUIDParameterName- name of parameter for elementGUIDstartFrom- paging start pointpageSize- maximum results that can be returnedforLineage- 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 (null for any time, new Date() for now)methodName- calling method- Returns:
- list of matching metadata elements
- Throws:
org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-
getCommentByGUID
public org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CommentElement getCommentByGUID(String userId, String assetManagerGUID, String assetManagerName, String commentGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException Retrieve the comment metadata element with the supplied unique identifier.- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callercommentGUID- unique identifier of the requested metadata elementforLineage- return elements marked with the Memento classification?forDuplicateProcessing- do not merge elements marked as duplicates?effectiveTime- when should the elements be effected for - null is anytime; new Date() is nowmethodName- calling method- Returns:
- matching metadata element
- Throws:
org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException- one of the parameters is invalidorg.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException- the user is not authorized to issue this requestorg.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException- there is a problem reported in the open metadata server(s)
-