Artifact服务(Service)

interface ArtifactService

Base interface for artifact services.

A filename beginning with user: addresses an artifact shared by every session of the same user; any other filename addresses one belonging to the session named by the SessionKey. Whether a service partitions by SessionKey.appName, what a null SessionKey.id means, and whether it honours the given key at all are implementation-defined; see the implementation.

Inheritors

函数

Link copied to clipboard
abstract suspend fun deleteArtifact(sessionKey: SessionKey, filename: String)

删除一个工件(artifact)。

Link copied to clipboard
abstract suspend fun listArtifactKeys(sessionKey: SessionKey): List<String>

列出当前会话中可见的文件名:包括会话自身生成的文件以及用户创建的文件。 user: ones.

Link copied to clipboard
abstract suspend fun listVersions(sessionKey: SessionKey, filename: String): List<Int>

列出某个软件组件的所有版本(以修订版本号的形式表示)。

Link copied to clipboard
abstract suspend fun loadArtifact(sessionKey: SessionKey, filename: String, version: Int? = null): Part?

获取一个工件(artifact)。

Link copied to clipboard
abstract suspend fun saveAndReloadArtifact(sessionKey: SessionKey, filename: String, artifact: Part): Part

保存一个“artefact”(即某种数据或对象),并在文件数据(fileData)可用时将其一并返回。

Link copied to clipboard
abstract suspend fun saveArtifact(sessionKey: SessionKey, filename: String, artifact: Part): Int

用于保存某个“文物”(即某个具有特殊价值或历史意义的物品)。