OThinker.H3.SNS.ISNSManager

说明:社交管理器

访问入口:this.Engine.SNSManager

示例:

this.Engine.SNSManager.AddPost(new SNS.SNSPost(),string.Empty);

 

方法名称:SetRelationship(OThinker.H3.SNS.SNSRelationship)

方法说明

设置业务对象的关注关系

输入参数

名称

类型

说明

Relationship

OThinker.H3.SNS.SNSRelationship

业务对象的关注关系

返回值

 

方法名称:GetRelationships(System.String,System.String[])

方法说明

获得业务对象的关注关系

输入参数

名称

类型

说明

UserId

System.String

用户ID

SchemaCodes

System.String[]

业务对象模式编码

返回值

业务对象模式关注关系

 

方法名称:AddComment(System.String,System.String,System.String,System.String,System.String,System.String,System.String)

方法说明

添加对象的评论

输入参数

名称

类型

说明

ReplyTo

System.String

要回复的评论的ID

SchemaCode

System.String

业务对象模式编码

BizObjectId

System.String

业务对象ID

BizObjectId

System.String

关联对象ID,如workitemid

UserId

System.String

用户ID

Text

System.String

评论的内容

ObjectID

System.String

前端传递过来的评论唯一ID

返回值

 

方法名称:AddLike(System.String,System.String,System.String,System.String,System.String,System.String)

方法说明

点赞

输入参数

名称

类型

说明

ReplyTo

System.String

要回复的评论的ID

SchemaCode

System.String

业务对象模式编码

BizObjectId

System.String

业务对象ID

BizObjectId

System.String

关联对象ID,如workitemid

UserId

System.String

用户ID

ObjectID

System.String

前端传递过来的评论唯一ID

返回值

 

方法名称:DeleteComment(System.String)

方法说明

删除评论

输入参数

名称

类型

说明

CommentId

System.String

评论的ID

返回值

 

方法名称:AddFeedEvent(OThinker.H3.SNS.FeedEvent)

方法说明

添加新闻事件

输入参数

名称

类型

说明

Event

OThinker.H3.SNS.FeedEvent

新闻事件

返回值

 

方法名称:AddToFavorite(System.String,System.String)

方法说明

将新闻添加到收藏中

输入参数

名称

类型

说明

UserId

System.String

用户ID

FeedId

System.String

新闻ID

返回值

 

方法名称:RemoveFromFavorite(System.String)

方法说明

删除收藏的新闻

输入参数

名称

类型

说明

FavoriteFeedId

System.String

新闻的ID

返回值

 

方法名称:SetSharingItem(System.String,OThinker.H3.SNS.SNSTargetType,System.String,System.String,System.String,System.String,System.Boolean,OThinker.H3.SNS.SNSSharingItemPermissionType,System.String[],System.String[],System.String)

方法说明

将某个对象分享给内部/外部用户

输入参数

名称

类型

说明

Sender

System.String

发送分享的人

TargetType

OThinker.H3.SNS.SNSTargetType

要分享的对象的类型

SchemaCode

System.String

要分享的对象的业务对象模式编码

BizObjectId

System.String

要分享的业务对象的ID

TargetId

System.String

要分享的目标对象的ID,如果是WorkItem,则是WorkItemId

TargetName

System.String

要分享的目标对象的名称

IsPublic

System.Boolean

是否是公开的,如果是公开的话,那么意味着只要用户知道SharingItemId,即可打开相应的表单。如果要发送给外部用户,那么必须是IsPublic=true

Permission

OThinker.H3.SNS.SNSSharingItemPermissionType

要分享的对象的权限

InternalReceivers

System.String[]

内部接收分享的用户

ExternalReceivers

System.String[]

外部接收分享的用户,格式是每个用户的邮箱

Text

System.String

要分享的内容的描述,如果外部接收人员不为空的,则需要填写该字段

返回值

 

方法名称:GetSharingItem(System.String)

方法说明

获得分享的设置

输入参数

名称

类型

说明

SharingItemId

System.String

分享设置的ID

返回值

分享的详细信息

 

方法名称:GetSharingItemBySender(System.String,System.String)

方法说明

根据创建者获得分享设置的信息

输入参数

名称

类型

说明

TargetId

System.String

分享的对象的ID

Sender

System.String

分享的发送者

返回值

分享的设置信息

 

方法名称:CheckSharingItemForInternal(System.String,System.String)

方法说明

验证分享的权限

输入参数

名称

类型

说明

TargetId

System.String

分享的目标对象的ID

Receiver

System.String

接收者的ID

返回值

返回接收者对于该分享项目的权限

 

方法名称:GetSharingItemPermission(System.String,System.String,System.String@)

方法说明

根据业务对象ID获得用户对于这个分享项目的权限,这个验证关系主要通过登录用户自身的权限,这个接口主要是提供给全文搜索的时候使用的,全文搜索的时候,搜索出来相关的业务对象,然后根据业务对象打开相应的有权限的业务对象表单或者工作项表单

输入参数

名称

类型

说明

BizObjectId

System.String

业务对象的ID

Receiver

System.String

接受者

WorkItemId

System.String@

分享一个业务对象有可能是通过BizObjectId,也有可能是通过WorkItemId的,如果是通过WorkItemId的,则找到其中一个WorkItemId,并返回回来

返回值

返回接收者对于该分享项目的权限

 

方法名称:CheckSharingItemForExternal(System.String,System.String,System.String[]@)

方法说明

根据业务对象ID/WorkItemId获得用户对于这个分享项目的权限,这个验证关系主要通过SharingItemId的匹配,这里要求SharingItemId必须匹配,SharingItemId相当于是一个秘钥

输入参数

名称

类型

说明

SharingItemId

System.String

分享的设置的ID,这个ID相当于是一个秘钥,必须匹配才能返回权限,否则返回NoAccess

TargetId

System.String

分享的对象的ID

Receivers

System.String[]@

返回出外部的接收者

返回值

返回接收者对于该分享项目的权限

 

方法名称:GetSharingItemReceivers(System.String)

方法说明

根据业务对象ID,或者所有用权限访问的内部用户的ID

输入参数

名称

类型

说明

BizObjectId

System.String

业务对象ID

返回值

分享的接收者

 

方法名称:DeleteSharingItem(System.String)

方法说明

删除一个分享设置

输入参数

名称

类型

说明

SharingItemId

System.String

分享设置

返回值

 

方法名称:SetFeedState(System.String,System.String,OThinker.H3.SNS.SNSFeedState,System.DateTime)

方法说明

设置动态的状态,可以把一个动态标记为完成或者未完成

输入参数

名称

类型

说明

UserId

System.String


FeedId

System.String


State

OThinker.H3.SNS.SNSFeedState


Deadline

System.DateTime


返回值