Search in sources :

Example 1 with LdapOxTrustConfiguration

use of org.gluu.config.oxtrust.LdapOxTrustConfiguration in project oxTrust by GluuFederation.

the class ConfigurationFactory method loadConfigurationFromDb.

@Override
protected LdapOxTrustConfiguration loadConfigurationFromDb(String... returnAttributes) {
    final PersistenceEntryManager persistenceEntryManager = persistenceEntryManagerInstance.get();
    final String configurationDn = getConfigurationDn();
    try {
        final LdapOxTrustConfiguration conf = persistenceEntryManager.find(configurationDn, LdapOxTrustConfiguration.class, returnAttributes);
        return conf;
    } catch (BasePersistenceException ex) {
        log.error("Failed to load configuration from LDAP", ex);
    }
    return null;
}
Also used : PersistenceEntryManager(org.gluu.persist.PersistenceEntryManager) LdapOxTrustConfiguration(org.gluu.config.oxtrust.LdapOxTrustConfiguration) BasePersistenceException(org.gluu.persist.exception.BasePersistenceException)

Example 2 with LdapOxTrustConfiguration

use of org.gluu.config.oxtrust.LdapOxTrustConfiguration in project oxTrust by GluuFederation.

the class JsonConfigurationService method saveOxTrustAttributeResolverConfigurationConfiguration.

public boolean saveOxTrustAttributeResolverConfigurationConfiguration(AttributeResolverConfiguration attributeResolverConfiguration) {
    LdapOxTrustConfiguration ldapOxTrustConfiguration = getOxTrustConfiguration();
    ldapOxTrustConfiguration.setAttributeResolverConfig(attributeResolverConfiguration);
    ldapOxTrustConfiguration.setRevision(ldapOxTrustConfiguration.getRevision() + 1);
    persistenceEntryManager.merge(ldapOxTrustConfiguration);
    return true;
}
Also used : LdapOxTrustConfiguration(org.gluu.config.oxtrust.LdapOxTrustConfiguration)

Example 3 with LdapOxTrustConfiguration

use of org.gluu.config.oxtrust.LdapOxTrustConfiguration in project oxTrust by GluuFederation.

the class JsonConfigurationService method saveOxTrustImportPersonConfiguration.

public boolean saveOxTrustImportPersonConfiguration(ImportPersonConfig oxTrustImportPersonConfiguration) {
    LdapOxTrustConfiguration ldapOxTrustConfiguration = getOxTrustConfiguration();
    ldapOxTrustConfiguration.setImportPersonConfig(oxTrustImportPersonConfiguration);
    ldapOxTrustConfiguration.setRevision(ldapOxTrustConfiguration.getRevision() + 1);
    persistenceEntryManager.merge(ldapOxTrustConfiguration);
    return true;
}
Also used : LdapOxTrustConfiguration(org.gluu.config.oxtrust.LdapOxTrustConfiguration)

Example 4 with LdapOxTrustConfiguration

use of org.gluu.config.oxtrust.LdapOxTrustConfiguration in project oxTrust by GluuFederation.

the class JsonConfigurationService method saveOxTrustCacheRefreshConfiguration.

public boolean saveOxTrustCacheRefreshConfiguration(CacheRefreshConfiguration oxTrustCacheRefreshConfiguration) {
    LdapOxTrustConfiguration ldapOxTrustConfiguration = getOxTrustConfiguration();
    ldapOxTrustConfiguration.setCacheRefresh(oxTrustCacheRefreshConfiguration);
    ldapOxTrustConfiguration.setRevision(ldapOxTrustConfiguration.getRevision() + 1);
    persistenceEntryManager.merge(ldapOxTrustConfiguration);
    return true;
}
Also used : LdapOxTrustConfiguration(org.gluu.config.oxtrust.LdapOxTrustConfiguration)

Example 5 with LdapOxTrustConfiguration

use of org.gluu.config.oxtrust.LdapOxTrustConfiguration in project oxTrust by GluuFederation.

the class JsonConfigurationService method saveOxTrustappConfiguration.

public boolean saveOxTrustappConfiguration(AppConfiguration oxTrustappConfiguration) {
    LdapOxTrustConfiguration ldapOxTrustConfiguration = getOxTrustConfiguration();
    ldapOxTrustConfiguration.setApplication(oxTrustappConfiguration);
    ldapOxTrustConfiguration.setRevision(ldapOxTrustConfiguration.getRevision() + 1);
    persistenceEntryManager.merge(ldapOxTrustConfiguration);
    return true;
}
Also used : LdapOxTrustConfiguration(org.gluu.config.oxtrust.LdapOxTrustConfiguration)

Aggregations

LdapOxTrustConfiguration (org.gluu.config.oxtrust.LdapOxTrustConfiguration)5 PersistenceEntryManager (org.gluu.persist.PersistenceEntryManager)1 BasePersistenceException (org.gluu.persist.exception.BasePersistenceException)1