@Override public List<AttributeType> convertSingle(LDAPAttributeType at) { AttributeValueSyntax<?> syntax = getSyntaxForOid(at.getSyntax()); List<AttributeType> ret = new ArrayList<AttributeType>(at.getNames().size()); for (String name : at.getNames()) { AttributeType converted = new AttributeType(name, syntax); if (at.isSingleValue()) { converted.setMaxElements(1); converted.setMinElements(1); } else { converted.setMinElements(0); converted.setMaxElements(256); } if (at.getDescription() != null) converted.setDescription(new I18nString(at.getDescription())); ret.add(converted); } return ret; }
@Override public boolean supports(LDAPAttributeType at) { AttributeValueSyntax<?> syntax = getSyntaxForOid(at.getSyntax()); return syntax != null; }