Examples of RestrictedByElem


Examples of org.apache.directory.api.ldap.aci.protectedItem.RestrictedByElem

        else if ( item.getClass() == RestrictedByItem.class )
        {
            RestrictedByItem rb = ( RestrictedByItem ) item;
            for ( Iterator<RestrictedByElem> it = rb.iterator(); it.hasNext(); )
            {
                RestrictedByElem rbe = it.next();
                values.add( rbe.toString() );
            }
        }
        else if ( item.getClass() == ClassesItem.class )
        {
            ClassesItem classes = ( ClassesItem ) item;
View Full Code Here

Examples of org.apache.directory.api.ldap.aci.protectedItem.RestrictedByElem

            {
                RestrictedByItem rb = ( RestrictedByItem ) item;

                for ( Iterator<RestrictedByElem> k = rb.iterator(); k.hasNext(); )
                {
                    RestrictedByElem rbItem = k.next();

                    // TODO Fix DIRSEVER-832
                    if ( attributeType.equals( rbItem.getAttributeType() ) )
                    {
                        Attribute attr = entry.get( rbItem.getValuesIn() );

                        // TODO Fix DIRSEVER-832
                        if ( ( attr == null ) || !attr.contains( attrValue ) )
                        {
                            return true;
View Full Code Here

Examples of org.apache.directory.api.ldap.aci.protectedItem.RestrictedByElem

                RestrictedByItem rb = ( RestrictedByItem ) item;

                for ( Iterator<RestrictedByElem> j = rb.iterator(); j.hasNext(); )
                {
                    RestrictedByElem rbItem = j.next();

                    if ( oid.equals( rbItem.getAttributeType().getOid() ) )
                    {
                        return true;
                    }
                }
            }
View Full Code Here

Examples of org.apache.directory.api.ldap.aci.protectedItem.RestrictedByElem

        ENTRY.put( "cn", "1", "2" );
        CN_AT = schemaManager.lookupAttributeTypeRegistry( "cn" );
        SN_AT = schemaManager.lookupAttributeTypeRegistry( "sn" );

        Set<RestrictedByElem> mvcItems = new HashSet<RestrictedByElem>();
        mvcItems.add( new RestrictedByElem( SN_AT, CN_AT ) );
        PROTECTED_ITEMS.add( new RestrictedByItem( mvcItems ) );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.aci.protectedItem.RestrictedByElem

     */
    @Before
    public void initNames() throws Exception
    {
        elemsA = new HashSet<RestrictedByElem>();
        elemsA.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) ) );
        elemsA.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "bb" ) ) );
        elemsA.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "cc" ) ) );
        // Sets aren't ordered, so adding order must not matter
        elemsB = new HashSet<RestrictedByElem>();
        elemsB.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "bb" ) ) );
        elemsB.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "cc" ) ) );
        elemsB.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) ) );
        elemsC = new HashSet<RestrictedByElem>();
        elemsC.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) ) );
        elemsC.add( new RestrictedByElem( new AttributeType( "bb" ), new AttributeType( "bb" ) ) );
        elemsC.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "cc" ) ) );
        elemsD = new HashSet<RestrictedByElem>();
        elemsD.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) ) );
        elemsD.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "bb" ) ) );
        elemsD.add( new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "dd" ) ) );
        restrictedByItemA = new RestrictedByItem( elemsA );
        restrictedByItemACopy = new RestrictedByItem( elemsA );
        restrictedByItemB = new RestrictedByItem( elemsB );
        restrictedByItemC = new RestrictedByItem( elemsC );
        restrictedByItemD = new RestrictedByItem( elemsD );
View Full Code Here

Examples of org.apache.directory.api.ldap.aci.protectedItem.RestrictedByElem

     * Initialize name instances
     */
    @Before
    public void initNames() throws Exception
    {
        RestrictedByElem rbiA = new RestrictedByElem( new AttributeType( "aa" ), new AttributeType( "aa" ) );
        RestrictedByElem rbiB = new RestrictedByElem( new AttributeType( "bb" ), new AttributeType( "bb" ) );
        RestrictedByElem rbiC = new RestrictedByElem( new AttributeType( "cc" ), new AttributeType( "cc" ) );
        RestrictedByElem rbiD = new RestrictedByElem( new AttributeType( "dd" ), new AttributeType( "dd" ) );

        Set<RestrictedByElem> colA = new HashSet<RestrictedByElem>();
        colA.add( rbiA );
        colA.add( rbiB );
        colA.add( rbiC );
View Full Code Here

Examples of org.apache.directory.api.ldap.aci.protectedItem.RestrictedByElem

    @Test
    public void testRestrictedBy() throws Exception
    {
        Set<RestrictedByElem> rbItems = new HashSet<RestrictedByElem>();
        rbItems.add( new RestrictedByElem( CN_AT, SN_AT ) );
        Collection<ACITuple> tuples = getTuples( new RestrictedByItem( rbItems ) );

        // Test wrong scope
        AciContext aciContext = new AciContext( null, null );
        aciContext.setAciTuples( tuples );
View Full Code Here

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

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

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

    @Test
    public void testRestrictedBy() throws Exception
    {
        Set<RestrictedByElem> rbItems = new HashSet<RestrictedByElem>();
        rbItems.add( new RestrictedByElem( CN_AT, SN_AT ) );
        Collection<ACITuple> tuples = getTuples( new RestrictedByItem( rbItems ) );

        // Test wrong scope
        AciContext aciContext = new AciContext( null, null );
        aciContext.setAciTuples( tuples );
View Full Code Here

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

        ENTRY.put( "cn", "1", "2" );
        CN_AT = schemaManager.lookupAttributeTypeRegistry( "cn" );
        SN_AT = schemaManager.lookupAttributeTypeRegistry( "sn" );

        Set<RestrictedByElem> mvcItems = new HashSet<RestrictedByElem>();
        mvcItems.add( new RestrictedByElem( SN_AT, CN_AT ) );
        PROTECTED_ITEMS.add( new RestrictedByItem( mvcItems ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.