From 7ba62eb249f7f2d9f9e3a3edbb5ac7043b8d6540 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 10 Mar 2016 20:21:54 +0100 Subject: [PATCH] added method to enqueue user's email address for changing + updated jar(s) --- lib/juser-lib.jar | Bin 4141 -> 4180 bytes .../jusercore/model/user/UserSessionBean.java | 26 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/lib/juser-lib.jar b/lib/juser-lib.jar index 93248266d4eebd8afd5d1c428b3b196b1de2d19c..985516ffe2939cd31bb9248be244e20ccb985be7 100644 GIT binary patch delta 307 zcmZ3ha7BS9z?+$ci-CcIfx%^5h_eB%U7cf~Zns`$IME=$Ul9SaKjX_j2qa}!% z#%K?st}{A;C}}1;AhkJ~iH{jXXR~rJ^I9#+^5|APa$*ZJ1H+cd4II8)a_kJ!>WAbBHj>%B1EMmZp}by5=Tk<~XLL6r~myyX6--XC&sOr%ry!^^lQ!@@eh@9Tr9g zF$NI^1_mYuaWE;tAPJ<|7#JC(7#IS)8JR?wVa}f%&tnO6|KwRb4j_l!;V}SFe7s;s vd-6JiczwK{AnGQsKZw%e3j$Gfe10J69A7?&vgfZv^T1L5B(@43ptTGDBT-bN delta 268 zcmcbjuvUR5z?+$ci-CcIfgxr7L>^71K}$Vi03s0FvSi5<;w?AY5bLFE_=hD L#1_Z{w3Pt>fe%S| diff --git a/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java index fe4e633..8403e61 100644 --- a/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java @@ -288,6 +288,32 @@ public class UserSessionBean extends BaseDatabaseBean implements UserSessionBean return true; } + @Override + public void enqueueEmailAddressForChange (final User user) { + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("enqueueEmailAddressForChange: user={0} - CALLED!", user)); + + // user should not be null + if (null == user) { + // Abort here + throw new NullPointerException("user is null"); //NOI18N + } else if (user.getUserId() == null) { + // Throw NPE again + throw new NullPointerException("user.userId is null"); //NOI18N + } else if (user.getUserId() < 1) { + // Not valid + throw new IllegalArgumentException(MessageFormat.format("user.userId={0} is not valid.", user.getUserId())); //NOI18N + } else if (user.getUserAccountStatus() == null) { + // Throw NPE again + throw new NullPointerException("user.userAccountStatus is null"); //NOI18N + } else if (!this.ifUserIdExists(user.getUserId())) { + // User does not exist + throw new PersistenceException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N + } + + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + @Override public void updateEmailAddress (final User user) { // Trace message -- 2.39.5