assignType

abstract suspend fun assignType(node: NodeRef, type: String?)(source)

Sets the type of the object node to type, or removes it with null; returns once the change is acknowledged (SPEC.md §6.1). Assigning the type the object already has changes nothing.

Throws DocumentNotFoundException when the document doesn't exist or isn't visible, IllegalArgumentException when the node doesn't exist or isn't an object, and InvalidTypeNameException for an invalid name.