- try {
- Set<OwnIdentity> ownIdentities = webOfTrustConnector.loadAllOwnIdentities();
- Map<String, OwnIdentity> newOwnIdentities = new HashMap<String, OwnIdentity>();
- for (OwnIdentity ownIdentity : ownIdentities) {
- newOwnIdentities.put(ownIdentity.getId(), ownIdentity);
- }
- checkOwnIdentities(newOwnIdentities);
- return Mappers.mappedSet(ownIdentities, new Mapper<OwnIdentity, OwnIdentity>() {
-
- /**
- * {@inheritDoc}
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public OwnIdentity map(OwnIdentity input) {
- return new DefaultOwnIdentity(webOfTrustConnector, input);
- }
- });
- } catch (WebOfTrustException wote1) {
- logger.log(Level.WARNING, "Could not load all own identities!", wote1);
- return Collections.emptySet();
- }