Package javax.naming.directory

Examples of javax.naming.directory.SearchControls


            String filter = "(objectClass=turbinePermission)";

            /*
             * Create the default search controls.
             */
            SearchControls ctls = new SearchControls();

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

            while (answer.hasMore())
            {
View Full Code Here


            filter += ")";

            /*
             * Create the default search controls.
             */
            SearchControls ctls = new SearchControls();

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

            while (answer.hasMore())
            {
View Full Code Here

            filter = "(" + filter + "=" + username + ")";

            /*
             * Create the default search controls.
             */
            SearchControls ctls = new SearchControls();

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

            if (answer.hasMore())
View Full Code Here

            filter = "(" + filter + "=*)";

            /*
             * Create the default search controls.
             */
            SearchControls ctls = new SearchControls();

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

            while (answer.hasMore())
View Full Code Here

                    " retobj=" + retobj +
                    " deref=" + deref +
                    " filter=" + searchFilter
                      );
        }
        SearchControls searchcontrols = null;
        searchcontrols = new SearchControls(scope, countlim, timelim, attrs, retobj, deref);
        return dirContext.search(searchBase, searchFilter, searchcontrols);
    }
View Full Code Here

     **************************************************************************/
    public static NamingEnumeration<SearchResult> compare(DirContext dirContext, String filter, String entrydn) throws NamingException {
        if (dirContext == null) {
            throw new NamingException(CONTEXT_IS_NULL);
        }
        SearchControls searchcontrols = new SearchControls(0, 1, 0, new String[0], false, false);
        return dirContext.search(entrydn, filter, searchcontrols);
    }
View Full Code Here

     * @param searchFilter
     *            filter this value from the base
     */
    public boolean searchTest(String searchBase, String searchFilter) throws NamingException {
        // System.out.println("Base="+searchBase+" Filter="+searchFilter);
        SearchControls searchcontrols = new SearchControls(SearchControls.SUBTREE_SCOPE,
                1L, // count limit
                0, // time limit
                null,// attributes (null = all)
                false,// return object ?
                false);// dereference links?
View Full Code Here

        env.put(Context.SECURITY_AUTHENTICATION, "none");
        InitialDirContext ctx = createInitialDirContext(env);

        try
        {
            SearchControls searchControls = new SearchControls();
            searchControls.setReturningAttributes(new String[] {});
            searchControls.setCountLimit(1l);
            searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);
            NamingEnumeration<?> namingEnum = null;
            String name = null;

            namingEnum = ctx.search(_searchContext, _searchFilter, new String[] { id }, searchControls);
            if(namingEnum.hasMore())
View Full Code Here

     * @return the number of copied entries
     */
    static int copyEntry( IEntry entryToCopy, IEntry parent, Rdn newRdn, int scope, int numberOfCopiedEntries,
        EntryExistsCopyStrategyDialog dialog, StudioProgressMonitor dummyMonitor, StudioProgressMonitor monitor )
    {
        SearchControls searchControls = new SearchControls();
        searchControls.setCountLimit( 1 );
        searchControls.setReturningAttributes( new String[]
            { SchemaConstants.ALL_USER_ATTRIBUTES, SchemaConstants.REF_AT } );
        searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );

        // ManageDsaIT control
        Control[] controls = null;
        if ( entryToCopy.isReferral() )
        {
View Full Code Here

                            { "" + numberOfCopiedEntries } ) ); //$NON-NLS-1$

                    // copy recursively
                    if ( scope == SearchControls.ONELEVEL_SCOPE || scope == SearchControls.SUBTREE_SCOPE )
                    {
                        SearchControls searchControls = new SearchControls();
                        searchControls.setCountLimit( 0 );
                        searchControls.setReturningAttributes( new String[]
                            { SchemaConstants.ALL_USER_ATTRIBUTES, SchemaConstants.REF_AT } );
                        searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
                        NamingEnumeration<SearchResult> childEntries = sourceBrowserConnection.getConnection()
                            .getJNDIConnectionWrapper().search( oldLdapDn.getUpName(), ISearch.FILTER_TRUE,
                                searchControls, AliasDereferencingMethod.NEVER, ReferralHandlingMethod.IGNORE, null,
                                monitor, null );
View Full Code Here

TOP

Related Classes of javax.naming.directory.SearchControls

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.