From c927c9d072cfd9df2eea81d078efbe4458438026 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Sun, 3 Nov 2024 20:46:07 +0200 Subject: [PATCH] add toString() to DTOs --- .../PasswordResetTokenManager.java | 9 +++++++ .../admin/PasswordResetSettingsServlet.java | 26 +++++++++++++++++++ .../PasswordResetChangePasswordServlet.java | 8 ++++++ .../client/PasswordResetSendEmailServlet.java | 10 +++++++ 4 files changed, 53 insertions(+) diff --git a/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/PasswordResetTokenManager.java b/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/PasswordResetTokenManager.java index 48e1171..7d94fdf 100644 --- a/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/PasswordResetTokenManager.java +++ b/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/PasswordResetTokenManager.java @@ -191,5 +191,14 @@ public String getSourceAddress() { public Date getExpires() { return this.expires; } + + @Override + public String toString() { + return "ResetRequest{" + + "userId='" + userId + '\'' + + ", sourceAddress='" + sourceAddress + '\'' + + ", expires=" + expires + + '}'; + } } } diff --git a/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/admin/PasswordResetSettingsServlet.java b/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/admin/PasswordResetSettingsServlet.java index a527f00..69d9fdf 100644 --- a/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/admin/PasswordResetSettingsServlet.java +++ b/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/admin/PasswordResetSettingsServlet.java @@ -421,5 +421,31 @@ public List getResetRequests() { return this.resetRequests; } + @Override + public String toString() { + return "Dto{" + + "notSupported=" + notSupported + + ", enabled=" + enabled + + ", server='" + server + '\'' + + ", serverError='" + serverError + '\'' + + ", senderName='" + senderName + '\'' + + ", senderNameError='" + senderNameError + '\'' + + ", senderAddress='" + senderAddress + '\'' + + ", senderAddressError='" + senderAddressError + '\'' + + ", subject='" + subject + '\'' + + ", subjectError='" + subjectError + '\'' + + ", body='" + body + '\'' + + ", bodyError='" + bodyError + '\'' + + ", expiryCount='" + expiryCount + '\'' + + ", expiryPeriod='" + expiryPeriod + '\'' + + ", expiryError='" + expiryError + '\'' + + ", minLength='" + minLength + '\'' + + ", minLengthError='" + minLengthError + '\'' + + ", maxLength='" + maxLength + '\'' + + ", maxLengthError='" + maxLengthError + '\'' + + ", valid=" + valid + + ", resetRequests=" + resetRequests + + '}'; + } } } diff --git a/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/client/PasswordResetChangePasswordServlet.java b/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/client/PasswordResetChangePasswordServlet.java index 0e70ac0..df42e98 100644 --- a/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/client/PasswordResetChangePasswordServlet.java +++ b/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/client/PasswordResetChangePasswordServlet.java @@ -197,5 +197,13 @@ public boolean isValid() { return this.valid; } + @Override + public String toString() { + return "Form{" + + "userId='" + userId + '\'' + + ", token='" + token + '\'' + + ", valid=" + valid + + '}'; + } } } diff --git a/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/client/PasswordResetSendEmailServlet.java b/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/client/PasswordResetSendEmailServlet.java index 321a4c9..bb782a5 100644 --- a/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/client/PasswordResetSendEmailServlet.java +++ b/src/main/java/org/jivesoftware/openfire/plugin/passwordreset/servlet/client/PasswordResetSendEmailServlet.java @@ -220,6 +220,16 @@ public void setEmailSent(boolean emailSent) { this.emailSent = emailSent; } + @Override + public String toString() { + return "Form{" + + "enabled=" + enabled + + ", user='" + user + '\'' + + ", userError='" + userError + '\'' + + ", emailSent=" + emailSent + + ", valid=" + valid + + '}'; + } } }