public class LikeHandler<B> extends OpenMetadataAPIGenericHandler<B>
auditLog, beanClass, converter, defaultZones, errorHandler, invalidParameterHandler, localServerUserId, publishZones, repositoryHandler, repositoryHelper, securityVerifier, serverName, serviceName, supportedZones| Constructor and Description |
|---|
LikeHandler(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 for likes.
|
| Modifier and Type | Method and Description |
|---|---|
int |
countLikes(String userId,
String elementGUID,
String methodName)
Count the number of Likes attached to an anchor entity.
|
List<B> |
getLikes(String userId,
String elementGUID,
String elementGUIDParameterName,
String elementTypeName,
List<String> serviceSupportedZones,
int startingFrom,
int pageSize,
String methodName)
Return the Likes attached to an entity.
|
void |
removeLike(String userId,
String externalSourceGUID,
String externalSourceName,
String elementGUID,
String elementGUIDParameterName,
String methodName)
Remove the requested like.
|
String |
saveLike(String userId,
String externalSourceGUID,
String externalSourceName,
String elementGUID,
String elementGUIDParameterName,
boolean isPublic,
String methodName)
Add or replace and existing Like for this user.
|
countAttachments, createBeanFromTemplate, createBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, findBeanGUIDs, findBeans, findBeans, findBeans, findEntities, getAllAttachmentLinks, getAnchorsForAttachedElements, getAttachedElement, getAttachedElement, getAttachedElementGUID, getAttachedElementGUID, getAttachedElementGUIDs, getAttachedElementGUIDs, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntity, getAttachedEntity, getAttachmentLinks, getAttachmentLinks, getBeanByUniqueName, getBeanByUniqueName, getBeanByValue, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDsByClassification, getBeanGUIDsByType, getBeanGUIDsByType, getBeanGUIDsByValue, getBeansByClassification, getBeansByCreator, getBeansByType, getBeansByType, getBeansByValue, getBeansByValue, getBeansByValue, getBeansByValue, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityFromRepository, getEntityGUIDByValue, getRepositoryHelper, getServiceName, getUniqueAttachmentLink, linkElementToElement, linkElementToElement, relinkElementToNewElement, relinkElementToNewElement, setSecurityVerifier, unlinkAllElements, unlinkConnectedElement, unlinkElementFromElement, unlinkElementFromElement, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, validateAnchorEntity, validateAnchorEntity, verifyExternalSourceIdentitypublic LikeHandler(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 countLikes(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 List<B> getLikes(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 feedback is attached toelementGUIDParameterName - name of parameter supplying the element guidelementTypeName - name of type for the elementserviceSupportedZones - serviceSupportedZonesstartingFrom - 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 String saveLike(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String elementGUIDParameterName, 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 sourceelementGUID - unique identifier for the liked entity (Referenceable).elementGUIDParameterName - parameter supplying the elementGUIDisPublic - indicates whether the feedback should be shared or only be visible to the originating usermethodName - calling methodInvalidParameterException - the endpoint bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic void removeLike(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String elementGUIDParameterName, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling userexternalSourceGUID - 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 sourceelementGUID - object where rating is attachedelementGUIDParameterName - parameter supplying the elementGUIDmethodName - calling methodInvalidParameterException - the entity guid is not knownUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverCopyright © 2018–2020 ODPi. All rights reserved.