return (!this.usersAddressbooks.isEmpty());
}
+ /**
+ * Post-initialization of this class
+ */
@PostConstruct
public void init () {
// Init list
return Collections.unmodifiableList(this.countryList);
}
+ /**
+ * Post-initialization of this class
+ */
@PostConstruct
public void init () {
this.countryList = this.countryBean.allCountries();
this.shareeUserId = shareeUserId;
}
+ /**
+ * Post-initialization of this class
+ */
@PostConstruct
public void init () {
}
return Collections.unmodifiableList(this.cellphoneList);
}
+ /**
+ * Post-initialization of this class
+ */
@PostConstruct
public void init () {
this.cellphoneList = this.cellphoneBean.allSmsProvider();
*/
private Short houseNumber;
+ /**
+ * Login bean (controller)
+ */
+ @Inject
+ private UserLoginWebSessionController loginController;
+
/**
* Phone number area code
*/
*/
private ProfileMode userProfileMode;
- /**
- * ZIP code
- */
- private Integer zipCode;
-
/**
* A list of all public user profiles
*/
private List<User> visibleUserList;
/**
- * Login bean (controller)
+ * ZIP code
*/
- @Inject
- private UserLoginWebSessionController loginController;
+ private Integer zipCode;
/**
* Default constructor
}
}
- @Override
- public void afterUserLogin (final @Observes UserLoggedInEvent event) {
- // Trace message
- System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
-
- // event should not be null
- if (null == event) {
- // Throw NPE
- throw new NullPointerException("event is null"); //NOI18N
- } else if (event.getUser() == null) {
- // Throw NPE again
- throw new NullPointerException("event.user is null"); //NOI18N
- } else if (event.getUser().getUserId() == null) {
- // userId is null
- throw new NullPointerException("event.user.userId is null"); //NOI18N
- } else if (event.getUser().getUserId() < 1) {
- // Not avalid id
- throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUser(), event.getUser().getUserId())); //NOI18N
- }
-
- // Re-initialize list
- this.visibleUserList = this.userBean.allMemberPublicVisibleUsers();
-
- // Trace message
- System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: this.visibleUserList.size()={0} - EXIT!", this.visibleUserList.size())); //NOI18N
- }
@Override
public void afterRegistrationEvent (final @Observes UserRegisteredEvent event) {
System.out.println("UserWebBean:afterRegistration: EXIT!"); //NOI18N
}
+ @Override
+ public void afterUserLogin (final @Observes UserLoggedInEvent event) {
+ // Trace message
+ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
+
+ // event should not be null
+ if (null == event) {
+ // Throw NPE
+ throw new NullPointerException("event is null"); //NOI18N
+ } else if (event.getUser() == null) {
+ // Throw NPE again
+ throw new NullPointerException("event.user is null"); //NOI18N
+ } else if (event.getUser().getUserId() == null) {
+ // userId is null
+ throw new NullPointerException("event.user.userId is null"); //NOI18N
+ } else if (event.getUser().getUserId() < 1) {
+ // Not avalid id
+ throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUser(), event.getUser().getUserId())); //NOI18N
+ }
+
+ // Re-initialize list
+ this.visibleUserList = this.userBean.allMemberPublicVisibleUsers();
+
+ // Trace message
+ System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: this.visibleUserList.size()={0} - EXIT!", this.visibleUserList.size())); //NOI18N
+ }
+
@Override
public List<User> allVisibleUsers () {
// Return it
this.zipCode = zipCode;
}
+ /**
+ * Post-initialization of this class
+ */
@PostConstruct
public void init () {
// Get full user name list for reducing EJB calls
return (Objects.equals(this.getUserPassword(), this.getUserPasswordRepeat()));
}
+ @Override
+ public boolean isUserIdEmpty () {
+ return ((this.getUserId() == null) || (this.getUserId() == 0));
+ }
+
@Override
public boolean isUserNameRegistered (final User user) {
return ((this.userNameList instanceof List) && (this.userNameList.contains(user.getUserName())));
this.setBirthday(user.getUserContact().getContactBirthday());
this.setComment(user.getUserContact().getContactComment());
}
-
- @Override
- public boolean isUserIdEmpty () {
- return ((this.getUserId() == null) || (this.getUserId() == 0));
- }
}
@Log
private LoggerBeanLocal loggerBeanLocal;
+ /**
+ * Initialization of this converter
+ */
+ public CountryConverter () {
+ // Try to get it
+ try {
+ // Get initial context
+ Context context = new InitialContext();
+
+ // Lookup logger
+ this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+ // ... and country controller
+ this.countryController = (AddressbookCountrySingletonBeanRemote) context.lookup("java:global/addressbook-ejb/country!org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote"); //NOI18N
+ } catch (final NamingException ex) {
+ // Continue to throw it
+ throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+ }
+ }
+
@Override
public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
// Trace message
// Return category id
return String.valueOf(((Country) value).getCountryId());
}
-
- /**
- * Initialization of this converter
- */
- public CountryConverter () {
- // Try to get it
- try {
- // Get initial context
- Context context = new InitialContext();
-
- // Lookup logger
- this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
-
- // ... and country controller
- this.countryController = (AddressbookCountrySingletonBeanRemote) context.lookup("java:global/addressbook-ejb/country!org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote"); //NOI18N
- } catch (final NamingException ex) {
- // Continue to throw it
- throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
- }
- }
}
*/
private AddressbookSmsProviderSingletonBeanRemote providerController;
+ /**
+ * Initialization of this converter
+ */
+ public SmsProviderConverter () {
+ // Try to get it
+ try {
+ // Get initial context
+ Context context = new InitialContext();
+
+ // Lookup logger
+ this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+ /// and SMS provider controller
+ this.providerController = (AddressbookSmsProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.AddressbookSmsProviderSingletonBeanRemote"); //NOI18N
+ } catch (final NamingException ex) {
+ // Continue to throw it
+ throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+ }
+ }
+
@Override
public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
// Trace message
// Return category id
return String.valueOf(((SmsProvider) value).getProviderId());
}
-
- /**
- * Initialization of this converter
- */
- public SmsProviderConverter () {
- // Try to get it
- try {
- // Get initial context
- Context context = new InitialContext();
-
- // Lookup logger
- this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
-
- /// and SMS provider controller
- this.providerController = (AddressbookSmsProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.AddressbookSmsProviderSingletonBeanRemote"); //NOI18N
- } catch (final NamingException ex) {
- // Continue to throw it
- throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
- }
- }
-
}
*/
private UserWebSessionController userController;
+ /**
+ * Initialization of this converter
+ */
+ public UserConverter () {
+ // Try to get it
+ try {
+ // Get initial context
+ Context context = new InitialContext();
+
+ // Lookup logger
+ this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+ // ... and user controller
+ this.userController = (UserWebSessionController) context.lookup("java:global/juser-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+ } catch (final NamingException ex) {
+ // Continue to throw it
+ throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+ }
+ }
+
@Override
public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
// Trace message
// Return category id
return String.valueOf(((User) value).getUserId());
}
-
- /**
- * Initialization of this converter
- */
- public UserConverter () {
- // Try to get it
- try {
- // Get initial context
- Context context = new InitialContext();
-
- // Lookup logger
- this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
-
- // ... and user controller
- this.userController = (UserWebSessionController) context.lookup("java:global/juser-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
- } catch (final NamingException ex) {
- // Continue to throw it
- throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
- }
- }
}