Enable setting a default base uri thats used if a specific base is not set but a default value is

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1135131 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
antelder 2011-06-13 15:11:14 +00:00
parent 1c1806e9f7
commit a7b5ef23de

View file

@ -48,6 +48,8 @@ import org.apache.tuscany.sca.monitor.Monitor;
*/
public class BindingURIBuilderImpl implements CompositeBuilder {
private static final QName DEFAULT = new QName("default");
public BindingURIBuilderImpl(ExtensionPointRegistry registry) {
}
@ -228,6 +230,11 @@ public class BindingURIBuilderImpl implements CompositeBuilder {
List<String> uris = defaultBindings.get(binding.getType());
if (uris != null && uris.size() > 0) {
baseURI = new URI(addSlashToPath(uris.get(0)));
} else {
uris = defaultBindings.get(DEFAULT);
if (uris != null && uris.size() > 0) {
baseURI = new URI(addSlashToPath(uris.get(0)));
}
}
}
}