目录

Comment

Class Info

public final class Comment extends GenericJson

File comment model class.

Public Constructor Summary

Constructor Name

Comment()

Constructs a Comment object.

Public Method Summary

Qualifier and Type

Method Name and Description

String

getPosition()

Obtains a file position in JSON format.

Comment

setPosition(String position)

Sets a file position in JSON format.

User

getCreator()

Obtains information about the user who creates a comment.

Comment

setCreator(User creator)

Sets information about the user who creates a comment.

String

getDescription()

Obtains a comment.

Comment

setDescription(String description)

Sets a comment.

com.huawei.cloud.base.util.DateTime

getCreatedTime()

Obtains comment creation time.

Comment

setCreatedTime(com.huawei.cloud.base.util.DateTime createdTime)

Sets comment creation time.

Boolean

getDeleted()

Checks whether a comment is deleted.

Comment

setDeleted(Boolean deleted)

Sets whether a comment is deleted.

String

getHtmlDescription()

Obtains a comment in HTML format.

Comment

setHtmlDescription(String htmlDescription)

Sets a comment in HTML format.

List<Reply>

getReplies()

Obtains all replies to a comment.

Comment

setReplies(List<Reply> replies)

Sets all replies to a comment.

String

getId()

Obtains a comment ID.

Comment

setId(String id)

Sets a comment ID.

String

getCategory()

Obtains the resource type.

Comment

setCategory(String category)

Sets the resource type.

com.huawei.cloud.base.util.DateTime

getEditedTime()

Obtains the last modification time of a comment.

Comment

setEditedTime(com.huawei.cloud.base.util.DateTime editedTime)

Sets the last modification time of a comment.

Comment.QuotedContent

getQuotedContent()

Obtains the content of a commented file.

Comment

setQuotedContent(Comment.QuotedContent quotedContent)

Sets the content of a commented file.

Boolean

getResolved()

Checks whether a comment is resolved by one of its replies.

Comment

setResolved(Boolean resolved)

Sets whether a comment is resolved by one of its replies.

Comment

set(String fieldName, Object value)

Sets a custom attribute and its value.

Comment

clone()

Clones a Comment object.

Public Constructors

[h2]Comment

Constructor

Comment()

Constructs a Comment object.

Public Methods

[h2]getPosition

Method

public String getPosition()

Obtains a file position in JSON format.

Returns

Type

Description

String

File position in JSON format.

[h2]setPosition

Method

public Comment setPosition(String position)

Sets a file position in JSON format.

Parameters

Name

Description

position

File position in JSON format.

Returns

Type

Description

Comment

A Comment object.

[h2]getCreator

Method

public User getCreator()

Obtains information about the user who creates a comment.

Returns

Type

Description

User

Information about the user who creates a comment.

[h2]setCreator

Method

public Comment setCreator(User creator)

Sets information about the user who creates a comment.

Parameters

Name

Description

creator

Information about the user who creates a comment.

Returns

Type

Description

Comment

A Comment object.

[h2]getDescription

Method

public String getDescription()

Obtains a comment.

Returns

Type

Description

String

Comment content.

[h2]setDescription

Method

public Comment setDescription(String description)

Sets a comment.

Parameters

Name

Description

description

Comment content.

Returns

Type

Description

Comment

A Comment object.

[h2]getCreatedTime

Method

public com.huawei.cloud.base.util.DateTime getCreatedTime()

Obtains comment creation time.

Returns

Type

Description

com.huawei.cloud.base.util.DateTime

Time when the comment is created.

[h2]setCreatedTime

Method

public Comment setCreatedTime(com.huawei.cloud.base.util.DateTime createdTime)

Sets comment creation time.

Parameters

Name

Description

createdTime

Time when the comment is created.

Returns

Type

Description

Comment

A Comment object.

[h2]getDeleted

Method

public Boolean getDeleted()

Checks whether a comment is deleted.

Returns

Type

Description

Boolean

Whether a comment is deleted.

[h2]setDeleted

Method

public Comment setDeleted(Boolean deleted)

Sets whether a comment is deleted.

Parameters

Name

Description

deleted

Whether the comment is deleted.

Returns

Type

Description

Comment

A Comment object.

[h2]getHtmlDescription

Method

public String getHtmlDescription()

Obtains a comment in HTML format.

Returns

Type

Description

String

Comment in HTML format.

[h2]setHtmlDescription

Method

public Comment setHtmlDescription(String htmlDescription)

Sets a comment in HTML format.

Parameters

Name

Description

htmlDescription

Comment in HTML format.

Returns

Type

Description

Comment

A Comment object.

[h2]getReplies

Method

public List<Reply> getReplies()

Obtains all replies to a comment.

Returns

Type

Description

List<Reply>

All replies to a comment.

[h2]setReplies

Method

public Comment setReplies(List<Reply> replies)

Sets all replies to a comment.

Parameters

Name

Description

replies

All replies to a comment.

Returns

Type

Description

Comment

A Comment object.

[h2]getId

Method

public String getId()

Obtains a comment ID.

Returns

Type

Description

String

Comment ID.

[h2]setId

Method

public Comment setId(String id)

Sets a comment ID.

Parameters

Name

Description

id

Comment ID.

Returns

Type

Description

Comment

A Comment object.

[h2]getCategory

Method

public String getCategory()

Obtains the resource type.

Returns

Type

Description

String

Resource type.

[h2]setCategory

Method

public Comment setCategory(String category)

Sets the resource type.

Parameters

Name

Description

category

Resource type.

Returns

Type

Description

Comment

A Comment object.

[h2]getEditedTime

Method

public com.huawei.cloud.base.util.DateTime getEditedTime()

Obtains the last modification time of a comment.

Returns

Type

Description

com.huawei.cloud.base.util.DateTime

Last modification time of a comment.

[h2]setEditedTime

Method

public Comment setEditedTime(com.huawei.cloud.base.util.DateTime editedTime)

Sets the last modification time of a comment.

Parameters

Name

Description

editedTime

Last modification time of a comment.

Returns

Type

Description

Comment

A Comment object.

[h2]getQuotedContent

Method

public Comment.QuotedContent getQuotedContent()

Obtains the content of a commented file.

Returns

Type

Description

Comment.QuotedContent

Content of a commented file.

[h2]setQuotedContent

Method

public Comment setQuotedContent(Comment.QuotedContent quotedContent)

Sets the content of a commented file.

Parameters

Name

Description

quotedContent

Content of a commented file.

Returns

Type

Description

Comment

A Comment object.

[h2]getResolved

Method

public Boolean getResolved()

Checks whether a comment is resolved by one of its replies.

Returns

Type

Description

Boolean

Whether a comment is resolved by one of its replies.

[h2]setResolved

Method

public Comment setResolved(Boolean resolved)

Sets whether a comment is resolved by one of its replies.

Parameters

Name

Description

resolved

Whether a comment is resolved by one of its replies.

Returns

Type

Description

Comment

A Comment object.

[h2]set

Method

public Comment set(String fieldName, Object value)

Sets the field name and field value.

Parameters

Name

Description

fieldname

Field name.

value

Field value.

Returns

Type

Description

Comment

A Comment object.

[h2]clone

Method

public Comment clone()

Clones a Comment object.

Returns

Type

Description

Comment

A Comment object.