use of org.gluu.site.ldap.persistence.LdapEntryManager in project oxTrust by GluuFederation.
the class CacheRefreshTimer method loadInumServerEntries.
private List<GluuInumMap> loadInumServerEntries(CacheRefreshConfiguration cacheRefreshConfiguration, LdapServerConnection inumDbServerConnection) {
LdapEntryManager inumDbldapEntryManager = inumDbServerConnection.getLdapEntryManager();
String inumbaseDn = inumDbServerConnection.getBaseDns()[0];
Filter filterObjectClass = Filter.createEqualityFilter(OxTrustConstants.objectClass, OxTrustConstants.objectClassInumMap);
Filter filterStatus = Filter.createNOTFilter(Filter.createEqualityFilter(OxTrustConstants.gluuStatus, GluuStatus.INACTIVE.getValue()));
Filter filter = Filter.createANDFilter(filterObjectClass, filterStatus);
return inumDbldapEntryManager.findEntries(inumbaseDn, GluuInumMap.class, filter, null, cacheRefreshConfiguration.getLdapSearchSizeLimit());
}
use of org.gluu.site.ldap.persistence.LdapEntryManager in project oxTrust by GluuFederation.
the class AppInitializer method getLdapEntryManager.
@Produces
@ApplicationScoped
@Named(LDAP_ENTRY_MANAGER_NAME)
public LdapEntryManager getLdapEntryManager() {
LdapEntryManager ldapEntryManager = new LdapEntryManager(new OperationsFacade(this.connectionProvider));
log.info("Created {}: {}", new Object[] { LDAP_ENTRY_MANAGER_NAME, ldapEntryManager.getLdapOperationService() });
return ldapEntryManager;
}
use of org.gluu.site.ldap.persistence.LdapEntryManager in project oxTrust by GluuFederation.
the class AppInitializer method recreateLdapEntryManager.
public void recreateLdapEntryManager(@Observes @LdapConfigurationReload String event) {
// Get existing application scoped instance
LdapEntryManager oldLdapEntryManager = CdiUtil.getContextBean(beanManager, LdapEntryManager.class, LDAP_ENTRY_MANAGER_NAME);
// Recreate components
createConnectionProvider();
// Close existing connections
closeLdapEntryManager(oldLdapEntryManager);
// Force to create new bean
LdapEntryManager ldapEntryManager = ldapEntryManagerInstance.get();
ldapEntryManagerInstance.destroy(ldapEntryManager);
log.info("Recreated instance {}: {}", LDAP_ENTRY_MANAGER_NAME, ldapEntryManager);
}
use of org.gluu.site.ldap.persistence.LdapEntryManager in project oxTrust by GluuFederation.
the class AppInitializer method recreateCentralLdapEntryManager.
public void recreateCentralLdapEntryManager(@Observes @LdapCentralConfigurationReload String event) {
// Get existing application scoped instance
LdapEntryManager oldCentralLdapEntryManager = CdiUtil.getContextBean(beanManager, LdapEntryManager.class, LDAP_CENTRAL_ENTRY_MANAGER_NAME);
// Recreate components
createCentralConnectionProvider();
// Close existing connections
closeLdapEntryManager(oldCentralLdapEntryManager);
// Force to create new bean
LdapEntryManager ldapCentralEntryManager = ldapCentralEntryManagerInstance.get();
ldapEntryManagerInstance.destroy(ldapCentralEntryManager);
log.info("Recreated instance {}: {}", LDAP_CENTRAL_ENTRY_MANAGER_NAME, ldapCentralEntryManager);
}
use of org.gluu.site.ldap.persistence.LdapEntryManager in project oxTrust by GluuFederation.
the class AppInitializer method applicationInitialized.
/**
* Initialize components and schedule DS connection time checker
*/
public void applicationInitialized(@Observes @Initialized(ApplicationScoped.class) Object init) {
log.debug("Creating application components");
showBuildInfo();
// Initialize local LDAP connection provider
createConnectionProvider();
configurationFactory.create();
LdapEntryManager localLdapEntryManager = ldapEntryManagerInstance.get();
// Initialize central LDAP connection provider
createCentralConnectionProvider();
initializeLdifArchiver(localLdapEntryManager);
// Initialize template engine
templateService.initTemplateEngine();
// Initialize SubversionService
subversionService.initSubversionService();
// Initialize python interpreter
pythonService.initPythonInterpreter(configurationFactory.getLdapConfiguration().getString("pythonModulesDir", null));
// Initialize Shibboleth
shibbolethInitializer.createShibbolethConfiguration();
// Initialize script manager
List<CustomScriptType> supportedCustomScriptTypes = Arrays.asList(CustomScriptType.CACHE_REFRESH, CustomScriptType.UPDATE_USER, CustomScriptType.USER_REGISTRATION, CustomScriptType.ID_GENERATOR, CustomScriptType.SCIM);
// Start timer
quartzSchedulerManager.start();
// Schedule timer tasks
metricService.initTimer();
configurationFactory.initTimer();
ldapStatusTimer.initTimer();
metadataValidationTimer.initTimer();
entityIDMonitoringService.initTimer();
cacheRefreshTimer.initTimer();
customScriptManager.initTimer(supportedCustomScriptTypes);
statusCheckerDaily.initTimer();
statusCheckerTimer.initTimer();
svnSyncTimer.initTimer();
logFileSizeChecker.initTimer();
loggerService.updateLoggerConfigLocation();
}
Aggregations