| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.browser; |
| | |
| | | changeStateTo(State.READING_LOCAL_ENTRY); |
| | | runReadLocalEntry(); |
| | | } |
| | | if (!isInFinalState()) { |
| | | if (controller.getFollowReferrals() && isReferralEntry(localEntry)) { |
| | | changeStateTo(State.SOLVING_REFERRAL); |
| | | runSolveReferral(); |
| | |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | exception = ne; |
| | |
| | | */ |
| | | private boolean useCustomFilter() |
| | | { |
| | | return !controller.getFilter().equals(BrowserController.ALL_OBJECTS_FILTER); |
| | | boolean result=false; |
| | | if (controller.getFilter()!=null) |
| | | result = |
| | | !controller.getFilter().equals(BrowserController.ALL_OBJECTS_FILTER); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | |
| | | private void runReadLocalEntry() throws SearchAbandonException { |
| | | BasicNode node = getNode(); |
| | | InitialLdapContext ctx = null; |
| | | |
| | | try { |
| | | ctx = controller.findConnectionForLocalEntry(node); |
| | | |
| | | if (ctx != null) { |
| | | if (useCustomFilter()) |
| | | { |
| | | // Check that the entry verifies the filter |
| | |
| | | ctls.setReturningAttributes(controller.getAttrsForRedSearch()); |
| | | ctls.setSearchScope(SearchControls.OBJECT_SCOPE); |
| | | |
| | | NamingEnumeration<SearchResult> s = ctx.search(new LdapName(node.getDN()), |
| | | NamingEnumeration<SearchResult> s = |
| | | ctx.search(new LdapName(node.getDN()), |
| | | controller.getObjectSearchFilter(), |
| | | ctls); |
| | | try |
| | |
| | | throw new NameNotFoundException("Can't find entry: "+node.getDN()); |
| | | } |
| | | throwAbandonIfNeeded(null); |
| | | } else { |
| | | changeStateTo(State.FINISHED); |
| | | } |
| | | } |
| | | catch(NamingException x) { |
| | | throwAbandonIfNeeded(x); |