ArtifactService

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

Functions

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

Deletes an artifact.

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

Lists the filenames visible to a session: its own artifacts plus the user's user: ones.

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

Lists all the versions (as revision IDs) of an artifact.

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

Gets an artifact.

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

Saves an artifact and returns it with fileData if available.

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

Saves an artifact.