use of com.sun.identity.federation.meta.IDFFCOTUtils in project OpenAM by OpenRock.
the class CircleOfTrustManager method updateIDFFEntityConfig.
/**
* Updates the IDFF Entity Configuration.
*
* @param realm the realm name.
* @param cotName the circle of trust name.
* @param trustedProviders set of trusted provider names.
* @throws COTException if there is an error updating the configuration.
*/
void updateIDFFEntityConfig(String realm, String cotName, Set trustedProviders) throws COTException {
String classMethod = "COTManager:updateIDFFEntityConfig";
IDFFCOTUtils idffCotUtils = new IDFFCOTUtils(callerSession);
String entityId = null;
if (trustedProviders != null && !trustedProviders.isEmpty()) {
for (Iterator iter = trustedProviders.iterator(); iter.hasNext(); ) {
entityId = (String) iter.next();
try {
idffCotUtils.updateEntityConfig(realm, cotName, entityId);
} catch (IDFFMetaException idfe) {
throw new COTException(idfe);
} catch (JAXBException jbe) {
debug.error(classMethod, jbe);
String[] data = { jbe.getMessage(), cotName, entityId, realm };
LogUtil.error(Level.INFO, LogUtil.CONFIG_ERROR_CREATE_COT_DESCRIPTOR, data);
throw new COTException(jbe);
}
}
}
}
Aggregations