+ // Are all parameter set?
+ if (null == providerDialPrefix) {
+ // Throw NPE
+ throw new NullPointerException("providerDialPrefix is null"); //NOI18N
+ } else if (providerDialPrefix < 1) {
+ // Throw IAE
+ throw new IllegalArgumentException(MessageFormat.format("providerDialPrefix={0} is not valid.", providerDialPrefix)); //NOI18N
+ } else if (null == providerName) {
+ // Throw NPE
+ throw new NullPointerException("providerName is null"); //NOI18N
+ } else if (providerName.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("providerName is empty"); //NOI18N
+ } else if (null == providerCountry) {
+ // Throw NPE
+ throw new NullPointerException("providerCountry is null"); //NOI18N
+ } else if (null == providerCountry.getCountryId()) {
+ // Throw NPE again
+ throw new NullPointerException("providerCountry.countryId is null"); //NOI18N
+ } else if (providerCountry.getCountryId() < 1) {
+ // Throw IAE
+ throw new IllegalArgumentException(MessageFormat.format("providerCountry.countryId={0} is not valid", providerCountry.getCountryId())); //NOI18N
+ } else if (null == providerMailPattern) {
+ // Throw NPE
+ throw new NullPointerException("providerMailPattern is null"); //NOI18N
+ } else if (providerMailPattern.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("providerMailPattern is empty"); //NOI18N
+ }
+