| | |
| | | tree.setCellRenderer(new BrowserCellRenderer()); |
| | | displayFlags = DISPLAY_ACI_COUNT; |
| | | displayAttribute = RDN_ATTRIBUTE; |
| | | followReferrals = true; |
| | | followReferrals = false; |
| | | sorted = false; |
| | | showContainerOnly = true; |
| | | containerClasses = new String[0]; |
| | |
| | | * Enable/display the following of referrals. |
| | | * This routine starts a refresh on each referral node. |
| | | * @param followReferrals whether to follow referrals or not. |
| | | * @throws NamingException if there is an error updating the request controls |
| | | * of the internal connections. |
| | | */ |
| | | public void setFollowReferrals(boolean followReferrals) { |
| | | public void setFollowReferrals(boolean followReferrals) throws NamingException |
| | | { |
| | | this.followReferrals = followReferrals; |
| | | startRefreshReferralNodes(rootNode); |
| | | stopRefresh(); |
| | | removeAllChildNodes(rootNode, true /* Keep suffixes */); |
| | | ctxConfiguration.setRequestControls(getConfigurationRequestControls()); |
| | | ctxUserData.setRequestControls(getRequestControls()); |
| | | connectionPool.setRequestControls(getRequestControls()); |
| | | startRefresh(null); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | Control[] getRequestControls() |
| | | { |
| | | Control ctls[] = new Control[sorted ? 2 : 1]; |
| | | ctls[0] = new ManageReferralControl(true); |
| | | if (sorted) { |
| | | Control ctls[]; |
| | | if (followReferrals) |
| | | { |
| | | ctls = new Control[sorted ? 2 : 1]; |
| | | } |
| | | else |
| | | { |
| | | ctls = new Control[sorted ? 1 : 0]; |
| | | } |
| | | if (sorted) |
| | | { |
| | | SortKey[] keys = new SortKey[SORT_ATTRIBUTES.length]; |
| | | for (int i=0; i<keys.length; i++) { |
| | | keys[i] = new SortKey(SORT_ATTRIBUTES[i]); |
| | | } |
| | | try |
| | | { |
| | | ctls[1] = new SortControl(keys, true); |
| | | ctls[0] = new SortControl(keys, false); |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | |
| | | ioe); |
| | | } |
| | | } |
| | | if (followReferrals) |
| | | { |
| | | ctls[ctls.length - 1] = new ManageReferralControl(false); |
| | | } |
| | | return ctls; |
| | | } |
| | | |
| | |
| | | */ |
| | | Control[] getConfigurationRequestControls() |
| | | { |
| | | Control ctls[] = new Control[0]; |
| | | return ctls; |
| | | return getRequestControls(); |
| | | } |
| | | |
| | | |