| | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.MatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | for (String key : orderedKeys) |
| | | { |
| | | MatchingRule matchingRule = matchingRuleNameMap.get(key); |
| | | if (matchingRule instanceof ApproximateMatchingRule) |
| | | if (Utilities.isApproximateMatchingRule(matchingRule)) |
| | | { |
| | | approximateElements.add(matchingRule); |
| | | } |
| | | else if (matchingRule instanceof MatchingRule) |
| | | else if (Utilities.isEqualityMatchingRule(matchingRule)) |
| | | { |
| | | equalityElements.add(matchingRule); |
| | | } |
| | | else if (matchingRule instanceof OrderingMatchingRule) |
| | | else if (Utilities.isOrderingMatchingRule(matchingRule)) |
| | | { |
| | | orderingElements.add(matchingRule); |
| | | } |
| | | else if (matchingRule instanceof SubstringMatchingRule) |
| | | else if (Utilities.isSubstringMatchingRule(matchingRule)) |
| | | { |
| | | substringElements.add(matchingRule); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private ApproximateMatchingRule getApproximateMatchingRule() |
| | | private MatchingRule getApproximateMatchingRule() |
| | | { |
| | | if (approximate.getSelectedIndex() == 0) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | return (ApproximateMatchingRule)approximate.getSelectedItem(); |
| | | return (MatchingRule)approximate.getSelectedItem(); |
| | | } |
| | | } |
| | | |