}
@Override
- public void addCountry () {
+ public String addCountry () {
// Create new country object
Country country = new CountryData();
// Fire event
this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry));
+
+ // Redirect to list
+ return "admin_list_country"; //NOI18N
}
@Override
List<Country> allCountries ();
/**
- * Adds country to all relevant beans and sends it to the EJB.
+ * Adds country to all relevant beans and sends it to the EJB. A redirect
+ * should happen after successfull creation.
+ * <p>
+ * @return Redirect outcome
*/
- void addCountry ();
+ String addCountry ();
/**
* Checks whether countries has been registered
* Setter for whether the local dial prefix is required for local calls
* <p>
* @param countryIsLocalPrefixRequired Whether the local dial prefix is
- * required
+ * required
*/
void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired);
}
@Override
- public void addMobileProvider () {
+ public String addMobileProvider () {
// Create mobile provider instance
MobileProvider mobileProvider = new CellphoneProvider(this.getProviderDialPrefix(), this.getProviderName(), this.getProviderCountry(), this.getProviderMailPattern());
// Fire event
this.providerAddedEvent.fire(new AdminMobileProviderAddedEvent(updatedProvider));
+
+ // Redirect to list
+ return "admin_list_mobile_provider"; //NOI18N
}
@Override
/**
* Adds a mobile provider to database by calling the EJB. A pre-check on
* dial-prefix and country combination is done, if found, an exception is
- * thrown.
+ * thrown. A redirect should take place after successfull creation.
+ * <p>
+ * @return Redirect outcome
*/
- void addMobileProvider ();
+ String addMobileProvider ();
/**
* Returns a list of all mobile providers