| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ByteStringFactory; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.VirtualAttributeRule; |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | |
| | | if(count >= 0) |
| | | { |
| | | AttributeValue value = |
| | | new AttributeValue(ByteStringFactory.create(String.valueOf(count)), |
| | | ByteStringFactory.create(String.valueOf(count))); |
| | | AttributeValues.create(ByteString.valueOf(String.valueOf(count)), |
| | | ByteString.valueOf(String.valueOf(count))); |
| | | return Collections.singleton(value); |
| | | } |
| | | } |
| | |
| | | long count = backend.numSubordinates(entry.getDN(), false); |
| | | if(count >= 0) |
| | | { |
| | | return Long.parseLong(value.getNormalizedStringValue()) == count; |
| | | return Long.parseLong(value.getNormalizedValue().toString()) |
| | | == count; |
| | | } |
| | | return false; |
| | | } |