public class CommentHandler<B> extends ReferenceableHandler<B>
auditLog, beanClass, converter, defaultZones, errorHandler, invalidParameterHandler, localServerUserId, publishZones, repositoryHandler, repositoryHelper, securityVerifier, serverName, serviceName, supportedZones| Constructor and Description |
|---|
CommentHandler(OpenMetadataAPIGenericConverter<B> converter,
Class<B> beanClass,
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 handler information needed to interact with the repository services
|
| Modifier and Type | Method and Description |
|---|---|
String |
attachNewComment(String userId,
String externalSourceGUID,
String externalSourceName,
String anchorGUID,
String parentGUID,
String guidParameter,
int commentType,
String commentText,
boolean isPublic,
String methodName)
Adds a comment and link it to the supplied parent entity.
|
int |
countAttachedComments(String userId,
String elementGUID,
String methodName)
Count the number of comments attached to an anchor entity.
|
List<B> |
getComments(String userId,
String elementGUID,
String elementGUIDParameterName,
String elementTypeName,
int startingFrom,
int pageSize,
String methodName)
Return the comments attached to an anchor entity.
|
List<B> |
getComments(String userId,
String elementGUID,
String elementGUIDParameterName,
String elementTypeName,
List<String> serviceSupportedZones,
int startingFrom,
int pageSize,
String methodName)
Return the comments attached to an entity.
|
List<B> |
getComments(String userId,
String anchorGUID,
String anchorGUIDParameterName,
String elementGUID,
String elementGUIDParameterName,
String elementTypeName,
List<String> serviceSupportedZones,
int startingFrom,
int pageSize,
String methodName)
Return the comments attached to an entity.
|
void |
removeCommentFromElement(String userId,
String externalSourceGUID,
String externalSourceName,
String commentGUID,
String commentGUIDParameterName,
String methodName)
Removes a comment added to the parent by this user.
|
void |
updateComment(String userId,
String externalSourceGUID,
String externalSourceName,
String commentGUID,
String commentGUIDParameterName,
int commentType,
String commentText,
boolean isPublic,
String methodName)
Update an existing comment.
|
addSecurityTags, addTemplateClassification, findBeanGUIDsByQualifiedName, findBeanGUIDsByQualifiedName, findBeansByQualifiedName, findBeansByQualifiedName, getBeanByQualifiedName, getBeanByQualifiedName, getBeanGUIDByQualifiedName, getBeanGUIDByQualifiedName, getBeanGUIDsByQualifiedName, getBeanGUIDsByQualifiedName, getBeansByQualifiedName, getBeansByQualifiedName, getMoreInformation, getMoreInformation, getVendorProperties, linkElementsAsDuplicates, removeSecurityTags, removeSemanticAssignment, removeTemplateClassification, saveSemanticAssignment, saveSemanticAssignment, unlinkElementsAsDuplicatesarchiveBeanInRepository, archiveBeanInRepository, countAttachments, createBeanFromTemplate, createBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, findAttachmentLinks, findBeanGUIDs, findBeans, findBeans, findBeans, findBeans, findEntities, getAllAttachmentLinks, getAnchorsForAttachedElements, getAttachedElement, getAttachedElement, getAttachedElementGUID, getAttachedElementGUID, getAttachedElementGUIDs, getAttachedElementGUIDs, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntities, getAttachedEntity, getAttachedEntity, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getBeanByUniqueName, getBeanByUniqueName, getBeanByValue, getBeanFromEntity, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanGUIDsByClassification, getBeanGUIDsByType, getBeanGUIDsByType, getBeanGUIDsByValue, getBeansByClassification, getBeansByCreator, getBeansByType, getBeansByType, getBeansByValue, getBeansByValue, getBeansByValue, getBeansByValue, getBeansByValue, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityFromRepository, getEntityFromRepository, getEntityGUIDByValue, getEntityGUIDsByValue, getRepositoryHelper, getServiceName, getUniqueAttachmentLink, getUniqueAttachmentLink, linkElementToElement, linkElementToElement, maintainSupplementaryProperties, relinkElementToNewElement, relinkElementToNewElement, removeClassificationFromRepository, setClassificationInRepository, setClassificationInRepository, setSecurityVerifier, unlinkAllElements, unlinkAllElements, unlinkConnectedElement, unlinkConnectedElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateElementToElementLink, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipProperties, validateAnchorEntity, validateAnchorEntity, verifyExternalSourceIdentitypublic CommentHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, 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)
converter - specific converter for this bean classbeanClass - name of bean class that is represented by the generic class BserviceName - 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 Asset instances from.defaultZones - list of zones that the access service should set in all new Asset instances.publishZones - list of zones that the access service sets up in published Asset instances.auditLog - destination for audit log events.public int countAttachedComments(String userId, String elementGUID, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userelementGUID - identifier for the entity that the object is attached tomethodName - calling methodInvalidParameterException - the parameters are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic String attachNewComment(String userId, String externalSourceGUID, String externalSourceName, String anchorGUID, String parentGUID, String guidParameter, int commentType, String commentText, boolean isPublic, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - String - userId of user making request.externalSourceGUID - guid of the software server capability entity that represented the external source - null for localexternalSourceName - name of the software server capability entity that represented the external sourceanchorGUID - head of the comment chainparentGUID - String - unique id for a referenceable entity that the comment is to be attached to.guidParameter - name of parameter that supplied the entity's unique identifier.commentType - ordinal of comment enum.commentText - String - the text of the comment.isPublic - should this be visible to all or private to the callermethodName - calling methodInvalidParameterException - one of the parameters is null or invalid.PropertyServerException - There is a problem adding the asset properties to
the property server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void updateComment(String userId, String externalSourceGUID, String externalSourceName, String commentGUID, String commentGUIDParameterName, int commentType, String commentText, boolean isPublic, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.externalSourceGUID - guid of the software server capability entity that represented the external source - null for localexternalSourceName - name of the software server capability entity that represented the external sourcecommentGUID - unique identifier for the comment to changecommentGUIDParameterName - name of parameter for commentGUIDcommentType - type of comment enum.commentText - the text of the comment.isPublic - indicates whether the feedback should be shared or only be visible to the originating usermethodName - calling methodInvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem adding the asset properties to the property server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void removeCommentFromElement(String userId, String externalSourceGUID, String externalSourceName, String commentGUID, String commentGUIDParameterName, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.externalSourceGUID - guid of the software server capability entity that represented the external source - null for localexternalSourceName - name of the software server capability entity that represented the external sourcecommentGUIDParameterName - parameter supplying thecommentGUID - unique identifier for the comment object.methodName - calling methodInvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem updating the asset properties in the property server.UserNotAuthorizedException - the user does not have permission to perform this request.public List<B> getComments(String userId, String anchorGUID, String anchorGUIDParameterName, String elementGUID, String elementGUIDParameterName, String elementTypeName, List<String> serviceSupportedZones, int startingFrom, int pageSize, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling useranchorGUID - expected anchorGUID for this elementanchorGUIDParameterName - parameter supplying anchorGUIDelementGUID - identifier for the entity that the comment is attached toelementGUIDParameterName - name of the parameter providing the element GUIDelementTypeName - name of the type of the anchor entityserviceSupportedZones - supported zones for the particular servicestartingFrom - where to start from in the listpageSize - maximum number of results that can be returnedmethodName - calling methodInvalidParameterException - the input properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic List<B> getComments(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, List<String> serviceSupportedZones, int startingFrom, int pageSize, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userelementGUID - identifier for the entity that the comment is attached toelementGUIDParameterName - name of the parameter providing the element GUIDelementTypeName - name of the type of the anchor entityserviceSupportedZones - supported zones for the particular servicestartingFrom - where to start from in the listpageSize - maximum number of results that can be returnedmethodName - calling methodInvalidParameterException - the input properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic List<B> getComments(String userId, String elementGUID, String elementGUIDParameterName, String elementTypeName, int startingFrom, int pageSize, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userelementGUID - identifier for the entity that the comment is attached toelementGUIDParameterName - name of the parameter providing the element GUIDelementTypeName - name of the type of the anchor entitystartingFrom - where to start from in the listpageSize - maximum number of results that can be returnedmethodName - calling methodInvalidParameterException - the input properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.