use of org.opends.server.types.RawAttribute in project OpenAM by OpenRock.
the class TokenDataEntry method getAttrList.
public List<RawAttribute> getAttrList() {
List<RawAttribute> attrList = new ArrayList<RawAttribute>(attributeValues.size());
Map<String, Object> map = attributeValues.asMap();
for (String key : map.keySet()) {
List<String> valueList = new ArrayList<String>();
Object o = map.get(key);
if (o instanceof Collection) {
for (Object o2 : (Collection) o) {
if (o2 != null) {
valueList.add(o2.toString());
}
}
} else {
if (o != null) {
valueList.add(o.toString());
}
}
if (!valueList.isEmpty()) {
attrList.add(new LDAPAttribute(key, valueList));
}
}
return attrList;
}
Aggregations