Tag

public final class Tag

Tag info (rich model).

represents a tag complete Info, and Provides based on When before tag Instance Operation Method. design See com.nexconn.chat.channel.BaseChannel rich model pattern: model Object both holds Data, Also Provides Operation Method, Operation delegates to TagAdapter.

Via Tag.getTags Get Tag Instance after, can directly Call Instance Method perform Operation.

Usage Example:

// Create tag
Tag.createTag(CreateTagParams("tag001", "Important")) { tag, error ->
if (error == null && tag != null) { /* Created successfully */}
}

// 获取所有标签
Tag.getTags { tags, error ->
val tag = tags?.first() ?: return@getTags

// 更新标签名称
tag.update(UpdateTagParams("新名称")) { error -> ... }

// 添加频道到标签
tag.addChannels(listOf(
ChannelIdentifier(ChannelType.DIRECT, "userId1")
)) { error -> ... }

// 获取标签下未读数
tag.getUnreadCount { count, error -> ... }

// 删除标签
tag.delete { error -> ... }
}

Parameters

tagId

标签唯一标识,长度不超过 10 个字

tagName

标签名称,长度不超过 15 个字,名称可以重复

Types

Link copied to clipboard
public class Companion

Properties

Link copied to clipboard
private Integer channelCount

match conversation count

Link copied to clipboard
public final static Tag.Companion Companion
Link copied to clipboard
private Long createTime

create time

Link copied to clipboard
private final String tagId
Link copied to clipboard
private final String tagName

Functions

Link copied to clipboard
public final Unit addChannels(List<ChannelIdentifier> channels, ErrorHandler handler)

Convert channel Add to When before tag.

Link copied to clipboard
public final Unit clearChannels(Boolean deleteLocalMessage, OperationHandler<Boolean> handler)

Clear When before tag all under channel.

Link copied to clipboard
public final Unit clearUnreadCount(OperationHandler<Boolean> handler)

Clear When before tag all under channel message Unread Status.

Link copied to clipboard
public final TagChannelListQuery createChannelListQuery(Integer pageSize)

Create When before tag under Channel list Pagination query object.

Link copied to clipboard
public final Unit delete(ErrorHandler handler)

Delete When before tag.

Link copied to clipboard
public final Unit deleteChannels(List<ChannelIdentifier> channels, ErrorHandler handler)

Convert channel From When before tag Remove.

Link copied to clipboard
public Boolean equals(Object other)
Link copied to clipboard
public final Integer getChannelCount()

match conversation count

Link copied to clipboard
public final Long getCreateTime()

create time

Link copied to clipboard
public final String getTagId()
Link copied to clipboard
public final String getTagName()
Link copied to clipboard
public final Unit getUnreadCount(Boolean containBlocked, OperationHandler<Integer> handler)

Get When before tag under Unread message count.

Link copied to clipboard
public Integer hashCode()
Link copied to clipboard
public final Unit setChannelCount(Integer channelCount)

match conversation count

Link copied to clipboard
public final Unit setCreateTime(Long createTime)

create time

Link copied to clipboard
public String toString()
Link copied to clipboard
public final Unit update(UpdateTagParams params, ErrorHandler handler)

Update When before Tag info.