Package org.apache.ldap.common.aci.ProtectedItem

Examples of org.apache.ldap.common.aci.ProtectedItem.MaxValueCountItem


    }
   
    public void testMaxValueCount() throws Exception
    {
        Collection mvcItems = new ArrayList();
        mvcItems.add( new MaxValueCountItem( "attrA", 3 ) );
        Collection tuples = getTuples( new ProtectedItem.MaxValueCount( mvcItems ) );

        // Test wrong scope
        Assert.assertEquals(
                0, filterA.filter(
View Full Code Here


    private boolean isRemovable( ProtectedItem.MaxValueCount mvc, String attrId, Attributes entry )
    {
        for( Iterator k = mvc.iterator(); k.hasNext(); )
        {
            MaxValueCountItem mvcItem = ( MaxValueCountItem ) k.next();
            if( attrId.equalsIgnoreCase( mvcItem.getAttributeType() ) )
            {
                Attribute attr = entry.get( attrId );
                int attrCount = attr == null? 0 : attr.size();
                if( attrCount >= mvcItem.getMaxCount() )
                {
                    return true;
                }
            }
        }
View Full Code Here

                }

                ProtectedItem.MaxValueCount mvc = ( ProtectedItem.MaxValueCount ) item;
                for( Iterator j = mvc.iterator(); j.hasNext(); )
                {
                    MaxValueCountItem mvcItem = ( MaxValueCountItem ) j.next();
                    if( attrId.equalsIgnoreCase( mvcItem.getAttributeType() ) )
                    {
                        return true;
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.ldap.common.aci.ProtectedItem.MaxValueCountItem

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.