JAMES-1789 Improve CLI message readability with better case
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/e7271034 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/e7271034 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/e7271034 Branch: refs/heads/master Commit: e7271034b3bf0af767d6aab2c8bd0e296b0f6a0a Parents: 6d57db0 Author: benwa <[email protected]> Authored: Thu Jun 8 22:41:33 2017 +0700 Committer: benwa <[email protected]> Committed: Wed Jun 14 15:01:30 2017 +0700 ---------------------------------------------------------------------- .../java/org/apache/james/cli/type/CmdType.java | 76 ++++++++++---------- .../org/apache/james/cli/type/CmdTypeTest.java | 2 +- 2 files changed, 39 insertions(+), 39 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/e7271034/server/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java ---------------------------------------------------------------------- diff --git a/server/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java b/server/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java index 3876699..ef192a6 100644 --- a/server/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java +++ b/server/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java @@ -22,44 +22,44 @@ package org.apache.james.cli.type; * Enumeration of valid command types. */ public enum CmdType { - ADDUSER("adduser", "username","password"), - REMOVEUSER("removeuser", "username"), - LISTUSERS("listusers"), - ADDDOMAIN("adddomain", "domainname"), - REMOVEDOMAIN("removedomain", "domainname"), - CONTAINSDOMAIN("containsdomain", "domainname"), - LISTDOMAINS("listdomains"), - LISTMAPPINGS("listmappings"), - LISTUSERDOMAINMAPPINGS("listuserdomainmappings", "user","domain"), - ADDADDRESSMAPPING("addaddressmapping", "user","domain", "fromaddress"), - REMOVEADDRESSMAPPING("removeaddressmapping", "user","domain", "fromaddress"), - ADDREGEXMAPPING("addregexmapping", "user","domain", "regex"), - REMOVEREGEXMAPPING("removeregexmapping", "user","domain", "regex"), - SETPASSWORD("setpassword", "username","password"), - COPYMAILBOX("copymailbox", "srcbean","dstbean"), - DELETEUSERMAILBOXES("deleteusermailboxes", "user"), - CREATEMAILBOX("createmailbox", "namespace", "user", "name"), - LISTUSERMAILBOXES("listusermailboxes", "user"), - DELETEMAILBOX("deletemailbox", "namespace", "user", "name"), - GETSTORAGEQUOTA("getstoragequota", "quotaroot"), - GETMESSAGECOUNTQUOTA("getmessagecountquota", "quotaroot"), - GETQUOTAROOT("getquotaroot", "namespace", "user", "name"), - GETMAXSTORAGEQUOTA("getmaxstoragequota", "quotaroot"), - GETMAXMESSAGECOUNTQUOTA("getmaxmessagecountquota", "quotaroot"), - SETMAXSTORAGEQUOTA("setmaxstoragequota", "quotaroot", "max_message_count"), - SETMAXMESSAGECOUNTQUOTA("setmaxmessagecountquota", "quotaroot", "max_storage"), - SETDEFAULTMAXSTORAGEQUOTA("setdefaultmaxstoragequota", "max_storage"), - SETDEFAULTMAXMESSAGECOUNTQUOTA("setdefaultmaxmessagecountquota", "max_message_count"), - GETDEFAULTMAXSTORAGEQUOTA("getdefaultmaxstoragequota"), - GETDEFAULTMAXMESSAGECOUNTQUOTA("getdefaultmaxmessagecountquota"), - REINDEXMAILBOX("reindexmailbox", "namespace", "user", "name"), - REINDEXALL("reindexall"), - GETSIEVEQUOTA("getsievequota"), - SETSIEVEQUOTA("setsievequota", "quota"), - REMOVESIEVEQUOTA("removesievequota"), - GETSIEVEUSERQUOTA("getsieveuserquota", "username"), - SETSIEVEUSERQUOTA("setsieveuserquota", "username", "quota"), - REMOVESIEVEUSERQUOTA("removesieveuserquota", "username"); + ADDUSER("AddUser", "username","password"), + REMOVEUSER("RemoveUser", "username"), + LISTUSERS("ListUsers"), + ADDDOMAIN("AddDomain", "domainName"), + REMOVEDOMAIN("RemoveDomain", "domainName"), + CONTAINSDOMAIN("ContainsDomain", "domainName"), + LISTDOMAINS("ListDomains"), + LISTMAPPINGS("ListMappings"), + LISTUSERDOMAINMAPPINGS("ListUserDomainMappings", "user","domain"), + ADDADDRESSMAPPING("AddAddressMapping", "user","domain", "fromAddress"), + REMOVEADDRESSMAPPING("RemoveAddressMapping", "user","domain", "fromAddress"), + ADDREGEXMAPPING("AddRegexMapping", "user","domain", "regex"), + REMOVEREGEXMAPPING("RemoveRegexMapping", "user","domain", "regex"), + SETPASSWORD("SetPassword", "username","password"), + COPYMAILBOX("CopyMailbox", "srcBean","dstBean"), + DELETEUSERMAILBOXES("DeleteUserMailboxes", "user"), + CREATEMAILBOX("CreateMailbox", "namespace", "user", "name"), + LISTUSERMAILBOXES("ListUserMailboxes", "user"), + DELETEMAILBOX("DeleteMailbox", "namespace", "user", "name"), + GETSTORAGEQUOTA("GetStorageQuota", "quotaroot"), + GETMESSAGECOUNTQUOTA("GetMessageCountQuota", "quotaroot"), + GETQUOTAROOT("GetQuotaroot", "namespace", "user", "name"), + GETMAXSTORAGEQUOTA("GetMaxStorageQuota", "quotaroot"), + GETMAXMESSAGECOUNTQUOTA("GetMaxMessageCountQuota", "quotaroot"), + SETMAXSTORAGEQUOTA("SetMaxStorageQuota", "quotaroot", "max_message_count"), + SETMAXMESSAGECOUNTQUOTA("SetMaxMessageCountQuota", "quotaroot", "max_storage"), + SETDEFAULTMAXSTORAGEQUOTA("SetDefaultMaxStorageQuota", "max_storage"), + SETDEFAULTMAXMESSAGECOUNTQUOTA("SetDefaultMaxMessageCountQuota", "max_message_count"), + GETDEFAULTMAXSTORAGEQUOTA("GetDefaultMaxStorageQuota"), + GETDEFAULTMAXMESSAGECOUNTQUOTA("GetDefaultMaxMessageCountQuota"), + REINDEXMAILBOX("ReindexMailbox", "namespace", "user", "name"), + REINDEXALL("ReindexAll"), + GETSIEVEQUOTA("GetSieveQuota"), + SETSIEVEQUOTA("SetSieveQuota", "quota"), + REMOVESIEVEQUOTA("RemoveSieveQuota"), + GETSIEVEUSERQUOTA("GetSieveUserQuota", "username"), + SETSIEVEUSERQUOTA("SetSieveUserQuota", "username", "quota"), + REMOVESIEVEUSERQUOTA("RemoveSieveUserQuota", "username"); private final String command; private final String[] arguments; http://git-wip-us.apache.org/repos/asf/james-project/blob/e7271034/server/container/cli/src/test/java/org/apache/james/cli/type/CmdTypeTest.java ---------------------------------------------------------------------- diff --git a/server/container/cli/src/test/java/org/apache/james/cli/type/CmdTypeTest.java b/server/container/cli/src/test/java/org/apache/james/cli/type/CmdTypeTest.java index e38a81f..3d66295 100644 --- a/server/container/cli/src/test/java/org/apache/james/cli/type/CmdTypeTest.java +++ b/server/container/cli/src/test/java/org/apache/james/cli/type/CmdTypeTest.java @@ -245,7 +245,7 @@ public class CmdTypeTest { @Test public void usageShouldOutputCommandNamesAndArguments() { - assertThat(CmdType.CREATEMAILBOX.getUsage()).isEqualTo("createmailbox <namespace> <user> <name>"); + assertThat(CmdType.CREATEMAILBOX.getUsage()).isEqualTo("CreateMailbox <namespace> <user> <name>"); } } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
