WITHDRAWN("EMAIL_CHANGE_STATUS_WITHDRAWN"), //NOI18N
/**
- * User has "deleted" the entry. This is not done to keep a history of email changes.
+ * User has "deleted" the entry. This is not done to keep a history of email
+ * changes.
*/
DELETED("EMAIL_CHANGE_STATUS_DELETED"); //NOI18N
* @param messageKey Message key (i18n)
*/
private EmailChangeStatus (final String messageKey) {
+ // Validate parameter
+ if (null == messageKey) {
+ // Throw NPE
+ throw new NullPointerException("messageKey is null"); //NOI18N
+ } else if (messageKey.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("messageKey is empty"); //NOI18N
+ }
+
// Set it here
this.messageKey = messageKey;
}
* @param styleClass CSS style class
*/
private UserAccountStatus (final String messageKey, final String styleClass) {
+ // Validate parameter
+ if (null == messageKey) {
+ // Throw NPE
+ throw new NullPointerException("messageKey is null"); //NOI18N
+ } else if (messageKey.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("messageKey is empty"); //NOI18N
+ } else if (null == styleClass) {
+ // Throw NPE
+ throw new NullPointerException("styleClass is null"); //NOI18N
+ } else if (styleClass.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("styleClass is empty"); //NOI18N
+ }
+
// Set it here
this.messageKey = messageKey;
this.styleClass = styleClass;