Package javax.naming.directory

Examples of javax.naming.directory.SchemaViolationException


        Hashtable<String, Object> subSchemaTree = doLookup(name
                .getPrefix(size - 1), size - 1);

        if (null == attributes || attributes.size() == 0) {
            // jndi.8D=Must supply attributes describing schema
            throw new SchemaViolationException(Messages.getString("jndi.8D")); //$NON-NLS-1$
        }

        if (level - size == 2) {
            // jndi.8E=Cannot create new entry under schema root
            throw new SchemaViolationException(Messages.getString("jndi.8E")); //$NON-NLS-1$
        }

        String subSchemaType = name.getSuffix(size - 1).toString();

        if (subSchemaTree.get(subSchemaType.toLowerCase()) != null) {
View Full Code Here


        // First get the old schema.
        int size = name.size();

        if (size < 1) {
            // ldap.38=Can't modify schema root
            throw new SchemaViolationException(Messages.getString("ldap.38")); //$NON-NLS-1$
        }

        Hashtable<String, Object> subSchemaTree = doLookup(name
                .getPrefix(size - 1), size - 1);

        String subSchemaType = name.getSuffix(size - 1).toString()
                .toLowerCase();

        Object schema = subSchemaTree.get(jndi2ldap(subSchemaType));
        if (schema == null) {
            throw new NameNotFoundException(name.toString());
        }

        if (level - size == 2) {
            // ldap.38=Can't modify schema root
            throw new SchemaViolationException(Messages.getString("ldap.38")); //$NON-NLS-1$
        }

        if (modificationItems.length == 0) {
            return;
        }
View Full Code Here

            return;
        }

        if (level - size == 2) {
            // ldap.37=Can't delete schema root
            throw new SchemaViolationException(Messages.getString("ldap.37")); //$NON-NLS-1$
        }

        if (level == size) {
            // Return silently.
            return;
View Full Code Here

        if (nOld.size() > 1 || nNew.size() > 1) {
            // ldap.3B=Can't rename across contexts
            throw new InvalidNameException(Messages.getString("ldap.3B")); //$NON-NLS-1$
        }
        // ldap.39=Can't rename schema
        throw new SchemaViolationException(Messages.getString("ldap.39")); //$NON-NLS-1$
    }
View Full Code Here

        Hashtable<String, Object> subSchemaTree = doLookup(name
                .getPrefix(size - 1), size - 1);

        if (null == attributes || attributes.size() == 0) {
            // jndi.8D=Must supply attributes describing schema
            throw new SchemaViolationException(Messages.getString("jndi.8D")); //$NON-NLS-1$
        }

        if (level - size == 2) {
            // jndi.8E=Cannot create new entry under schema root
            throw new SchemaViolationException(Messages.getString("jndi.8E")); //$NON-NLS-1$
        }

        String subSchemaType = name.getSuffix(size - 1).toString();

        if (subSchemaTree.get(subSchemaType.toLowerCase()) != null) {
View Full Code Here

        // First get the old schema.
        int size = name.size();

        if (size < 1) {
            // ldap.38=Can't modify schema root
            throw new SchemaViolationException(Messages.getString("ldap.38")); //$NON-NLS-1$
        }

        Hashtable<String, Object> subSchemaTree = doLookup(name
                .getPrefix(size - 1), size - 1);

        String subSchemaType = name.getSuffix(size - 1).toString()
                .toLowerCase();

        Object schema = subSchemaTree.get(jndi2ldap(subSchemaType));
        if (schema == null) {
            throw new NameNotFoundException(name.toString());
        }

        if (level - size == 2) {
            // ldap.38=Can't modify schema root
            throw new SchemaViolationException(Messages.getString("ldap.38")); //$NON-NLS-1$
        }

        if (modificationItems.length == 0) {
            return;
        }
View Full Code Here

            return;
        }

        if (level - size == 2) {
            // ldap.37=Can't delete schema root
            throw new SchemaViolationException(Messages.getString("ldap.37")); //$NON-NLS-1$
        }

        if (level == size) {
            // Return silently.
            return;
View Full Code Here

        if (nOld.size() > 1 || nNew.size() > 1) {
            // ldap.3B=Can't rename across contexts
            throw new InvalidNameException(Messages.getString("ldap.3B")); //$NON-NLS-1$
        }
        // ldap.39=Can't rename schema
        throw new SchemaViolationException(Messages.getString("ldap.39")); //$NON-NLS-1$
    }
View Full Code Here

        {
            ne = new WrappedPartialResultException( ( LdapPartialResultException ) t );
        }
        else if ( t instanceof LdapSchemaViolationException )
        {
            ne = new SchemaViolationException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapServiceUnavailableException )
        {
            ne = new ServiceUnavailableException( t.getLocalizedMessage() );
        }
View Full Code Here

        Hashtable<String, Object> subSchemaTree = doLookup(name
                .getPrefix(size - 1), size - 1);

        if (null == attributes || attributes.size() == 0) {
            // jndi.8D=Must supply attributes describing schema
            throw new SchemaViolationException(Messages.getString("jndi.8D")); //$NON-NLS-1$
        }

        if (level - size == 2) {
            // jndi.8E=Cannot create new entry under schema root
            throw new SchemaViolationException(Messages.getString("jndi.8E")); //$NON-NLS-1$
        }

        String subSchemaType = name.getSuffix(size - 1).toString();

        if (subSchemaTree.get(subSchemaType.toLowerCase()) != null) {
View Full Code Here

TOP

Related Classes of javax.naming.directory.SchemaViolationException

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.