Roland Häder [Tue, 23 Aug 2016 13:03:00 +0000 (15:03 +0200)]
Please cherry-pick:
- copy all data from detached to managed instance before updating it
- this needs to be done before the updated timestamp is being set to make sure it is not overwritten by old value (as copyAll() may do it)
Roland Häder [Tue, 23 Aug 2016 12:13:53 +0000 (14:13 +0200)]
Please cherry-pick:
- implemented business methods for deleting/updating fax/land-line numbers
- better this way: managedBla = em.find(Bla.class, bla.getBlaId()); and then managedBla.setBlaSomeFoo(someFooValue);
Roland Häder [Tue, 23 Aug 2016 09:33:14 +0000 (11:33 +0200)]
Please cherry-pick:
- detachAllContactPhoneEntries() was a bad idea, beter do it the old way.
- The returned instance was a managed instance that have been updated. First find it with find() then you have a managed instanced. Now simply update the fields you want and you are done.
Roland Häder [Thu, 18 Aug 2016 15:05:12 +0000 (17:05 +0200)]
Continued a bit: (please cherry-pick)
- implemented missing methods
- these include a lot tests and are currently untested (may not work)
- some to specific exceptions has been replaced by a more generic exception (which is fine here)
Roland Häder [Tue, 16 Aug 2016 14:30:20 +0000 (16:30 +0200)]
Continued a bit: (please cherry-pick)
- implemented business methods findFaxNumberById() and findLandLineNumberById()
- sorted members
- fixed log message: cellphone -> mobile again and always use "number" suffix
Roland Häder [Thu, 11 Aug 2016 10:30:39 +0000 (12:30 +0200)]
Continued with lock/unlock user accounts: (please cherry-pick)
- return detached and updated user instance on locking/unlocking
- update data in found instance and then merge it? A bit confusing ...
Roland Häder [Wed, 10 Aug 2016 12:53:58 +0000 (14:53 +0200)]
Fixed: (please cherry-pick)
- em.remove() needs a managed entity, not a one passed from e.g. a controller
- still this method may throw an exception, e.g. when an other entity (table) references this entity
- but since deleteCellphoneNumber() *should* delete cell phone numbers, it doesn't care if the entity is still referenced.
- this needs to be taken care of the controller and not the EJB (job-executor)
Roland Häder [Wed, 10 Aug 2016 11:05:22 +0000 (13:05 +0200)]
Rewrite continued: (please cherry-pick)
- moved business methods to proper EJB as they are not contact-related but "phone-generic" enough. Maybe still mail notifications can be added to them.
Roland Häder [Mon, 8 Aug 2016 14:27:05 +0000 (16:27 +0200)]
Continued: (please cherry-pick)
- implemented allSomeNumbers() methods
- used MessageFormat
- ignored strings for i18n
- exposed list to method body to have it being logged in trace message
Signed-off-by: Roland Häder <roland@haeder.net> Signed-off-by: Roland Häder <roland@mxchange.org>
Roland Häder [Fri, 5 Aug 2016 10:45:14 +0000 (12:45 +0200)]
Continued with splitting EJB: (please cherry-pick)
- splitted user bean into general (old) and administrative user bean. This allows more distribution and not centralization of all business methods on one (then later even monolithic) EJB
- requires juser-lib.jar to be updated
Signed-off-by: Roland Häder <roland@haeder.net> Signed-off-by: Roland Häder <roland@mxchange.org>
Roland Häder [Thu, 4 Aug 2016 09:50:46 +0000 (11:50 +0200)]
Fixed: (please cherry-pick)
- wrong check, opps, copy-paste mistake: user.userId must be valid set
as the user is going to be linked with password history entry.
Roland Häder [Wed, 3 Aug 2016 08:27:47 +0000 (10:27 +0200)]
Please cherry-pick / fix Copyright:
- added EJB for fetching user's full password history
- this EJB implementes the corresponding (newly added) remote interface
Roland Häder [Wed, 18 May 2016 09:01:48 +0000 (11:01 +0200)]
Continued a bit:
- renamed to have project name in it
- sending out mails over a message-driven bean is an asynchronous approach and will keep the other EJBs running fast
- use class, not interface everywhere
Roland Häder [Tue, 17 May 2016 15:37:29 +0000 (17:37 +0200)]
Continued with rewrites, fixes:
- used Base<Project-Name>DatabaseBean where possible
- use new sendEmail() which prepares the wrapper instance and then sending it
- the message object is now no longer created here as the Base<Project>DatabaseBean does it
- resendConfirmationLink() almost finished: changing confirmation key + merging database is unfinished
Roland Häder [Tue, 17 May 2016 13:35:48 +0000 (15:35 +0200)]
Continued:
- added message-driven bean for mail delivery (generic)
- added method init() method to initialize queue/factory
- implemented business method resendConfirmationLink() (unfinished)
- the business method enqueueEmailAddressForChange() now uses JMS and not directly calling the mailer