Package javax.naming.directory

Examples of javax.naming.directory.SearchResult


            NamingEnumeration answer =
                    ctx.search(userBaseSearch.toString(), (Attributes)null);

            if (answer.hasMore())
            {
                SearchResult sr = (SearchResult) answer.next();
                Attributes attribs = sr.getAttributes();
                LDAPUser ldapUser = createLDAPUser();

                ldapUser.setLDAPAttributes(attribs);
                ldapUser.setTemp("turbine.user", ldapUser);
View Full Code Here


            NamingEnumeration answer =
                    ctx.search(userBaseSearch, filter, ctls);

            while (answer.hasMore())
            {
                SearchResult sr = (SearchResult) answer.next();
                Attributes attribs = sr.getAttributes();
                LDAPUser ldapUser = createLDAPUser();

                ldapUser.setLDAPAttributes(attribs);
                ldapUser.setTemp("turbine.user", ldapUser);
                users.add(ldapUser);
View Full Code Here

            String name = null;

            namingEnum = ctx.search(_searchContext, _searchFilter, new String[] { id }, searchControls);
            if(namingEnum.hasMore())
            {
                SearchResult result = (SearchResult) namingEnum.next();
                name = result.getNameInNamespace();
            }
            return name;
        }
        finally
        {
View Full Code Here

        try
        {
            while ( !monitor.isCanceled() && entries.hasMore() )
            {
                // get next entry to copy
                SearchResult sr = entries.next();
                LdapDN oldLdapDn = JNDIUtils.getDn( sr );
                Rdn oldRdn = oldLdapDn.getRdn();

                // reuse attributes of the entry to copy
                Attributes newAttributes = sr.getAttributes();

                // compose new DN
                Rdn newRdn = oldLdapDn.getRdn();
                if ( forceNewRdn != null )
                {
View Full Code Here

        }


        public LdifContainer next() throws NamingException
        {
            SearchResult sr = enumeration.next();
            LdapDN dn = JNDIUtils.getDn( sr );
            LdifContentRecord record = LdifContentRecord.create( dn.getUpName() );

            NamingEnumeration<? extends Attribute> attributeEnumeration = sr.getAttributes().getAll();
            while ( attributeEnumeration.hasMore() )
            {
                Attribute attribute = attributeEnumeration.next();
                String attributeName = attribute.getID();
                NamingEnumeration<?> valueEnumeration = attribute.getAll();
View Full Code Here

                try
                {
                    // delete all child entries
                    while ( !dummyMonitor.isCanceled() && !dummyMonitor.errorsReported() && result.hasMore() )
                    {
                        SearchResult sr = result.next();
                        LdapDN childDn = JNDIUtils.getDn( sr );

                        numberOfDeletedEntries = optimisticDeleteEntryRecursive( browserConnection, childDn, false,
                            false, numberOfDeletedEntries, dummyMonitor, monitor );
                        numberInBatch++;
View Full Code Here

            while ( enumeration != null && enumeration.hasMore() )
            {
                String createTimestamp = null;
                String modifyTimestamp = null;

                SearchResult sr = enumeration.next();
                NamingEnumeration<? extends Attribute> attributes = sr.getAttributes().getAll();
                while ( attributes.hasMore() )
                {
                    Attribute attribute = attributes.next();
                    if ( attribute.getID().equalsIgnoreCase( SchemaConstants.MODIFY_TIMESTAMP_AT ) )
                    {
View Full Code Here

            sp.setReturningAttributes( new String[]
                { SchemaConstants.SUBSCHEMA_SUBENTRY_AT } );
            NamingEnumeration<SearchResult> enumeration = SearchRunnable.search( browserConnection, sp, monitor );
            while ( enumeration != null && enumeration.hasMore() )
            {
                SearchResult sr = enumeration.next();
                NamingEnumeration<? extends Attribute> attributes = sr.getAttributes().getAll();
                while ( attributes.hasMore() )
                {
                    Attribute attribute = attributes.next();
                    if ( attribute.getID().equalsIgnoreCase( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) )
                    {
View Full Code Here

        if ( !monitor.errorsReported() )
        {
            // Creating and adding a search result entry or reference for each result
            while ( ne.hasMore() )
            {
                SearchResult searchResult = ( SearchResult ) ne.next();
                sr.addResponse( convertSearchResultToDsml( searchResult, searchParameter ) );
            }
        }

        // Creating and adding a search result done at the end of the results
View Full Code Here

        if ( !monitor.errorsReported() )
        {
            // Creating and adding an add request for each result
            while ( ne.hasMore() )
            {
                SearchResult searchResult = ( SearchResult ) ne.next();
                AddRequestDsml arDsml = convertToAddRequestDsml( searchResult );
                batchRequest.addRequest( arDsml );
            }
        }
View Full Code Here

TOP

Related Classes of javax.naming.directory.SearchResult

Copyright © 2018 www.massapicom. 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.