use of com.sun.identity.idm.IdRepoListener in project OpenAM by OpenRock.
the class AMSDKRepo method notifyAllObjectsChangedEvent.
public static void notifyAllObjectsChangedEvent() {
if (debug.messageEnabled()) {
debug.message("AMSDKRepo.notifyAllObjectsChangedEvent - Sending " + "event to listeners.");
}
synchronized (listeners) {
Iterator it = listeners.iterator();
while (it.hasNext()) {
IdRepoListener l = (IdRepoListener) it.next();
l.allObjectsChanged();
}
}
}
use of com.sun.identity.idm.IdRepoListener in project OpenAM by OpenRock.
the class IdRepoPluginsCache method getAMRepoPlugin.
protected IdRepo getAMRepoPlugin(String orgName) throws SSOException, IdRepoException {
IdRepo pluginClass = null;
try {
if (debug.messageEnabled()) {
debug.message("AMSDK repo being initialized");
}
Class thisClass = Thread.currentThread().getContextClassLoader().loadClass(IdConstants.AMSDK_PLUGIN);
pluginClass = (IdRepo) thisClass.newInstance();
Map amsdkConfig = new HashMap();
Set vals = new HashSet();
vals.add(DNMapper.realmNameToAMSDKName(orgName));
amsdkConfig.put("amSDKOrgName", vals);
pluginClass.initialize(amsdkConfig);
} catch (Exception e) {
debug.error("IdRepoPluginsCache.getAMRepoPlugin: " + "Unable to instantiate plugin for Org: " + orgName, e);
}
if (pluginClass != null) {
// Add listener to this plugin class
Map listenerConfig = new HashMap();
listenerConfig.put("realm", orgName);
listenerConfig.put("amsdk", "true");
IdRepoListener lter = new IdRepoListener();
lter.setConfigMap(listenerConfig);
pluginClass.addListener(getAdminToken(), lter);
}
return pluginClass;
}
use of com.sun.identity.idm.IdRepoListener in project OpenAM by OpenRock.
the class IdRepoPluginsCache method getSpecialRepoPlugin.
// Internal repos
private IdRepo getSpecialRepoPlugin() throws SSOException, IdRepoException {
// Valid only for root realm
IdRepo pluginClass = null;
try {
if (debug.messageEnabled()) {
debug.message("Special repo being initialized");
}
Class thisClass = Thread.currentThread().getContextClassLoader().loadClass(IdConstants.SPECIAL_PLUGIN);
pluginClass = (IdRepo) thisClass.newInstance();
HashMap config = new HashMap(2);
config.put("realm", ServiceManager.getBaseDN());
pluginClass.initialize(config);
IdRepoListener lter = new IdRepoListener();
lter.setConfigMap(config);
pluginClass.addListener(getAdminToken(), lter);
} catch (Exception e) {
debug.error("IdRepoPluginsCache.getSpecialRepoPlugin: " + "Unable to init plugin: " + IdConstants.SPECIAL_PLUGIN, e);
}
return pluginClass;
}
Aggregations