Tabnine Logo
org.apache.directory.server.core.api.filtering
Code IndexAdd Tabnine to your IDE (free)

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

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

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

  /**
   * @see Object#toString()
   */
  public String toString()
  {
    return toString( "" );
  }
}
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-api

  /**
   * {@inheritDoc}
   */
  public void setClosureMonitor( ClosureMonitor monitor )
  {
    for ( EntryFilteringCursor c : list )
    {
      c.setClosureMonitor( monitor );
    }
  }
}
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-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 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-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-core-api

/**
 * {@inheritDoc}
 */
public boolean isFirst()
{
  return ( listSize > 0 ) && ( index == start ) && list.get( index ).isFirst();
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public void close()
{
  if ( IS_DEBUG )
  {
    LOG_CURSOR.debug( "Closing CursorList {}", this );
  }
  close( null );
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public boolean available()
{
  if ( ( index >= 0 ) && ( index < end ) )
  {
    return list.get( index ).available();
  }
  return false;
}
origin: org.apache.directory.server/apacheds-core-api

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

/**
 * {@inheritDoc}
 */
public void afterLast() throws LdapException, CursorException
{
  index = end - 1;
  currentCursor = list.get( index );
  currentCursor.afterLast();
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public boolean isLast()
{
  return ( listSize > 0 ) && ( index == end - 1 ) && list.get( index ).isLast();
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public boolean previous() throws LdapException, CursorException
{
  while ( index > -1 )
  {
    currentCursor = list.get( index );
    if ( currentCursor.previous() )
    {
      return true;
    }
    else
    {
      index--;
    }
  }
  return false;
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * {@inheritDoc}
 */
public Entry get() throws InvalidCursorPositionException
{
  if ( available() )
  {
    return prefetched;
  }
  throw new InvalidCursorPositionException();
}
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-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.filtering

Most used classes

  • EntryFilteringCursor
    A wrapper on top of a Cursor used to filter entries we get from the backend.
  • EntryFilteringCursorImpl
    A Cursor which uses a list of filters to selectively return entries and/or modify the contents of en
  • CursorList
    An implementation of a Cursor based on a List of Cursors. Optionally, the Cursor may be limited to a
  • EntryFilter
    An entry filter is used to modify search results while they are being returned from Cursors over Ser
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