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

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


            if ( parent == null )
            {
                // We don't have any AC administrativePoint in the tree, this is an error
                String message = "Cannot add an IAP with no parent : " + adminPoint;
                LOG.error( message );
                throw new LdapUnwillingToPerformException( message );
            }
        }
        else if ( isCollectiveAttributeInnerRole( role ) )
        {
            DnNode<CollectiveAttributeAdministrativePoint> caCache = directoryService.getCollectiveAttributeAPCache();

            boolean hasAP = caCache.hasParentElement( dn );

            if ( !hasAP )
            {
                // We don't have any AC administrativePoint in the tree, this is an error
                String message = "Cannot add an IAP with no parent : " + adminPoint;
                LOG.error( message );
                throw new LdapUnwillingToPerformException( message );
            }
        }
        else if ( isTriggerExecutionInnerRole( role ) )
        {
            DnNode<TriggerExecutionAdministrativePoint> caCache = directoryService.getTriggerExecutionAPCache();

            DnNode<TriggerExecutionAdministrativePoint> parent = caCache.getNode( dn );

            if ( parent == null )
            {
                // We don't have any AC administrativePoint in the tree, this is an error
                String message = "Cannot add an IAP with no parent : " + adminPoint;
                LOG.error( message );
                throw new LdapUnwillingToPerformException( message );
            }
        }
        else
        {
            // Wtf ? We *must* have an IAP here...
            String message = "This is not an IAP : " + role;
            LOG.error( message );
            throw new LdapUnwillingToPerformException( message );
        }
    }
View Full Code Here


        {
            if ( !isValidRole( role.getString() ) )
            {
                String message = "Cannot remove the given role, it's not a valid one :" + role;
                LOG.error( message );
                throw new LdapUnwillingToPerformException( message );
            }
        }

        // Ok, we can remove the AP
        next( deleteContext );
View Full Code Here

                    case REPLACE_ATTRIBUTE:
                        // Not supported
                        String msg = "Cannot replace an administrative role, the opertion is not supported";
                        LOG.error( msg );
                        throw new LdapUnwillingToPerformException( msg );
                }
            }
        }

        // At this point, we have a new AdministrativeRole AT, and we need to get the lists of
View Full Code Here

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

            else
            {
                String msg = I18n.err( I18n.ERR_352, entry.getDn().getName(), Strings.listToString(
                    errors ) );
                LOG.info( msg );
                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
            }
        }
        else
        {
            LOG.debug( "The Comparator {} cannot be deleted from the disabled schema {}", dn.getName(), schemaName );
View Full Code Here

        }

        // Else throw an UnwillingToPerform exception ATM
        String message = "Cannot move an Administrative Point in the current version";
        LOG.error( message );
        throw new LdapUnwillingToPerformException( message );
    }
View Full Code Here

        }

        // Else throw an UnwillingToPerform exception ATM
        String message = "Cannot move and rename an Administrative Point in the current version";
        LOG.error( message );
        throw new LdapUnwillingToPerformException( message );
    }
View Full Code Here

    {
        String oldOid = getOid( entry );

        if ( schemaManager.getMatchingRuleRegistry().contains( oldOid ) )
        {
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
                I18n.err( I18n.ERR_353, oldOid ) );
        }

        String oid = newRdn.getNormValue().getString();
        checkOidIsUniqueForComparator( oid );
View Full Code Here

        }

        // Else throw an UnwillingToPerform exception ATM
        String message = "Cannot rename an Administrative Point in the current version";
        LOG.error( message );
        throw new LdapUnwillingToPerformException( message );
    }
View Full Code Here

        checkNewParent( newParentName );
        String oldOid = getOid( entry );

        if ( schemaManager.getMatchingRuleRegistry().contains( oldOid ) )
        {
            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
                I18n.err( I18n.ERR_353, oldOid ) );
        }

        String oid = newRdn.getNormValue().getString();
        checkOidIsUniqueForComparator( oid );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.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.