Skip to main content

Comment

Represents a comment in a BCF Topic.

Constructors

new Comment()

new Comment(components, text): Comment

Constructs a new BCF Topic Comment instance.

Parameters

ParameterTypeDescription
componentsComponentsThe Components instance.
textstringThe initial comment text.

Returns

Comment

Accessors

comment

get comment(): string

Gets the comment text.

set comment(value): void

Sets the comment text and updates the modified date and author. The author will be the one defined in BCFTopics.config.author

Parameters

ParameterTypeDescription
valuestringThe new comment text.

Returns

string

The comment text.

Methods

serialize()

serialize(): string

Serializes the Comment instance into a BCF compliant XML string.

Returns

string

A string representing the Comment in BCFv2 XML format.