[Refactor] Canonical enum naming (#7676)

* [Refactor] Refactor comments
dailidong-patch-1
springmonster 2021-12-28 19:07:53 +08:00 committed by GitHub
parent 3af4d765c2
commit 2b05ebf47e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -29,7 +29,7 @@ public enum ShowType {
TABLE(0, "table"),
TEXT(1, "text"),
ATTACHMENT(2, "attachment"),
TABLEATTACHMENT(3, "table attachment");
TABLE_ATTACHMENT(3, "table attachment");
private final int code;
private final String descp;

View File

@ -111,7 +111,7 @@ public final class EmailAlertChannelFactory implements AlertChannelFactory {
.addParamsOptions(new ParamsOptions(ShowType.TABLE.getDescp(), ShowType.TABLE.getDescp(), false))
.addParamsOptions(new ParamsOptions(ShowType.TEXT.getDescp(), ShowType.TEXT.getDescp(), false))
.addParamsOptions(new ParamsOptions(ShowType.ATTACHMENT.getDescp(), ShowType.ATTACHMENT.getDescp(), false))
.addParamsOptions(new ParamsOptions(ShowType.TABLEATTACHMENT.getDescp(), ShowType.TABLEATTACHMENT.getDescp(), false))
.addParamsOptions(new ParamsOptions(ShowType.TABLE_ATTACHMENT.getDescp(), ShowType.TABLE_ATTACHMENT.getDescp(), false))
.setValue(ShowType.TABLE.getDescp())
.addValidate(Validate.newBuilder().setRequired(true).build())
.build();

View File

@ -187,7 +187,7 @@ public final class MailSender {
} catch (Exception e) {
handleException(alertResult, e);
}
} else if (showType.equals(ShowType.ATTACHMENT.getDescp()) || showType.equals(ShowType.TABLEATTACHMENT.getDescp())) {
} else if (showType.equals(ShowType.ATTACHMENT.getDescp()) || showType.equals(ShowType.TABLE_ATTACHMENT.getDescp())) {
try {
String partContent = (showType.equals(ShowType.ATTACHMENT.getDescp())

View File

@ -132,7 +132,7 @@ public class EmailAlertChannelTest {
emailShowTypeList.add(new ParamsOptions(ShowType.TABLE.getDescp(), ShowType.TABLE.getDescp(), false));
emailShowTypeList.add(new ParamsOptions(ShowType.TEXT.getDescp(), ShowType.TEXT.getDescp(), false));
emailShowTypeList.add(new ParamsOptions(ShowType.ATTACHMENT.getDescp(), ShowType.ATTACHMENT.getDescp(), false));
emailShowTypeList.add(new ParamsOptions(ShowType.TABLEATTACHMENT.getDescp(), ShowType.TABLEATTACHMENT.getDescp(), false));
emailShowTypeList.add(new ParamsOptions(ShowType.TABLE_ATTACHMENT.getDescp(), ShowType.TABLE_ATTACHMENT.getDescp(), false));
RadioParam showType = RadioParam.newBuilder(AlertConstants.NAME_SHOW_TYPE, "showType")
.setOptions(emailShowTypeList)
.setValue(ShowType.TABLE.getDescp())

View File

@ -124,7 +124,7 @@ public class MailUtilsTest {
@Test
public void testTableAttachmentFile() throws Exception {
String content = list2String();
emailConfig.put(AlertConstants.NAME_SHOW_TYPE, ShowType.TABLEATTACHMENT.getDescp());
emailConfig.put(AlertConstants.NAME_SHOW_TYPE, ShowType.TABLE_ATTACHMENT.getDescp());
mailSender = new MailSender(emailConfig);
mailSender.sendMails("gaojing", content);
}

View File

@ -166,7 +166,7 @@ public class ExecutorController extends BaseController {
}
/**
* check process definition and all of the son process definitions is on line.
* check process definition and all the son process definitions is online.
*
* @param processDefinitionCode process definition code
* @return check result code