Skip to content

Commit

Permalink
fix(jans-auth-server):sql localizedstring persistence SqlEntryManager (
Browse files Browse the repository at this point in the history
  • Loading branch information
jmunozherbas committed May 31, 2022
1 parent f4824c6 commit b959b94
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.Map;
import java.util.function.Function;

import io.jans.orm.model.base.LocalizedString;
import jakarta.inject.Inject;

import org.slf4j.Logger;
Expand Down Expand Up @@ -951,4 +952,19 @@ protected boolean isSupportForceUpdate() {
return true;
}

@Override
protected List<AttributeData> getAttributeDataFromLocalizedString(String ldapAttributeName, LocalizedString localizedString) {
List<AttributeData> listAttributes = new ArrayList<>();

localizedString.getLanguageTags().forEach(languageTag -> {
String value = localizedString.getValue(languageTag);
String key = localizedString.addLdapLanguageTag(ldapAttributeName, languageTag);
AttributeData attributeData = new AttributeData(key, value);

listAttributes.add(attributeData);
});

return listAttributes;
}

}

0 comments on commit b959b94

Please sign in to comment.