Class CommunityProfileOutTopicPublisher
java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.outtopic.CommunityProfileOutTopicPublisher
CommunityProfileOutTopicPublisher is responsible for publishing events about changes to personal profiles,
communities and related elements. It is called when an interesting OMRS Event is added to the Enterprise
OMRS Topic (see CommunityProfileOMRSTopicListener).
The actual sending of events is done by the super class CommunityProfileOutTopicPublisher.
This class logs a message to the OMRS Audit Log before calling the super class.
-
Constructor Summary
ConstructorDescriptionCommunityProfileOutTopicPublisher
(CommunityProfileOutTopicServerConnector outTopicServerConnector, String outTopicName, AuditLog auditLog) Constructor for the publisher. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Shutdown the publishing process.void
sendEntityEvent
(CommunityProfileOutboundEventType eventType, String elementGUID, String elementTypeName, String classificationName, ElementStub elementStub) Send an event that relates to an entity.void
sendKarmaPointPlateauEvent
(ElementStub profileElementStub, String contributingUserId, boolean isPublic, long pointsTotal, long plateau) Send an event that indicates that a person has achieved a karma point plateau.void
sendRelationshipEvent
(CommunityProfileOutboundEventType eventType, String relationshipGUID, String relationshipTypeName, ElementStub relationshipElementStub, ElementStub endOneElementStub, ElementStub endTwoElementStub) Send an event that relates to a relationship.
-
Constructor Details
-
CommunityProfileOutTopicPublisher
public CommunityProfileOutTopicPublisher(CommunityProfileOutTopicServerConnector outTopicServerConnector, String outTopicName, AuditLog auditLog) Constructor for the publisher.- Parameters:
outTopicServerConnector
- connector to the out topicoutTopicName
- name of the out topicauditLog
- logging destination if anything goes wrong.
-
-
Method Details
-
sendEntityEvent
public void sendEntityEvent(CommunityProfileOutboundEventType eventType, String elementGUID, String elementTypeName, String classificationName, ElementStub elementStub) Send an event that relates to an entity.- Parameters:
eventType
- type of change to the entityelementGUID
- unique identifier for the entityelementTypeName
- type of entityclassificationName
- if a classification has changed this identifies which classificationelementStub
- encoded header of the entity
-
sendRelationshipEvent
public void sendRelationshipEvent(CommunityProfileOutboundEventType eventType, String relationshipGUID, String relationshipTypeName, ElementStub relationshipElementStub, ElementStub endOneElementStub, ElementStub endTwoElementStub) Send an event that relates to a relationship.- Parameters:
eventType
- type of change to the relationshiprelationshipGUID
- unique identifier for the relationshiprelationshipTypeName
- type of relationshiprelationshipElementStub
- encoded header of the relationshipendOneElementStub
- encoded header of the entity at end 1 of the relationshipendTwoElementStub
- encoded header of the entity at end 2 of the relationship
-
sendKarmaPointPlateauEvent
public void sendKarmaPointPlateauEvent(ElementStub profileElementStub, String contributingUserId, boolean isPublic, long pointsTotal, long plateau) Send an event that indicates that a person has achieved a karma point plateau.- Parameters:
profileElementStub
- profile of personcontributingUserId
- the userId that took them to the plateauisPublic
- can this be sent to colleaguespointsTotal
- the number of points that the person has achievedplateau
- the plateau achieved
-
disconnect
public void disconnect()Shutdown the publishing process.
-