Class ContributionRecordHandler<B>
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler<B>
-
- org.odpi.openmetadata.commonservices.generichandlers.ContributionRecordHandler<B>
-
public class ContributionRecordHandler<B> extends OpenMetadataAPIGenericHandler<B>
ContributionRecordHandler manages the ContributionRecord entity that records the karma points for an individual. There is on 1-1 relationship between the Person entity and the ContributionRecord and so the profile GUID is passed on the parameters. ContributionRecords are always maintainable by the local cohort.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
auditLog, beanClass, converter, defaultZones, errorHandler, invalidParameterHandler, localServerUserId, publishZones, repositoryHandler, repositoryHelper, securityVerifier, serverName, serviceName, supportedZones
-
-
Constructor Summary
Constructors Constructor Description ContributionRecordHandler(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, int karmaPointPlateau, AuditLog auditLog)Construct the handler information needed to interact with the repository services
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BgetContributionRecord(String userId, String profileGUID, String profileGUIDParameterName, String methodName)Return the ContributionRecord attached to a supplied person profile.intgetKarmaPointPlateau(int karmaPointTotal)Return the karma point plateau for an individual.voidremoveContributionRecord(String userId, String profileGUID, String profileGUIDParameterName, String methodName)Remove the requested contribution record.voidsaveContributionRecord(String userId, String profileGUID, String profileGUIDParameterName, String qualifiedName, long karmaPoints, boolean isPublic, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, String methodName)Set up the contribution values in a Person profile.-
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
addAnchorsClassification, archiveBeanInRepository, archiveBeanInRepository, countAttachments, createBeanFromTemplate, createBeanInRepository, deleteAnchoredEntity, deleteBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteRelationship, entityMatchSearchCriteria, findAttachmentLinks, findBeanGUIDs, findBeans, findBeans, findBeans, findEntities, findEntities, getAllAttachmentLinks, getAnchorGUIDFromAnchorsClassification, getAttachedElement, getAttachedElementGUID, getAttachedElementGUID, getAttachedElementGUIDs, getAttachedElementGUIDs, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntitiesFromUser, getAttachedEntity, getAttachedEntity, getAttachedEntity, getAttachedEntityFromUser, getAttachedFilteredEntities, getAttachedFilteredEntities, getAttachedFilteredEntities, getAttachmentLink, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getBeanByUniqueName, getBeanByUniqueName, getBeanByValue, getBeanFromEntity, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanGUIDsByClassification, getBeanGUIDsByType, getBeanGUIDsByType, getBeanGUIDsByValue, getBeansByClassification, getBeansByCreator, getBeansByIntValue, getBeansByType, getBeansByType, getBeansByValue, getBeansByValue, getBeansByValue, getBeansByValue, getEffectiveTime, getEffectiveTime, getEntitiesByIntValue, getEntitiesByType, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityGUIDByValue, getEntityGUIDsByValue, getRepositoryHandler, getRepositoryHelper, getServerName, getServiceName, getTypeDefByName, getUniqueAttachmentLink, getUniqueAttachmentLink, isBeanIsolated, isEntityATypeOf, linkElementToElement, linkElementToElement, linkElementToElement, linkElementToElement, maintainSupplementaryProperties, multiLinkElementToElement, regexSearchCriteria, relinkElementToNewElement, relinkElementToNewElement, removeClassificationFromRepository, removeClassificationFromRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setSecurityVerifier, unlinkAllElements, unlinkConnectedElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateClassificationEffectivityDates, updateElementToElementLink, updateElementToElementLink, updateElementToElementLink, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipEffectivityDates, updateRelationshipProperties, validateAnchorEntity, validateAnchorEntity, validateUniqueProperty, verifyExternalSourceIdentity
-
-
-
-
Constructor Detail
-
ContributionRecordHandler
public ContributionRecordHandler(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, int karmaPointPlateau, AuditLog auditLog)
Construct the handler information needed to interact with the repository services- Parameters:
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 fromdefaultZones- list of zones that the access service should set in all new Asset instancespublishZones- list of zones that the access service sets up in published Asset instanceskarmaPointPlateau- number of karma points to a plateauauditLog- destination for audit log events
-
-
Method Detail
-
getContributionRecord
public B getContributionRecord(String userId, String profileGUID, String profileGUIDParameterName, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Return the ContributionRecord attached to a supplied person profile.- Parameters:
userId- calling userprofileGUID- identifier for the entity that the contribution record is attached toprofileGUIDParameterName- name of parameter supplying the GUIDmethodName- calling method- Returns:
- list of objects or null if none found
- Throws:
InvalidParameterException- the input properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
saveContributionRecord
public void saveContributionRecord(String userId, String profileGUID, String profileGUIDParameterName, String qualifiedName, long karmaPoints, boolean isPublic, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Set up the contribution values in a Person profile.- Parameters:
userId- userId of user making request.profileGUID- unique identifier for the connected Person entity.profileGUIDParameterName- parameter supplying the profileGUIDqualifiedName- unique name for the profilekarmaPoints- contribution points for the individualisPublic- can this information be shared with colleaguesadditionalProperties- additional properties for the contribution recordextendedProperties- additional properties from defined subtypessuppliedTypeName- name of subtype or nullmethodName- calling method- Throws:
InvalidParameterException- the endpoint bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
removeContributionRecord
public void removeContributionRecord(String userId, String profileGUID, String profileGUIDParameterName, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Remove the requested contribution record.- Parameters:
userId- calling userprofileGUID- unique identifier for the connected Person entity.profileGUIDParameterName- parameter supplying the profileGUIDmethodName- calling method- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
getKarmaPointPlateau
public int getKarmaPointPlateau(int karmaPointTotal)
Return the karma point plateau for an individual.- Parameters:
karmaPointTotal- current points- Returns:
- current plateau
-
-