Attachments 接口

public interface Attachments

此类的实例提供对附件中定义的所有作的访问权限。

方法摘要

修饰符和类型 方法和描述
abstract java.util.concurrent.CompletableFuture<java.io.InputStream> getAttachment(String attachmentId, String viewId)

获取附件。

abstract java.util.concurrent.CompletableFuture<AttachmentInfo> getAttachmentInfo(String attachmentId)

获取附件信息。

default java.lang.String getAttachmentUri(String attachmentId)

获取附件视图的 URI。

abstract java.lang.String getAttachmentUri(String attachmentId, String viewId)

获取附件视图的 URI。

方法详细信息

getAttachment

public abstract CompletableFuture getAttachment(String attachmentId, String viewId)

GetAttachment。 以二进制内容的形式获取命名视图。

参数:

attachmentId - 附件 ID
viewId - 查看 attachmentInfo 中的 ID

返回:

可观测到 InputStream 对象

getAttachmentInfo

public abstract CompletableFuture getAttachmentInfo(String attachmentId)

GetAttachmentInfo。 获取描述附件视图的 AttachmentInfo 结构。

参数:

attachmentId - 附件 ID

返回:

AttachmentInfo 对象的可观测对象

getAttachmentUri

public default String getAttachmentUri(String attachmentId)

获取附件视图的 URI。

参数:

attachmentId - 附件的 ID。

返回:

附件的 URI。

getAttachmentUri

public abstract String getAttachmentUri(String attachmentId, String viewId)

获取附件视图的 URI。

参数:

attachmentId - 附件的 ID。
viewId - 默认值为“original”。

返回:

附件的 URI。

适用于