Examples of EntryFilteringCursor


Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

    /* (non-Javadoc)
     * @see org.apache.directory.server.core.partition.Partition#list(org.apache.directory.server.core.interceptor.context.ListOperationContext)
     */
    public EntryFilteringCursor list( ListOperationContext opContext ) throws Exception
    {
        return new EntryFilteringCursor()
        {
           
            public Iterator<ClonedServerEntry> iterator()
            {
                return EmptyIterator.INSTANCE;
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

                return attributeTypeList;
            }

            LOG.debug( "{} schema: loading attributeTypes", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            // Loop on all the AttributeTypes and add them to the list
            while ( list.next() )
            {
                ServerEntry result = list.get();

                attributeTypeList.add( result );
            }
        }
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

                return comparatorList;
            }

            LOG.debug( "{} schema: loading comparators", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            while ( list.next() )
            {
                ClonedServerEntry entry = list.get();

                comparatorList.add( entry );
            }
        }
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

                return matchingRuleList;
            }

            LOG.debug( "{} schema: loading matchingRules", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            while ( list.next() )
            {
                ServerEntry entry = list.get();

                matchingRuleList.add( entry );
            }
        }
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

                return normalizerList;
            }

            LOG.debug( "{} schema: loading normalizers", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            while ( list.next() )
            {
                ClonedServerEntry entry = list.get();

                normalizerList.add( entry );
            }
        }
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

                return objectClassList;
            }

            LOG.debug( "{} schema: loading objectClasses", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            while ( list.next() )
            {
                ClonedServerEntry entry = list.get();

                objectClassList.add( entry );
            }
        }
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

                return syntaxList;
            }

            LOG.debug( "{} schema: loading syntaxes", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            while ( list.next() )
            {
                ServerEntry entry = list.get();

                syntaxList.add( entry );
            }
        }
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

                return syntaxCheckerList;
            }

            LOG.debug( "{} schema: loading syntaxCsheckers", schema.getSchemaName() );

            EntryFilteringCursor list = partition.list( new ListOperationContext( null, dn ) );

            while ( list.next() )
            {
                ServerEntry entry = list.get();

                syntaxCheckerList.add( entry );
            }
        }
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

        {
            PagedSearchContext oldContext = pagedSearchContexts.put( context.getCookieValue(), context );
           
            if ( oldContext != null )
            {
                EntryFilteringCursor cursor = oldContext.getCursor();
               
                if ( cursor != null )
                {
                    try
                    {
                        cursor.close();
                    }
                    catch ( Exception e )
                    {
                        LOG.error( I18n.err( I18n.ERR_172, e.getLocalizedMessage() ) );
                    }
View Full Code Here

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

     * @throws Exception if there are problems while searching the directory
     */
    public static ServerEntry findPrincipalEntry( CoreSession session, DN searchBaseDn, String principal )
        throws Exception
    {
        EntryFilteringCursor cursor = null;
       
        try
        {
            SchemaManager schemaManager = session.getDirectoryService().getSchemaManager();
            cursor = session.search( searchBaseDn, SearchScope.SUBTREE,
                getFilter( schemaManager, principal ), AliasDerefMode.DEREF_ALWAYS, null );
   
            cursor.beforeFirst();
            if ( cursor.next() )
            {
                ServerEntry entry = cursor.get();
                LOG.debug( "Found entry {} for kerberos principal name {}", entry, principal );
               
                while ( cursor.next() )
                {
                    LOG.error( I18n.err( I18n.ERR_149, principal, cursor.next() ) );
                }
               
                return entry;
            }
            else
            {
                LOG.warn( "No server entry found for kerberos principal name {}", principal );
                return null;
            }
        }
        finally
        {
            if ( cursor != null )
            {
                cursor.close();
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.