| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InvokableMethod; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.protocols.internal.Requests.*; |
| | |
| | | if (clientConnection instanceof JmxClientConnection) { |
| | | op = ((JmxClientConnection)clientConnection).processSearch( |
| | | ByteString.valueOf(configEntryDN.toString()), |
| | | SearchScope.BASE_OBJECT, getTrueFilter()); |
| | | SearchScope.BASE_OBJECT, LDAPFilter.objectClassPresent()); |
| | | } |
| | | else if (clientConnection instanceof InternalClientConnection) { |
| | | SearchRequest request = newSearchRequest(configEntryDN, SearchScope.BASE_OBJECT, "(objectclass=*)"); |
| | | SearchRequest request = newSearchRequest(configEntryDN, SearchScope.BASE_OBJECT); |
| | | op = ((InternalClientConnection) clientConnection).processSearch(request); |
| | | } |
| | | // BUG : op may be null |
| | |
| | | } |
| | | } |
| | | |
| | | private LDAPFilter getTrueFilter() |
| | | { |
| | | try |
| | | { |
| | | return LDAPFilter.decode("(objectclass=*)"); |
| | | } |
| | | catch (LDAPException e) |
| | | { |
| | | // can never happen |
| | | logger.traceException(e); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Set the value of a specific attribute of the Dynamic MBean. In this case, |
| | | * it will always throw {@code InvalidAttributeValueException} because setting |
| | |
| | | if (clientConnection instanceof JmxClientConnection) { |
| | | op = ((JmxClientConnection)clientConnection).processSearch( |
| | | ByteString.valueOf(configEntryDN.toString()), |
| | | SearchScope.BASE_OBJECT, getTrueFilter()); |
| | | SearchScope.BASE_OBJECT, LDAPFilter.objectClassPresent()); |
| | | } |
| | | else if (clientConnection instanceof InternalClientConnection) { |
| | | try |
| | | { |
| | | SearchRequest request = newSearchRequest(configEntryDN, SearchScope.BASE_OBJECT, "(objectclass=*)"); |
| | | op = ((InternalClientConnection) clientConnection).processSearch(request); |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | logger.traceException(e); |
| | | } |
| | | SearchRequest request = newSearchRequest(configEntryDN, SearchScope.BASE_OBJECT); |
| | | op = ((InternalClientConnection) clientConnection).processSearch(request); |
| | | } |
| | | |
| | | if (op == null) |