A single action taken on a social media post, such as a like, comment or share, imported into Kademi so it can be attributed to a profile. Interactions are imported from a provider and identified by the source and a uniqueId from that source, which is what stops the same interaction being imported twice. The social account that acted is held as a signature, and where that signature can be resolved through a SignatureCredential the profile is filled in as well; interactions whose signature cannot be matched stay unattributed. Where the post relates to a piece of Kademi content, the website and path of that content are recorded too.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| adminDomain | Organisation | The account this interaction was imported into. Never null. |
| commentText | String | Text the user wrote, for interaction types that carry one such as a comment. |
| id | Long | Database identifier for this interaction. |
| interactionDate | Date | When the interaction happened. Some sources do not give an exact time, in which case this is the importer's best estimate. Never null. |
| interactionType | String | What kind of interaction this was, for example share, comment or like. The exact set of values depends on the source that produced it. Never null. |
| profile | Profile | The Kademi profile the interaction was attributed to, resolved from the signature at import time. Null when the social account could not be matched to a profile, which is common. |
| relatedContentHref | String | Path within the related content website of the Kademi content item the social post was about. |
| relatedContentWebsite | Website | The Kademi website holding the content item the social post was about, where the post can be traced back to one. |
| signature | String | Identifies the social media account that made the interaction, in whatever form the source uses. The import tries to resolve it against a SignatureCredential to find the matching profile. Never null. |
| socialPostHref | String | Path component of the URL of the social media post that was interacted with. Only the path is stored, not the host. |
| source | String | The social media provider the interaction came from, using the same source values as SignatureCredential so the two can be matched. Never null. |
| uniqueId | String | Identifier for this interaction within the social media source, used to stop the same interaction being imported twice. Looked up together with the account, so it need only be unique within one account. Never null. |
Methods
getId() · setId(Long id) · getUniqueId() · setUniqueId(String uniqueId) · getAdminDomain() · setAdminDomain(Organisation adminDomain) · getSignature() · setSignature(String signature) · getProfile() · setProfile(Profile profile) · getInteractionType() · setInteractionType(String interactionType) · getSource() · setSource(String source) · getInteractionDate() · setInteractionDate(Date interactionDate) · getCommentText() · setCommentText(String commentText) · getSocialPostHref() · setSocialPostHref(String socialPostHref) · getRelatedContentWebsite() · setRelatedContentWebsite(Website relatedContentWebsite) · getRelatedContentHref() · setRelatedContentHref(String relatedContentHref)
getId()
Returns: Long
Database identifier for this interaction.
setId(Long id)
Returns: void
Sets the database identifier. Normally only assigned by the persistence layer.
| Parameter | Description |
|---|---|
id | the primary key to assign |
getUniqueId()
Returns: String
Identifier for this interaction within the social media source, used to stop the same interaction being imported twice. Looked up together with the account, so it need only be unique within one account. Never null.
setUniqueId(String uniqueId)
Returns: void
Sets the source's identifier for this interaction. Required, and it must be stable across imports for the duplicate check to work.
| Parameter | Description |
|---|---|
uniqueId | the source's identifier for the interaction |
getAdminDomain()
Returns: Organisation
The account this interaction was imported into. Never null.
setAdminDomain(Organisation adminDomain)
Returns: void
Sets the account this interaction belongs to. Required.
| Parameter | Description |
|---|---|
adminDomain | the admin organisation the interaction belongs to |
getSignature()
Returns: String
Identifies the social media account that made the interaction, in whatever form the source uses. The import tries to resolve it against a SignatureCredential to find the matching profile. Never null.
setSignature(String signature)
Returns: void
Sets the identifier of the social media account that made the interaction. Required.
| Parameter | Description |
|---|---|
signature | the social account signature |
getProfile()
Returns: Profile
The Kademi profile the interaction was attributed to, resolved from the signature at import time. Null when the social account could not be matched to a profile, which is common.
setProfile(Profile profile)
Returns: void
Sets the profile the interaction is attributed to.
| Parameter | Description |
|---|---|
profile | the attributed profile, or null if it could not be resolved |
getInteractionType()
Returns: String
What kind of interaction this was, for example share, comment or like. The exact set of values depends on the source that produced it. Never null.
setInteractionType(String interactionType)
Returns: void
Sets the kind of interaction, for example share, comment or like. Required.
| Parameter | Description |
|---|---|
interactionType | the interaction type |
getSource()
Returns: String
The social media provider the interaction came from, using the same source values as SignatureCredential so the two can be matched. Never null.
setSource(String source)
Returns: void
Sets the social media provider the interaction came from. Required, and it must use the same value as the matching SignatureCredential.
| Parameter | Description |
|---|---|
source | the source provider name |
getInteractionDate()
Returns: Date
When the interaction happened. Some sources do not give an exact time, in which case this is the importer's best estimate. Never null.
setInteractionDate(Date interactionDate)
Returns: void
Sets when the interaction happened. Required.
| Parameter | Description |
|---|---|
interactionDate | the date and time of the interaction |
getCommentText()
Returns: String
Text the user wrote, for interaction types that carry one such as a comment.
setCommentText(String commentText)
Returns: void
Sets the text the user wrote as part of the interaction.
| Parameter | Description |
|---|---|
commentText | the comment text |
getSocialPostHref()
Returns: String
Path component of the URL of the social media post that was interacted with. Only the path is stored, not the host.
setSocialPostHref(String socialPostHref)
Returns: void
Sets the path component of the social media post's URL.
| Parameter | Description |
|---|---|
socialPostHref | the path of the social post |
getRelatedContentWebsite()
Returns: Website
The Kademi website holding the content item the social post was about, where the post can be traced back to one.
setRelatedContentWebsite(Website relatedContentWebsite)
Returns: void
Sets the Kademi website holding the content the social post relates to.
| Parameter | Description |
|---|---|
relatedContentWebsite | the related content's website |
getRelatedContentHref()
Returns: String
Path within the related content website of the Kademi content item the social post was about.
setRelatedContentHref(String relatedContentHref)
Returns: void
Sets the path within the related content website of the Kademi content the post relates to.
| Parameter | Description |
|---|---|
relatedContentHref | the path of the related content |