@univerjs-pro/collaboration-client v0.5.4
Class: MemberService
Defined in: packages/collaboration-client/src/services/member/member.service.ts:15
This services manages members is each rooms.
Extends
Constructors
new MemberService()
new MemberService(_univerInstanceService, _userManagerService): MemberService
Defined in: packages/collaboration-client/src/services/member/member.service.ts:19
Parameters
Parameter | Type |
---|---|
_univerInstanceService | IUniverInstanceService |
_userManagerService | UserManagerService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
Methods
dispose()
dispose(): void
Defined in: packages/collaboration-client/src/services/member/member.service.ts:116
Returns
void
Overrides
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
getCurrentUser()
getCurrentUser(): Nullable<IUser>
Defined in: packages/collaboration-client/src/services/member/member.service.ts:54
Returns
Nullable
<IUser
>
Deprecated
please use userManagerService
getMember()
getMember(roomID, memberID): undefined | Member
Defined in: packages/collaboration-client/src/services/member/member.service.ts:101
Get a member in a room(unit).
Parameters
Parameter | Type | Description |
---|---|---|
roomID | string | i.e. unitID. |
memberID | string | memberID of the member to be retrieved. |
Returns
undefined
| Member
member object.
getRoom()
getRoom(roomID): undefined | RoomMember
Defined in: packages/collaboration-client/src/services/member/member.service.ts:91
Get RoomMember for a unit.
Parameters
Parameter | Type | Description |
---|---|---|
roomID | string | which is same with unitId. |
Returns
undefined
| RoomMember
RoomMember which is a object that manages members in a single room.
removeMember()
removeMember(roomID, memberID): void
Defined in: packages/collaboration-client/src/services/member/member.service.ts:79
Remove a member from a room(unit).
Parameters
Parameter | Type | Description |
---|---|---|
roomID | string | i.e. unitID. |
memberID | string | memberID of the member to be removed. |
Returns
void
setCurrentUser()
setCurrentUser(user): void
Defined in: packages/collaboration-client/src/services/member/member.service.ts:47
Parameters
Parameter | Type |
---|---|
user | IUser |
Returns
void
Deprecated
please use userManagerService
updateMember()
updateMember(roomID, member): void
Defined in: packages/collaboration-client/src/services/member/member.service.ts:63
Update a member in a room(unit).
Parameters
Parameter | Type | Description |
---|---|---|
roomID | string | i.e. unitID. |
member | Member | member object to be updated. |
Returns
void
waitForRoom$()
waitForRoom$(unitId): Observable<RoomMember>
Defined in: packages/collaboration-client/src/services/member/member.service.ts:32
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Observable
<RoomMember
>