customProvider = findCustomProvider();
// check that the defaultUrl still exists
- if (!setDefaultUrl(defaultUrlString))
+ if (!contains(defaultUrlString))
{
// if the defaultUrl can't be found in any of the providers
// set up a custom default url
chooseDefaultUrl();
}
+ else
+ {
+ setDefaultUrl(defaultUrlString);
+ }
}
/*
outcome = true;
}
}
+ if (!outcome)
+ {
+ throw new IllegalArgumentException();
+ }
+ return outcome;
+ }
+
+ @Override
+ public boolean contains(String id)
+ {
+ boolean outcome = false;
+ for (UrlProviderI p : providers)
+ {
+ if (p.contains(id))
+ {
+ outcome = true;
+ }
+ }
return outcome;
}
{
for (UrlProviderI p : providers)
{
- p.setDefaultUrl(null);
p.setUrlData(links);
}
}