| | |
| | | import javax.swing.tree.TreeNode; |
| | | import javax.swing.tree.TreePath; |
| | | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.responses.SearchResultEntry; |
| | | import org.opends.admin.ads.ADSContext; |
| | |
| | | */ |
| | | private static int getNumSubOrdinates(CustomSearchResult entry) |
| | | { |
| | | List<Object> vs = entry.getAttributeValues(NUMSUBORDINATES_ATTR); |
| | | String v = null; |
| | | if (vs != null && !vs.isEmpty()) |
| | | { |
| | | v = vs.get(0).toString(); |
| | | } |
| | | List<ByteString> vs = entry.getAttributeValues(NUMSUBORDINATES_ATTR); |
| | | String v = !vs.isEmpty() ? vs.get(0).toString() : null; |
| | | return toInt(v); |
| | | } |
| | | |
| | |
| | | */ |
| | | public static boolean getHasSubOrdinates(CustomSearchResult entry) |
| | | { |
| | | List<Object> vs = entry.getAttributeValues(HASSUBORDINATES_ATTR); |
| | | String v = null; |
| | | if (vs != null && !vs.isEmpty()) |
| | | { |
| | | v = vs.get(0).toString(); |
| | | } |
| | | List<ByteString> vs = entry.getAttributeValues(HASSUBORDINATES_ATTR); |
| | | String v = !vs.isEmpty() ? vs.get(0).toString() : null; |
| | | if (v != null) |
| | | { |
| | | return "true".equalsIgnoreCase(v); |