Tabnine Logo
EntryFilteringCursor
Code IndexAdd Tabnine to your IDE (free)

How to use
EntryFilteringCursor
in
org.apache.directory.server.core.api.filtering

Best Java code snippets using org.apache.directory.server.core.api.filtering.EntryFilteringCursor (Showing top 20 results out of 315)

origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public Entry get() throws CursorException
{
  if ( ( index < start ) || ( index >= end ) )
  {
    throw new CursorException( I18n.err( I18n.ERR_13109_CURSOR_NOT_POSITIONED ) );
  }
  if ( currentCursor.available() )
  {
    return currentCursor.get();
  }
  throw new InvalidCursorPositionException();
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public boolean next() throws LdapException, CursorException
{
  if ( listSize > 0 )
  {
    if ( index == -1 )
    {
      index = start;
    }
    while ( index < end )
    {
      currentCursor = list.get( index );
      if ( currentCursor.next() )
      {
        return true;
      }
      else
      {
        index++;
      }
    }
  }
  return false;
}
origin: org.apache.directory.server/apacheds-core-jndi

public NamingEnumerationAdapter( EntryFilteringCursor cursor ) throws NamingException
{
  this.cursor = cursor;
  try
  {
    if ( !cursor.first() )
    {
      cursor.close();
      available = false;
    }
    else
    {
      available = true;
    }
  }
  catch ( Exception e )
  {
    JndiUtils.wrap( e );
  }
}
origin: org.apache.directory.server/apacheds-core-jndi

public SearchResult next() throws NamingException
{
  Entry entry = null;
  try
  {
    entry = cursor.get();
    if ( cursor.next() )
    {
      available = true;
    }
    else
    {
      available = false;
      cursor.close();
    }
  }
  catch ( Exception e )
  {
    JndiUtils.wrap( e );
  }
  SearchResult result = new SearchResult( entry.getDn().getName(), null,
    ServerEntryUtils.toBasicAttributes( entry ) );
  result.setRelative( false );
  return result;
}
origin: org.apache.directory.server/apacheds-core-shared

cursor.beforeFirst();
while ( cursor.next() )
  Entry entry = cursor.get();
cursor.close();
origin: org.apache.directory.server/apacheds-core-shared

cursor.beforeFirst();
while ( cursor.next() )
  Entry entry = cursor.get();
origin: org.apache.directory.server/apacheds-core-api

cursor.beforeFirst();
int nbEntry = 0;
while ( cursor.next() && ( nbEntry < 2 ) )
cursor.close();
origin: apache/activemq-artemis

private void dumpLdapContents() throws Exception {
 EntryFilteringCursor cursor = getService().getAdminSession().search(new Dn("ou=system"), SearchScope.SUBTREE, new PresenceNode("ObjectClass"), AliasDerefMode.DEREF_ALWAYS);
 String st = "";
 while (cursor.next()) {
   Entry entry = cursor.get();
   String ss = LdifUtils.convertToLdif(entry);
   st += ss + "\n";
 }
 System.out.println(st);
 cursor = getService().getAdminSession().search(new Dn("dc=example,dc=com"), SearchScope.SUBTREE, new PresenceNode("ObjectClass"), AliasDerefMode.DEREF_ALWAYS);
 st = "";
 while (cursor.next()) {
   Entry entry = cursor.get();
   String ss = LdifUtils.convertToLdif(entry);
   st += ss + "\n";
 }
 System.out.println(st);
}
origin: org.apache.directory.server/apacheds-interceptors-subtree

if ( aps.next() )
  aps.close();
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public void close( Exception reason )
{
  if ( IS_DEBUG )
  {
    LOG_CURSOR.debug( "Closing CursorList {}", this );
  }
  closed = true;
  for ( EntryFilteringCursor cursor : list )
  {
    try
    {
      if ( reason != null )
      {
        cursor.close( reason );
      }
      else
      {
        cursor.close();
      }
    }
    catch ( Exception e )
    {
      LOG.warn( "Failed to close the cursor" );
    }
  }
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public boolean addEntryFilter( EntryFilter filter )
{
  for ( EntryFilteringCursor efc : list )
  {
    efc.addEntryFilter( filter );
  }
  // returning hard coded value, shouldn't be a problem
  return true;
}
origin: org.apache.directory.server/apacheds-core-shared

if ( cursor.first() )
  cursor.beforeFirst();
  cursors.add( cursor );
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public boolean first() throws LdapException, CursorException
{
  if ( listSize > 0 )
  {
    index = start;
    return list.get( index ).first();
  }
  return false;
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public void beforeFirst() throws LdapException, CursorException
{
  index = 0;
  currentCursor = list.get( index );
  currentCursor.beforeFirst();
}
origin: org.apache.directory.server/apacheds-interceptors-admin

while ( results.next() )
  Entry entry = results.get();
results.close();
origin: com.github.livesense/org.liveSense.service.apacheds

cursor.beforeFirst();
while ( cursor.next() )
  Entry entry = cursor.get();
cursor.close();
origin: org.apache.directory.server/apacheds-core-jndi

public void close() throws NamingException
{
  try
  {
    cursor.close();
    available = false;
  }
  catch ( Exception e )
  {
    JndiUtils.wrap( e );
  }
}
origin: org.apache.directory.server/apacheds-test-framework

public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException
  cursor.addEntryFilter( new EntryFilter()
origin: org.apache.directory.server/apacheds-interceptors-subtree

while ( subentries.next() )
  Entry candidate = subentries.get();
  Dn candidateDn = candidate.getDn();
subentries.close();
  subentries.close();
origin: org.apache.directory.server/apacheds-interceptors-collective

/**
 * {@inheritDoc}
 */
@Override
public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException
{
  EntryFilteringCursor cursor = next( searchContext );
  // only add collective attributes for non-syncrepl search
  if ( !searchContext.isSyncreplSearch() )
  {
    cursor.addEntryFilter( searchFilter );
  }
  return cursor;
}
org.apache.directory.server.core.api.filteringEntryFilteringCursor

Javadoc

A wrapper on top of a Cursor used to filter entries we get from the backend.

Most used methods

  • get
  • next
  • close
  • addEntryFilter
    Adds an entry filter to this BaseEntryFilteringCursor at the very end of the filter list. EntryFilte
  • beforeFirst
  • first
  • afterLast
  • available
  • isFirst
  • isLast
  • last
  • previous
  • last,
  • previous,
  • setClosureMonitor

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • getSystemService (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • String (java.lang)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Notification (javax.management)
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now