IRegistry registry = (IRegistry) registryService.getRegistry();
try
{
ConnectionImpl con = ((RegistryServiceImpl)getRegistryService()).getConnection();
AuthToken auth = this.getAuthToken(con,registry);
PublisherAssertions result = null;
try {
result = registry.getPublisherAssertions(auth.getAuthInfo());
} catch (RegistryException rve) {
String username = getUsernameFromCredentials(con.getCredentials());
if (AuthTokenSingleton.getToken(username) != null) {
AuthTokenSingleton.deleteAuthToken(username);
}
auth = getAuthToken(con, registry);
result = registry.getPublisherAssertions(auth.getAuthInfo());
}
List<PublisherAssertion> publisherAssertionList = result.getPublisherAssertion();
LinkedHashSet<Association> col = new LinkedHashSet<Association>();
for (PublisherAssertion pas : publisherAssertionList) {
String sourceKey = pas.getFromKey();
String targetKey = pas.getToKey();