Examples of ACIItem


Examples of org.apache.directory.shared.ldap.aci.ACIItem

        }

        for ( Value<?> value:entryAci )
        {
            String aciString = value.getString();
            ACIItem item;

            try
            {
                item = aciParser.parse( aciString );
            }
            catch ( ParseException e )
            {
                String msg = "failed to parse entryACI: " + aciString;
                LOG.error( msg, e );
                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
            }

            tuples.addAll( item.toTuples() );
        }
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.aci.ACIItem

        }

        for ( Value<?> value:subentryAci )
        {
            String aciString = value.getString();
            ACIItem item;

            try
            {
                item = aciParser.parse( aciString );
            }
            catch ( ParseException e )
            {
                String msg = "failed to parse subentryACI: " + aciString;
                LOG.error( msg, e );
                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
            }

            tuples.addAll( item.toTuples() );
        }
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.aci.ACIItem

        // strip new lines
        input = input.replaceAll( "\\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
        input = input.replaceAll( "\\r", " " ); //$NON-NLS-1$ //$NON-NLS-2$

        ACIItemParser parser = Activator.getDefault().getACIItemParser();
        ACIItem aciItem = parser.parse( input );

        StringBuffer buffer = new StringBuffer();
        if ( aciItem != null )
        {
            aciItem.printToBuffer( buffer );
        }
        return buffer.toString();
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.aci.ACIItem

     * @throws ParseException if the syntax is invalid
     */
    public void setInput( String input ) throws ParseException
    {
        ACIItemParser parser = new ACIItemParser( null );
        ACIItem aciItem = parser.parse( input );

        if ( aciItem != null )
        {
            generalComposite.setIdentificationTag( aciItem.getIdentificationTag() );
            generalComposite.setPrecedence( aciItem.getPrecedence() );
            generalComposite.setAuthenticationLevel( aciItem.getAuthenticationLevel() );

            if ( aciItem instanceof ItemFirstACIItem )
            {
                ItemFirstACIItem itemFirstACI = ( ItemFirstACIItem ) aciItem;
                generalComposite.setItemFirst();
View Full Code Here

Examples of org.apache.directory.shared.ldap.aci.ACIItem

    {
        String identificationTag = generalComposite.getIdentificationTag();
        int precedence = generalComposite.getPrecedence();
        AuthenticationLevel authenticationLevel = generalComposite.getAuthenticationLevel();

        ACIItem aciItem = null;
        if ( generalComposite.isUserFirst() )
        {
            Collection userClasses = userFirstUserClassesComposite.getUserClasses();
            Collection userPermissions = userFirstUserPermissionsComposite.getUserPermissions();
            aciItem = new UserFirstACIItem( identificationTag, precedence, authenticationLevel, userClasses,
                userPermissions );
        }
        else if ( generalComposite.isItemFirst() )
        {
            Collection protectedItems = itemFirstProtectedItemsComposite.getProtectedItems();
            Collection itemPermissions = itemFirstItemPermissionsComposite.getItemPermissions();
            aciItem = new ItemFirstACIItem( identificationTag, precedence, authenticationLevel, protectedItems,
                itemPermissions );
        }
        else
        {
            aciItem = null;
        }

        StringBuffer buffer = new StringBuffer();
        if ( aciItem != null )
        {
            aciItem.printToBuffer( buffer );
        }
        return buffer.toString();
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.aci.ACIItem

        }

        for ( Value<?> value : entryAci )
        {
            String aciString = value.getString();
            ACIItem item;

            try
            {
                item = aciParser.parse( aciString );
            }
            catch ( ParseException e )
            {
                String msg = I18n.err( I18n.ERR_10, aciString );
                LOG.error( msg, e );
                throw new LdapOperationErrorException( msg );
            }

            tuples.addAll( item.toTuples() );
        }
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.aci.ACIItem

        }

        for ( Value<?> value : subentryAci )
        {
            String aciString = value.getString();
            ACIItem item;

            try
            {
                item = aciParser.parse( aciString );
            }
            catch ( ParseException e )
            {
                String msg = I18n.err( I18n.ERR_11, aciString );
                LOG.error( msg, e );
                throw new LdapOperationErrorException( msg );
            }

            tuples.addAll( item.toTuples() );
        }
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.aci.ACIItem

        // Loop on all the ACI, parse each of them and
        // store the associated tuples into the cache
        for ( Value<?> value : prescriptiveAci )
        {
            String aci = value.getString();
            ACIItem item = null;

            try
            {
                item = aciParser.parse( aci );
                entryTuples.addAll( item.toTuples() );
            }
            catch ( ParseException e )
            {
                String msg = I18n.err( I18n.ERR_28, item );
                LOG.error( msg, e );
View Full Code Here

Examples of org.apache.ldap.common.aci.ACIItem

        }

        for ( int ii = 0; ii < entryAci.size(); ii++ )
        {
            String aciString = ( String ) entryAci.get( ii );
            ACIItem item;

            try
            {
                item = aciParser.parse( aciString );
            }
            catch ( ParseException e )
            {
                String msg = "failed to parse entryACI: " + aciString ;
                log.error( msg, e );
                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONSERROR );
            }

            tuples.addAll( item.toTuples() );
        }
    }
View Full Code Here

Examples of org.apache.ldap.common.aci.ACIItem

        }

        for ( int ii = 0; ii < subentryAci.size(); ii++ )
        {
            String aciString = ( String ) subentryAci.get( ii );
            ACIItem item;

            try
            {
                item = aciParser.parse( aciString );
            }
            catch ( ParseException e )
            {
                String msg = "failed to parse subentryACI: " + aciString ;
                log.error( msg, e );
                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONSERROR );
            }

            tuples.addAll( item.toTuples() );
        }
    }
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.