Package org.apache.directory.api.ldap.model.exception

Examples of org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException


            if ( !globalOidRegistry.contains( schemaObject.getOid() ) )
            {
                // TODO : throw an exception here
                String msg = I18n.err( I18n.ERR_04302, schemaObject.getObjectType(), schemaObject.getOid() );
                LOG.error( msg );
                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
            }
        }

        SchemaObject unregistered = null;
View Full Code Here


            {
                schemaArray[n++] = schema;
            }
            else
            {
                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err(
                    I18n.ERR_11001, schemaName ) );
            }
        }

        return schemaArray;
View Full Code Here

                copy = schemaObject;
            }
            else
            {
                // We have an invalid SchemaObject, no need to go any further
                Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err(
                    I18n.ERR_11007, schemaObject.getOid() ) );
                errors.add( error );
            }
        }
View Full Code Here

    {
        if ( ( dn == null ) || dn.isEmpty() )
        {
            String message = "Cannot process an empty Dn";
            LOG.error( message );
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, message );
        }
    }
View Full Code Here

                // That means the added Dn is already present. Check if it already has an element
                if ( parentNode.hasElement() )
                {
                    String message = "Cannot add a node to a node already having an element";
                    LOG.error( message );
                    throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, message );
                }
                // We may try to add twice the same Dn, without any element
                else if ( element == null )
                {
                    String message = "Cannot add a node with no element if it already exists";
                    LOG.error( message );
                    throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, message );
                }
                // All is fine : we are just injecting some data into an existing node
                else
                {
                    parentNode.setElement( element );
View Full Code Here

        if ( ( dependents != null ) && !dependents.isEmpty() )
        {
            String msg = I18n.err( I18n.ERR_381, dependents );
            LOG.warn( msg );
            throw new LdapUnwillingToPerformException(
                ResultCodeEnum.UNWILLING_TO_PERFORM,
                msg );
        }

        // no need to check if schema is enabled or disabled here
View Full Code Here

        String rdnAttribute = newRdn.getNormType();
        String rdnAttributeOid = schemaManager.getAttributeTypeRegistry().getOidByName( rdnAttribute );

        if ( !rdnAttributeOid.equals( cnAT.getOid() ) )
        {
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
                I18n.err( I18n.ERR_382, rdnAttribute ) );
        }

        /*
         * This operation has to do the following:
View Full Code Here

     * UNWILLING_TO_PERFORM LdapException.
     */
    public void moveAndRename( Dn oriChildName, Dn newParentName, String newRn, boolean deleteOldRn,
        Entry entry, boolean cascade ) throws LdapUnwillingToPerformException
    {
        throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
            I18n.err( I18n.ERR_383 ) );
    }
View Full Code Here

     * UNWILLING_TO_PERFORM LdapException.
     */
    public void move( Dn oriChildName, Dn newParentName,
        Entry entry, boolean cascade ) throws LdapUnwillingToPerformException
    {
        throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
            I18n.err( I18n.ERR_383 ) );
    }
View Full Code Here

        if ( schema == null )
        {
            // This is not possible. We can't enable a schema which is not loaded.
            String msg = I18n.err( I18n.ERR_85, schemaName );
            LOG.error( msg );
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
        }

        return schemaManager.disable( schemaName );

    }
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.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.