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

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


     * {@inheritDoc}
     */
    public EntryFilteringCursor search( DN dn, String filter, boolean ignoreReferrals ) throws Exception
    {
        OperationManager operationManager = directoryService.getOperationManager();
        ExprNode filterNode = FilterParser.parse( filter );
       
        SearchOperationContext searchOperationContext = new SearchOperationContext( this, dn, SearchScope.OBJECT,
            filterNode, null );
        searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
        setReferralHandling( searchOperationContext, ignoreReferrals );
View Full Code Here


     */
    public EntryFilteringCursor search( SearchOperationContext opContext ) throws Exception
    {
        DN base = opContext.getDn();
        SearchControls searchCtls = opContext.getSearchControls();
        ExprNode filter = opContext.getFilter();
       
        // TODO since we're handling the *, and + in the EntryFilteringCursor
        // we may not need this code: we need see if this is actually the
        // case and remove this code.
        if ( base.size() == 0 )
View Full Code Here

         */
        final List<ExprNode> children = node.getChildren();

        for ( int ii = 0; ii < children.size(); ii++ )
        {
            ExprNode child = children.get( ii );
            Object count = child.get( "count" );
            if ( count == null )
            {
                continue;
            }
            value = ( Long ) count;
            minValue = Math.min( minValue, value );

            if ( minValue == value )
            {
                minIndex = ii;
            }
        }

        // Once found we build the child Evaluators minus the one for the minChild
        ExprNode minChild = children.get( minIndex );
        List<Evaluator<? extends ExprNode, ServerEntry, ID>> childEvaluators = new ArrayList<Evaluator<? extends ExprNode, ServerEntry, ID>>(
            children.size() - 1 );
        for ( ExprNode child : children )
        {
            if ( child == minChild )
View Full Code Here

     * @throws DecoderException
     */
    public static Filter convertToSharedLdapFilter( String filter ) throws IOException, ParseException,
        DecoderException
    {
        ExprNode exprNode = FilterParser.parse( filter );
        return convertToSharedLdapFilter( exprNode );
    }
View Full Code Here

    public static Filter convertToSharedLdapFilter( String filter ) throws IOException, ParseException,
        DecoderException
    {
        FilterParser filterParser = new FilterParserImpl();

        ExprNode exprNode = filterParser.parse( filter );

        return convertToSharedLdapFilter( exprNode );
    }
View Full Code Here

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

        Set<String> suffixes = nexus.listSuffixes( null );
       
        for ( String suffix:suffixes )
        {
            LdapDN baseDn = new LdapDN( 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 );
           
            LdapDN adminDn = new LdapDN( 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.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
            ExprNode result = ( ExprNode ) criteria.getFilter().accept( filterNormalizer );
            criteria.setFilter( result );
            registrations.add( new RegistrationEntry( listener, criteria ) );
        }
View Full Code Here

            String newNormName = newName.toNormName();
            subentryCache.setSubentry( newNormName, ss, subentry.getTypes() );
            next.rename( opContext );

            subentry = subentryCache.getSubentry( newNormName );
            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
            SearchControls controls = new SearchControls();
            controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
            controls.setReturningAttributes( new String[]
                { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
            EntryFilteringCursor subentries = nexus.search( new SearchOperationContext( opContext.getSession(),
View Full Code Here

            subentryCache.setSubentry( newNormName, ss, subentry.getTypes() );
            next.moveAndRename( opContext );

            subentry = subentryCache.getSubentry( newNormName );

            ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
            SearchControls controls = new SearchControls();
            controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
            controls.setReturningAttributes( new String[]
                { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES } );
            EntryFilteringCursor subentries = nexus.search( new SearchOperationContext( opContext.getSession(),
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.