Search in sources :

Example 1 with CentralLdap

use of org.gluu.oxtrust.service.cdi.event.CentralLdap in project oxTrust by GluuFederation.

the class AppInitializer method createCentralLdapEntryManager.

@Produces
@ApplicationScoped
@Named(LDAP_CENTRAL_ENTRY_MANAGER_NAME)
@CentralLdap
public LdapEntryManager createCentralLdapEntryManager() {
    if (this.centralConnectionProvider == null) {
        return null;
    }
    LdapEntryManager centralLdapEntryManager = new LdapEntryManager(new OperationsFacade(this.centralConnectionProvider));
    log.info("Created {}: {}", new Object[] { LDAP_CENTRAL_ENTRY_MANAGER_NAME, centralLdapEntryManager.getLdapOperationService() });
    return centralLdapEntryManager;
}
Also used : LdapEntryManager(org.gluu.site.ldap.persistence.LdapEntryManager) OperationsFacade(org.gluu.site.ldap.OperationsFacade) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces) CentralLdap(org.gluu.oxtrust.service.cdi.event.CentralLdap) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Aggregations

ApplicationScoped (javax.enterprise.context.ApplicationScoped)1 Produces (javax.enterprise.inject.Produces)1 Named (javax.inject.Named)1 CentralLdap (org.gluu.oxtrust.service.cdi.event.CentralLdap)1 OperationsFacade (org.gluu.site.ldap.OperationsFacade)1 LdapEntryManager (org.gluu.site.ldap.persistence.LdapEntryManager)1