/**
* Adds country to all relevant beans and sends it to the EJB. A redirect
- * should happen after successfull creation.
+ * should happen after successful creation.
* <p>
* @todo Add field validation
*/
public void addCountry () {
// Create new country object
- final Country country = new CountryData();
-
- // Add all data
- country.setCountryAbroadDialPrefix(this.getCountryAbroadDialPrefix());
- country.setCountryCode(this.getCountryCode());
- country.setCountryExternalDialPrefix(this.getCountryExternalDialPrefix());
- country.setCountryI18nKey(this.getCountryI18nKey());
- country.setCountryIsLocalPrefixRequired(this.getCountryIsLocalPrefixRequired());
- country.setCountryPhoneCode(this.getCountryPhoneCode());
+ final Country country = new CountryData(
+ this.getCountryAbroadDialPrefix(),
+ this.getCountryCode(),
+ this.getCountryExternalDialPrefix(),
+ this.getCountryI18nKey(),
+ this.getCountryIsLocalPrefixRequired(),
+ this.getCountryPhoneCode()
+ );
// Does it already exist?
if (this.isCountryAdded(country)) {
*/
package org.mxchange.jfinancials.beans.features;
-import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
super();
}
- /**
- * Post-construction method
- */
- @PostConstruct
- public void initializeList () {
- }
-
@Override
public boolean isFeatureEnabled (final String feature) {
// The parameter must be set
final User user = event.getCreatedUser();
// Set all fields here
- this.copyUser(user);
+ this.copyToUser(user);
}
/**
final User user = event.getLoggedInUser();
// Copy all data to this bean
- this.copyUser(user);
+ this.copyToUser(user);
}
/**
final User registeredUser = event.getRegisteredUser();
// Copy all data from registered->user
- this.copyUser(registeredUser);
+ this.copyToUser(registeredUser);
// Set user id again
this.setUserId(registeredUser.getUserId());
* <p>
* @param user User instance
*/
- private void copyUser (final User user) {
+ private void copyToUser (final User user) {
// Copy all fields:
// - base data
this.setUserId(user.getUserId());