@univerjs/thread-comment v0.4.2 • Docs
Class: ThreadCommentDataSourceService
Preserve for import async comment system
Extends
Implements
Constructors
new ThreadCommentDataSourceService()
new ThreadCommentDataSourceService(): ThreadCommentDataSourceService
Returns
ThreadCommentDataSourceService
Overrides
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:94 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
---|---|---|---|---|---|---|
_disposed | protected | boolean | false | - | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
syncUpdateMutationToColla | public | boolean | true | should sync update mutations to collaboration-server | - | packages/thread-comment/src/services/tc-datasource.service.ts:84 (opens in a new tab) |
Accessors
dataSource
get dataSource(): Nullable<IThreadCommentDataSource>
set dataSource(dataSource): void
Parameters
Parameter | Type |
---|---|
dataSource | Nullable <IThreadCommentDataSource > |
Returns
Nullable
<IThreadCommentDataSource
>
Implementation of
IThreadCommentDataSourceService
.dataSource
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:90 (opens in a new tab)
Methods
addComment()
addComment(comment): Promise<IThreadComment>
handler for add-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<IThreadComment
>
Implementation of
IThreadCommentDataSourceService
.addComment
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:107 (opens in a new tab)
deleteComment()
deleteComment(
unitId,
subUnitId,
threadId,
commentId): Promise<boolean>
handler for delete-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadId | string |
commentId | string |
Returns
Promise
<boolean
>
Implementation of
IThreadCommentDataSourceService
.deleteComment
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:128 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getThreadComment()
getThreadComment(
unitId,
subUnitId,
threadId): Promise<Nullable<IBaseComment>>
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadId | string |
Returns
Promise
<Nullable
<IBaseComment
>>
Implementation of
IThreadCommentDataSourceService
.getThreadComment
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:98 (opens in a new tab)
listThreadComments()
listThreadComments(
unitId,
subUnitId,
threadIds): Promise<false | IBaseComment[]>
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
threadIds | string [] |
Returns
Promise
<false
| IBaseComment
[]>
Implementation of
IThreadCommentDataSourceService
.listThreadComments
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:135 (opens in a new tab)
resolveComment()
resolveComment(comment): Promise<boolean>
handler for resolve-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<boolean
>
Implementation of
IThreadCommentDataSourceService
.resolveComment
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:121 (opens in a new tab)
saveToSnapshot()
saveToSnapshot(unitComments, unitId): Record<string, ThreadCommentJSON[]>
Parameters
Parameter | Type |
---|---|
unitComments | Record <string , IThreadComment []> |
unitId | string |
Returns
Record
<string
, ThreadCommentJSON
[]>
Implementation of
IThreadCommentDataSourceService
.saveToSnapshot
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:143 (opens in a new tab)
updateComment()
updateComment(comment): Promise<boolean>
handler for update-comment, throw error means fail and stop the process.
Parameters
Parameter | Type |
---|---|
comment | IThreadComment |
Returns
Promise
<boolean
>
Implementation of
IThreadCommentDataSourceService
.updateComment
Defined in
packages/thread-comment/src/services/tc-datasource.service.ts:114 (opens in a new tab)