Search in sources :

Example 1 with CacheRefreshAttributeMapping

use of org.xdi.config.oxtrust.CacheRefreshAttributeMapping in project oxTrust by GluuFederation.

the class ConfigureCacheRefreshAction method getOxTrustCacheRefreshConfig.

private CacheRefreshConfiguration getOxTrustCacheRefreshConfig() {
    CacheRefreshConfiguration cacheRefreshConfiguration = jsonConfigurationService.getOxTrustCacheRefreshConfiguration();
    if (cacheRefreshConfiguration == null) {
        cacheRefreshConfiguration = new CacheRefreshConfiguration();
        cacheRefreshConfiguration.setUpdateMethod(CacheRefreshUpdateMethod.COPY.getValue());
        cacheRefreshConfiguration.setSourceConfigs(new ArrayList<GluuLdapConfiguration>());
        cacheRefreshConfiguration.setInumConfig(new GluuLdapConfiguration());
        cacheRefreshConfiguration.setTargetConfig(new GluuLdapConfiguration());
        cacheRefreshConfiguration.setKeyAttributes(new ArrayList<String>(0));
        cacheRefreshConfiguration.setKeyObjectClasses(new ArrayList<String>());
        cacheRefreshConfiguration.setSourceAttributes(new ArrayList<String>());
        cacheRefreshConfiguration.setAttributeMapping(new ArrayList<CacheRefreshAttributeMapping>());
        cacheRefreshConfiguration.setDefaultInumServer(true);
    }
    this.updateMethod = CacheRefreshUpdateMethod.getByValue(cacheRefreshConfiguration.getUpdateMethod());
    this.keyAttributes = toSimpleProperties(cacheRefreshConfiguration.getKeyAttributes());
    this.keyObjectClasses = toSimpleProperties(cacheRefreshConfiguration.getKeyObjectClasses());
    this.sourceAttributes = toSimpleProperties(cacheRefreshConfiguration.getSourceAttributes());
    this.attributeMapping = toSimpleCustomProperties(cacheRefreshConfiguration.getAttributeMapping());
    return cacheRefreshConfiguration;
}
Also used : CacheRefreshConfiguration(org.xdi.config.oxtrust.CacheRefreshConfiguration) GluuLdapConfiguration(org.xdi.model.ldap.GluuLdapConfiguration) CacheRefreshAttributeMapping(org.xdi.config.oxtrust.CacheRefreshAttributeMapping)

Aggregations

CacheRefreshAttributeMapping (org.xdi.config.oxtrust.CacheRefreshAttributeMapping)1 CacheRefreshConfiguration (org.xdi.config.oxtrust.CacheRefreshConfiguration)1 GluuLdapConfiguration (org.xdi.model.ldap.GluuLdapConfiguration)1