Search in sources :

Example 1 with EntryFilteringCursorImpl

use of org.apache.directory.server.core.api.filtering.EntryFilteringCursorImpl in project structr by structr.

the class StructrPartition method search.

@Override
public EntryFilteringCursor search(SearchOperationContext searchContext) throws LdapException {
    logger.info("{}", searchContext);
    final LdapPrincipal principal = searchContext.getEffectivePrincipal();
    final Dn dn = searchContext.getDn();
    final ExprNode filter = searchContext.getFilter();
    final SearchScope scope = searchContext.getScope();
    final List<Entry> list = getWrapper(principal).filter(dn, filter, scope);
    final Cursor<Entry> cursor = new ListCursor<>(list);
    final SchemaManager manager = getSchemaManager();
    return new EntryFilteringCursorImpl(cursor, searchContext, manager);
}
Also used : ExprNode(org.apache.directory.api.ldap.model.filter.ExprNode) ListCursor(org.apache.directory.api.ldap.model.cursor.ListCursor) EntryFilteringCursorImpl(org.apache.directory.server.core.api.filtering.EntryFilteringCursorImpl) Entry(org.apache.directory.api.ldap.model.entry.Entry) LdapPrincipal(org.apache.directory.server.core.api.LdapPrincipal) SearchScope(org.apache.directory.api.ldap.model.message.SearchScope) Dn(org.apache.directory.api.ldap.model.name.Dn) SchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager)

Aggregations

ListCursor (org.apache.directory.api.ldap.model.cursor.ListCursor)1 Entry (org.apache.directory.api.ldap.model.entry.Entry)1 ExprNode (org.apache.directory.api.ldap.model.filter.ExprNode)1 SearchScope (org.apache.directory.api.ldap.model.message.SearchScope)1 Dn (org.apache.directory.api.ldap.model.name.Dn)1 SchemaManager (org.apache.directory.api.ldap.model.schema.SchemaManager)1 LdapPrincipal (org.apache.directory.server.core.api.LdapPrincipal)1 EntryFilteringCursorImpl (org.apache.directory.server.core.api.filtering.EntryFilteringCursorImpl)1