Package org.apache.directory.shared.ldap.filter

Examples of org.apache.directory.shared.ldap.filter.ExprNode


        Set<String> suffixes = nexus.listSuffixes( null );
       
        for ( String suffix:suffixes )
        {
            DN baseDn = new DN( suffix );
            ExprNode filter = new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT,
                    new ClientStringValue( ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC ) );
            SearchControls ctls = new SearchControls();
            ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
           
            DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
View Full Code Here


         * Normalizes the criteria filter and the base.
         */
        public void addListener( DirectoryListener listener, NotificationCriteria criteria ) throws Exception
        {
            criteria.getBase().normalize( ds.getSchemaManager().getNormalizerMapping() );
            ExprNode result = ( ExprNode ) criteria.getFilter().accept( filterNormalizer );
            criteria.setFilter( result );
            registrations.add( new RegistrationEntry( listener, criteria ) );
        }
View Full Code Here

    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext opContext )
        throws Exception
    {
        DN base = opContext.getDn();
        SearchControls searchCtls = opContext.getSearchControls();
        ExprNode filter = opContext.getFilter();

        // We have to eliminate bad attributes from the request, accordingly
        // to RFC 2251, chap. 4.5.1. Basically, all unknown attributes are removed
        // from the list
        if ( searchCtls.getReturningAttributes() != null )
View Full Code Here

        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
        String spUnitName = StoredProcUtils.extractStoredProcUnitName( fullSPName );
       
        AttributeType at = session.getDirectoryService()
            .getSchemaManager().lookupAttributeTypeRegistry( "storedProcUnitName" );
        ExprNode filter = new EqualityNode<String>( "storedProcUnitName", new ServerStringValue( at, spUnitName ) );
        DN dn = new DN( storedProcContainer );
        EntryFilteringCursor results = session.search( dn, SearchScope.SUBTREE, filter,
            AliasDerefMode.DEREF_ALWAYS, EMPTY_ATTRIBS );
        if ( results.first() )
        {
View Full Code Here


    @Test
    public void testComplexOrRefinement() throws Exception
    {
        ExprNode refinement = null;
        ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
        String refStr = "(|(objectClass=person)(objectClass=organizationalUnit))";
       
        refinement = FilterParser.parse( refStr );
View Full Code Here


    @Test
    public void testComplexAndRefinement() throws Exception
    {
        ExprNode refinement = null;
        ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
        objectClasses.add( "organizationalUnit" );
        String refStr = "(&(objectClass=person)(objectClass=organizationalUnit))";
       
        refinement = FilterParser.parse( refStr );
View Full Code Here


    @Test
    public void testComplexNotRefinement() throws Exception
    {
        ExprNode refinement = null;
        ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
        String refStr = "(!(objectClass=person))";

        refinement = FilterParser.parse( refStr );
View Full Code Here

        {
            LOG.debug( "Search attempt using filter '" + filter + "' " + "with scope '" + scope
                + "' and a return limit of '" + limit + "'" );
        }

        ExprNode root;

        try
        {
            root = FilterParser.parse( filter );
        }
View Full Code Here

    }


    public boolean doAnnotate( String filter ) throws Exception
    {
        ExprNode root;

        try
        {
            root = FilterParser.parse( filter );
        }
View Full Code Here

        // Set the filter
        Filter filter = null;

        try
        {
            ExprNode filterNode = FilterParser.parse( searchRequest.getFilter() );

            filter = LdapTransformer.transformFilter( filterNode );
        }
        catch ( ParseException pe )
        {
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.filter.ExprNode

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.