try
{
ConnectionImpl con = ((RegistryServiceImpl)getRegistryService()).getConnection();
AuthToken auth = this.getAuthToken(con,registry);
AssertionStatusReport report = null;
String confirm = "";
boolean caller = confirmedByCaller.booleanValue();
boolean other = confirmedByOtherParty.booleanValue();
if(caller && other )
confirm = Constants.COMPLETION_STATUS_COMPLETE;
else
if(!caller && other )
confirm = Constants.COMPLETION_STATUS_FROMKEY_INCOMPLETE;
else
if(caller && !other )
confirm = Constants.COMPLETION_STATUS_TOKEY_INCOMPLETE;
report = null;
try {
report = registry.getAssertionStatusReport(auth.getAuthInfo(),confirm);
} catch (RegistryException rve) {
String username = getUsernameFromCredentials(con.getCredentials());
if (AuthTokenSingleton.getToken(username) != null) {
AuthTokenSingleton.deleteAuthToken(username);
}
auth = getAuthToken(con, registry);
report = registry.getAssertionStatusReport(auth.getAuthInfo(),confirm);
}
List<AssertionStatusItem> assertionStatusItemList = report.getAssertionStatusItem();
LinkedHashSet<Association> col = new LinkedHashSet<Association>();
for (AssertionStatusItem asi : assertionStatusItemList) {
String sourceKey = asi.getFromKey();
String targetKey = asi.getToKey();
Collection<Key> orgcol = new ArrayList<Key>();