Package org.apache.directory.shared.ldap.exception

Examples of org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException


        if ( !isSchemaLoaded( oldSchemaName ) )
        {
            String msg = I18n.err( I18n.ERR_348, oldSchemaName );
            LOG.warn( msg );
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
        }

        if ( !isSchemaLoaded( newSchemaName ) )
        {
            String msg = I18n.err( I18n.ERR_349, newSchemaName );
            LOG.warn( msg );
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
        }

        deleteFromSchema( oldAt, oldSchemaName );
        addToSchema( newAt, newSchemaName );
View Full Code Here


        if ( !isSchemaLoaded( oldSchemaName ) )
        {
            String msg = "Cannot move a schemaObject from a not loaded schema " + oldSchemaName;
            LOG.warn( msg );
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
        }

        if ( !isSchemaLoaded( newSchemaName ) )
        {
            String msg = I18n.err( I18n.ERR_349, newSchemaName );
            LOG.warn( msg );
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
        }

        deleteFromSchema( oldAt, oldSchemaName );
        addToSchema( newAt, newSchemaName );
View Full Code Here

            {
                // We have some error : reject the addition and get out
                String msg = I18n.err( I18n.ERR_360, entry.getDn().getName(),
                    StringTools.listToString( schemaManager.getErrors() ) );
                LOG.info( msg );
                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
            }
        }
        else
        {
            LOG.debug( "The MztchingRule {} cannot be added in the disabled schema {}.", matchingRule, schemaName );
View Full Code Here

                // We have some error : reject the deletion and get out
                // The schema is disabled. We still have to update the backend
                String msg = I18n.err( I18n.ERR_360, entry.getDn().getName(),
                    StringTools.listToString( schemaManager.getErrors() ) );
                LOG.info( msg );
                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
            }
        }
        else
        {
            LOG.debug( "Removed {} from the disabled schema {}", matchingRule, schemaName );
View Full Code Here

    {
        DN name = opContext.getDn();
       
        if ( name.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
        {
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
                I18n.err( I18n.ERR_253, subschemSubentryDn ) );
        }
       
        // check if entry to delete exists
        String msg = "Attempt to delete non-existant entry: ";
View Full Code Here

    {
        DN dn = opContext.getDn();
       
        if ( dn.equals( subschemSubentryDn ) )
        {
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_255, subschemSubentryDn,
                    subschemSubentryDn ) );
        }
       
        // Check to see if the renamed entry exists
        if ( opContext.getEntry() == null )
View Full Code Here

        DN oriChildName = opContext.getDn();
        DN newParentName = opContext.getParent();
       
        if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
        {
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_258, subschemSubentryDn,
                    subschemSubentryDn ) );
        }
       
        // check if child to move exists
        String msg = "Attempt to move to non-existant parent: ";
View Full Code Here

        DN oriChildName = opContext.getDn();
        DN parent = opContext.getParent();

        if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
        {
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_258, subschemSubentryDn,
                    subschemSubentryDn ) );
        }
       
        // check if child to move exists
        String msg = "Attempt to move to non-existant parent: ";
View Full Code Here

        if ( level == AuthenticationLevel.UNAUTHENT )
        {
            // This is a case where the Bind request contains a DN, but no password.
            // We don't check the DN, we just return a UnwillingToPerform error
            // Cf RFC 4513, chap. 5.1.2
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, "Cannot Bind for DN " + opContext.getDn().getName() );
        }

        Collection<Authenticator> authenticators = getAuthenticators( level.getName() );

        if ( authenticators == null )
View Full Code Here

            }
        }

        if ( invalid )
        {
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
                "cannot place an entry below itself" );
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException

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.