Package javax.naming

Examples of javax.naming.InvalidNameException


    public Name addAll(Name name) throws InvalidNameException {
        Vector<String> newComps;

        if (!(name instanceof DNSName)) {
            // jndi.31=Given name is not an instance of DNSName class
            throw new InvalidNameException(Messages.getString("jndi.31")); //$NON-NLS-1$
        }
        newComps = ((DNSName) name).components;
        components.addAll(newComps);
        return this;
    }
View Full Code Here


        }

        if (!isAllowedQuery
                && (parser.getFilter() != null || parser.getControls() != null)) {
            // ldap.2D=LDAP URL may only contain host, port and dn components
            throw new InvalidNameException(Messages.getString("ldap.2D")); //$NON-NLS-1$
        }

        return parser;
    }
View Full Code Here

            throws NamingException {
        checkName(name);

        if (name instanceof CompositeName && name.size() > 1) {
            if (!(name.getPrefix(0) instanceof LdapName)) {
                throw new InvalidNameException(Messages.getString("ldap.26")); //$NON-NLS-1$
            }
            /*
             * multi ns, find next ns context, delegate operation to the next
             * context
             */
 
View Full Code Here

                throw ex;
            }
            search.getSearchResult().setException(ex);
        }
        if (search.getResult().getResultCode() == LdapResult.INVALID_DN_SYNTAX) {
            throw new InvalidNameException(Messages.getString("ldap.34"));
        }
        sre = search.getSearchResult();
        names = sre.getEntries();

        keyset = names.keySet();
View Full Code Here

            LdapName lname = new LdapName(name.get(0));
            Rdn rdn = lname.getRdn(lname.size() - 1);
            return rdn.toAttributes();
        }

        throw new InvalidNameException(Messages.getString("ldap.26")); //$NON-NLS-1$
    }
View Full Code Here

    public void destroySubcontext(Name name) throws NamingException {
        checkName(name);

        if (name instanceof CompositeName && name.size() > 1) {
            if (!(name.getPrefix(0) instanceof LdapName)) {
                throw new InvalidNameException(Messages.getString("ldap.26")); //$NON-NLS-1$
            }
            /*
             * multi ns, find next ns context, delegate operation to the next
             * context
             */
 
View Full Code Here

    }

    public NameParser getNameParser(Name name) throws NamingException {
        if (name instanceof CompositeName && name.size() > 1) {
            if (!(name.getPrefix(0) instanceof LdapName)) {
                throw new InvalidNameException(Messages.getString("ldap.26")); //$NON-NLS-1$
            }
            /*
             * multi ns, find next ns context, delegate operation to the next
             * context
             */
 
View Full Code Here

            throws NamingException {
        checkName(name);

        if (name instanceof CompositeName && name.size() > 1) {
            if (!(name.getPrefix(0) instanceof LdapName)) {
                throw new InvalidNameException(Messages.getString("ldap.26")); //$NON-NLS-1$
            }
            /*
             * multi ns, find next ns context, delegate operation to the next
             * context
             */
 
View Full Code Here

            target = composeName(name, prefix);
        } else if (name instanceof CompositeName) {
            LdapName alt = new LdapName(name.get(0));
            target = composeName(alt, prefix);
        } else {
            throw new InvalidNameException(Messages.getString("ldap.26")); //$NON-NLS-1$
        }
        return target.toString();
    }
View Full Code Here

    public void rename(Name nOld, Name nNew) throws NamingException {
        checkName(nOld);
        checkName(nNew);

        if (!isInSameNamespace(nOld, nNew)) {
            throw new InvalidNameException(Messages.getString("ldap.2A")); //$NON-NLS-1$
        }

        if (nOld instanceof CompositeName && nOld.size() > 1
                && nNew instanceof CompositeName && nNew.size() > 1) {
            Context context = findNnsContext(nOld);
View Full Code Here

TOP

Related Classes of javax.naming.InvalidNameException

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.