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

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


    {
        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

        // 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

        List<ACITuple> entryTuples = new ArrayList<ACITuple>();

        for ( Value<?> value : aciAttr )
        {
            String aci = value.getString();
            ACIItem item = null;

            try
            {
                item = aciParser.parse( aci );
                entryTuples.addAll( item.toTuples() );
            }
            catch ( ParseException e )
            {
                String msg = "ACIItem parser failure on \n'" + item + "'\ndue to syntax error. "
                    + "Cannnot add ACITuples to TupleCache.\n"
View Full Code Here

        }

        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

        }

        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

        // 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

     * @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

    {
        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

        }

        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

TOP

Related Classes of org.apache.directory.shared.ldap.aci.ACIItem

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.