]> git.mxchange.org Git - jfinancials-war.git/commitdiff
added redirection outcomes to all "addFoo" methods
authorRoland Häder <roland@mxchange.org>
Wed, 27 Apr 2016 10:30:07 +0000 (12:30 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 7 May 2016 09:52:07 +0000 (11:52 +0200)
Signed-off-by: Roland Häder <roland@haeder.net>
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java
src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestController.java
src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java
src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestController.java

index a3e5cad2ea8c319e6b26d5982d40ddc75052dc03..7ca3472141ed1c597c33a78256c8f54891a711f5 100644 (file)
@@ -115,7 +115,7 @@ public class AddressbookAdminCountryWebRequestBean implements AddressbookAdminCo
        }
 
        @Override
-       public void addCountry () {
+       public String addCountry () {
                // Create new country object
                Country country = new CountryData();
 
@@ -146,6 +146,9 @@ public class AddressbookAdminCountryWebRequestBean implements AddressbookAdminCo
 
                // Fire event
                this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry));
+
+               // Redirect to list
+               return "admin_list_country"; //NOI18N
        }
 
        @Override
index 061baa46ebb5cf3aa1e8328b202f6e66755a3074..56607fbec9b7b6e733a6a26649ce8c3b528ac3ce 100644 (file)
@@ -35,9 +35,12 @@ public interface AddressbookAdminCountryWebRequestController extends Serializabl
        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
@@ -99,7 +102,7 @@ public interface AddressbookAdminCountryWebRequestController extends Serializabl
         * 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);
 
index 78bd2d50062cbb39f163db3c104363c2d1cbaa98..5b052c515e3e7fa9f60529b45a9ba924e250fbaf 100644 (file)
@@ -106,7 +106,7 @@ public class AddressbookAdminMobileProviderWebRequestBean implements Addressbook
        }
 
        @Override
-       public void addMobileProvider () {
+       public String addMobileProvider () {
                // Create mobile provider instance
                MobileProvider mobileProvider = new CellphoneProvider(this.getProviderDialPrefix(), this.getProviderName(), this.getProviderCountry(), this.getProviderMailPattern());
 
@@ -129,6 +129,9 @@ public class AddressbookAdminMobileProviderWebRequestBean implements Addressbook
 
                // Fire event
                this.providerAddedEvent.fire(new AdminMobileProviderAddedEvent(updatedProvider));
+
+               // Redirect to list
+               return "admin_list_mobile_provider"; //NOI18N
        }
 
        @Override
index 081c7e0d8a582b2f4588977c3a3dc4d9e9c77f77..d287dd2b7dc64e23ea103a5e2e1202970f9ead2e 100644 (file)
@@ -32,9 +32,11 @@ public interface AddressbookAdminMobileProviderWebRequestController extends Seri
        /**
         * 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