objects classes: enable/dissable methods to builder style
This commit is contained in:
parent
1232d6f378
commit
94ea153a18
@ -59,28 +59,32 @@ public class InputTextMessageContent implements InputMessageContent {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableMarkdown(boolean enable) {
|
public InputTextMessageContent enableMarkdown(boolean enable) {
|
||||||
if (enable) {
|
if (enable) {
|
||||||
this.parseMode = ParseMode.MARKDOWN;
|
this.parseMode = ParseMode.MARKDOWN;
|
||||||
} else {
|
} else {
|
||||||
this.parseMode = null;
|
this.parseMode = null;
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableHtml(boolean enable) {
|
public InputTextMessageContent enableHtml(boolean enable) {
|
||||||
if (enable) {
|
if (enable) {
|
||||||
this.parseMode = ParseMode.HTML;
|
this.parseMode = ParseMode.HTML;
|
||||||
} else {
|
} else {
|
||||||
this.parseMode = null;
|
this.parseMode = null;
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disableWebPagePreview() {
|
public InputTextMessageContent disableWebPagePreview() {
|
||||||
disableWebPagePreview = true;
|
disableWebPagePreview = true;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableWebPagePreview() {
|
public InputTextMessageContent enableWebPagePreview() {
|
||||||
disableWebPagePreview = null;
|
disableWebPagePreview = null;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user