InfoCardDO cardDo = null;
try {
dbman = IdentityPersistenceManager.getPersistanceManager();
} catch (Exception e) {
throw new IdentityProviderException(e.getMessage(), e);
}
cardDo = new InfoCardDO();
cardDo.setCardId(card.getInformationCardReference().getCardId());
cardDo.setDateIssued(card.getTimeIssued());
cardDo.setUserId(tenantAwareUserName);
cardDo.setDateExpires(card.getTimeExpires());
cardDo.setOpenIDInfoCard(this.isOpenIdInfoCard);
try {
cardDo.setInfoCard(card.serialize());
} catch (CardModelException e) {
throw new IdentityProviderException(e.getMessage(), e);
}
try {
dbman.createInfoCard(IdentityTenantUtil.getRegistry(), cardDo);
} catch (Exception e) {
throw new IdentityProviderException(e.getMessage(), e);
}
log.info("Information card details stored for card id : "
+ card.getInformationCardReference().getCardId());
}