/**
* Returns a detached instance from given mobile instance
* <p>
- * @param mobileNumber Mobile instance
+ * @param mobileNumber Mobile instance
* @param fetchedNumber Found mobile number in database
* <p>
* @return Detached instance
* Returns a detached instance from given land-line instance
* <p>
* @param landLineNumber Land-line instance
- * @param fetchedNumber Found land-line number in database
+ * @param fetchedNumber Found land-line number in database
* <p>
* @return Detached instance
*/
/**
* Returns a detached instance from given fax instance
* <p>
- * @param faxNumber Fax instance
+ * @param faxNumber Fax instance
* @param fetchedNumber Found fax number in database
* <p>
* @return Detached instance
* Sends an email with given subject line, template name to given recipient
* and user data
* <p>
- * @param subjectLine Subject line
- * @param templateName Template name
- * @param emailAddress Recipient's email address
- * @param user User instance
- * @param baseUrl Base URL
+ * @param subjectLine Subject line
+ * @param templateName Template name
+ * @param emailAddress Recipient's email address
+ * @param user User instance
+ * @param baseUrl Base URL
+ * @param randomPassword A randomly-generated password or NULL if user had
+ * to enter it.
*/
- protected void sendEmail (final String subjectLine, final String templateName, final Address emailAddress, final User user, final String baseUrl) {
+ protected void sendEmail (final String subjectLine, final String templateName, final Address emailAddress, final User user, final String baseUrl, final String randomPassword) {
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("sendEmail: subjectLine={0},templateName={1},emailAddress={2},user={3},baseUrl={4} - CALLED!", subjectLine, templateName, emailAddress, user, baseUrl)); //NOI18N
} else if (null == emailAddress) {
// Throw NPE
throw new NullPointerException("emailAddress is null"); //NOI18N
- }else if (null == user) {
+ } else if (null == user) {
// Throw NPE
throw new NullPointerException("user is null"); //NOI18N
} else if (user.getUserId() == null) {
// Set all values
Properties variables = UserUtils.getAllUserFields(user);
- // Set base URL
+ // Set base URL and random password
variables.put("baseUrl", baseUrl); //NOI18N
+ variables.put("randomPassword", randomPassword); //NOI18N
// Set all
// @TODO Language from message bundle
* should be the same.
* <p>
* @param contact Contact to set instances
- * @param other Other contact to get instances from
+ * @param other Other contact to get instances from
*/
protected void setAllContactPhoneEntries (final Contact contact, final Contact other) {
// Trace message
/**
* Updates all contact's phone entry's updated timestamps
* <p>
- * @param contact Contact instance to update
- * @param isMobileUnlinked Whether a mobile entry has been unlinked in
- * contact instance
+ * @param contact Contact instance to update
+ * @param isMobileUnlinked Whether a mobile entry has been unlinked in
+ * contact instance
* @param isLandlineUnlinked Whether a land-line entry has been unlinked in
- * contact instance
- * @param isFaxUnlinked Whether a fax entry has been unlinked in contact
- * instance
+ * contact instance
+ * @param isFaxUnlinked Whether a fax entry has been unlinked in
+ * contact instance
*/
protected void setAllContactPhoneEntriesUpdated (final Contact contact, final boolean isMobileUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked) {
// Trace message