/*
- * Copyright (C) 2016 Roland Haeder
+ * Copyright (C) 2016 Roland Häder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
package org.mxchange.pizzaapplication.beans.country;
import java.text.MessageFormat;
-import java.util.Collections;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.naming.NamingException;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
-import org.mxchange.jcountry.events.AdminAddedCountryEvent;
+import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent;
import org.mxchange.pizzaapplication.beans.BasePizzaController;
/**
* A country bean
* <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
*/
@Named ("countryController")
@ApplicationScoped
}
}
- @Override
- public void afterAdminAddedCountry (@Observes final AdminAddedCountryEvent event) {
+ /**
+ * Observing method when the event is fired that an administrator added a
+ * new country
+ * <p>
+ * @param event Event instance
+ */
+ public void afterAdminAddedCountryEvent (@Observes final ObservableAdminAddedCountryEvent event) {
// Is all valid?
if (null == event) {
// Throw NPE
}
@Override
+ @SuppressWarnings ("ReturnOfCollectionOrArrayField")
public List<Country> allCountries () {
// Return "cached" version
- return Collections.unmodifiableList(this.countryList);
- }
-
- @Override
- public boolean hasCountries () {
- return (!this.countryList.isEmpty());
+ return this.countryList;
}
/**