Package org.apache.directory.shared.ldap.aci.protectedItem

Examples of org.apache.directory.shared.ldap.aci.protectedItem.RestrictedByItem


            {
                ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
           
                for ( Iterator<RestrictedByItem> k = rb.iterator(); k.hasNext(); )
                {
                    RestrictedByItem rbItem = k.next();
               
                    // TODO Fix DIRSEVER-832
                    if ( attrId.equalsIgnoreCase( rbItem.getAttributeType() ) )
                    {
                        EntryAttribute attr = entry.get( rbItem.getValuesIn() );
                       
                        // TODO Fix DIRSEVER-832
                        if ( ( attr == null ) || !attr.contains( attrValue ) )
                        {
                            return true;
View Full Code Here


    @Test
    public void testRestrictedBy() throws Exception
    {
        Collection<RestrictedByItem> rbItems = new ArrayList<RestrictedByItem>();
        rbItems.add( new RestrictedByItem( "cn", "sn" ) );
        Collection<ACITuple> tuples = getTuples( new ProtectedItem.RestrictedBy( rbItems ) );

        // Test wrong scope
        assertEquals( 0, filterA.filter( null, tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
            "cn", null, null, null, null ).size() );
View Full Code Here

                }

                ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
                for ( Iterator<RestrictedByItem> j = rb.iterator(); j.hasNext(); )
                {
                    RestrictedByItem rbItem = j.next();
                    if ( oid.equals( schemaManager.getAttributeTypeRegistry().getOidByName( rbItem.getAttributeType() ) ) )
                    {
                        return true;
                    }
                }
            }
View Full Code Here

    @Test
    public void testRestrictedBy() throws Exception
    {
        Collection<RestrictedByItem> rbItems = new ArrayList<RestrictedByItem>();
        rbItems.add( new RestrictedByItem( "cn", "sn" ) );
        Collection<ACITuple> tuples = getTuples( new ProtectedItem.RestrictedBy( rbItems ) );

        // Test wrong scope
        assertEquals( 0, filterA.filter( null, tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
            "cn", null, null, null, null ).size() );
View Full Code Here

                }

                ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
                for ( Iterator<RestrictedByItem> j = rb.iterator(); j.hasNext(); )
                {
                    RestrictedByItem rbItem = j.next();
                    if ( oid.equals( schemaManager.getAttributeTypeRegistry().getOidByName( rbItem.getAttributeType() ) ) )
                    {
                        return true;
                    }
                }
            }
View Full Code Here

            {
                ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
           
                for ( Iterator<RestrictedByItem> k = rb.iterator(); k.hasNext(); )
                {
                    RestrictedByItem rbItem = k.next();
               
                    // TODO Fix DIRSEVER-832
                    if ( attrId.equalsIgnoreCase( rbItem.getAttributeType() ) )
                    {
                        EntryAttribute attr = entry.get( rbItem.getValuesIn() );
                       
                        // TODO Fix DIRSEVER-832
                        if ( ( attr == null ) || !attr.contains( attrValue ) )
                        {
                            return true;
View Full Code Here

            {
                ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
           
                for ( Iterator<RestrictedByItem> k = rb.iterator(); k.hasNext(); )
                {
                    RestrictedByItem rbItem = k.next();
               
                    // TODO Fix DIRSEVER-832
                    if ( attrId.equalsIgnoreCase( rbItem.getAttributeType() ) )
                    {
                        EntryAttribute attr = entry.get( rbItem.getValuesIn() );
                       
                        // TODO Fix DIRSEVER-832
                        if ( ( attr == null ) || !attr.contains( attrValue ) )
                        {
                            return true;
View Full Code Here

                }

                ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
                for ( Iterator<RestrictedByItem> j = rb.iterator(); j.hasNext(); )
                {
                    RestrictedByItem rbItem = j.next();
                    if ( oid.equals( oidRegistry.getOid( rbItem.getAttributeType() ) ) )
                    {
                        return true;
                    }
                }
            }
View Full Code Here


    @Test public void testRestrictedBy() throws Exception
    {
        Collection<RestrictedByItem> rbItems = new ArrayList<RestrictedByItem>();
        rbItems.add( new RestrictedByItem( "cn", "sn" ) );
        Collection<ACITuple> tuples = getTuples( new ProtectedItem.RestrictedBy( rbItems ) );

        // Test wrong scope
        assertEquals( 0, filterA.filter( null, tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
            "cn", null, null, null, null ).size() );
View Full Code Here

                if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
                {
                    continue;
                }

                RestrictedByItem rb = ( RestrictedByItem ) item;
               
                for ( Iterator<RestrictedByElem> j = rb.iterator(); j.hasNext(); )
                {
                    RestrictedByElem rbItem = j.next();
                   
                    if ( oid.equals( rbItem.getAttributeType().getOid() ) )
                    {
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.aci.protectedItem.RestrictedByItem

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.