Package javax.naming

Examples of javax.naming.InvalidNameException


   public void linkMembership(User user, Group g, MembershipType mt, boolean broadcast) throws Exception
   {
      if (g == null)
      {
         throw new InvalidNameException("Can not create membership record for " + user.getUserName()
            + " because group is null");
      }

      if (mt == null)
      {
         throw new InvalidNameException("Can not create membership record for " + user.getUserName()
            + " because membership type is null");
      }

      String plGroupName = getPLIDMGroupName(g.getGroupName());
View Full Code Here


  public void rename(String oldName, String newName) throws NamingException {
    throw(new NamingException("Not yet available"));
  }

  private static CompositeName merge(CompositeName path, String name) throws NamingException {   
    if (name == null) throw new InvalidNameException();
    CompositeName res = new CompositeName(name);
    trim(res);
    for (int i = path.size() - 1; i > -1 ; i--) {
      res.add(0, path.get(i));
    }
View Full Code Here

        Name n = new CompositeName(name);
        if (n.size() < 1) {
            logger.error("CompNamingContext bind empty name ?");

            throw new InvalidNameException("CompNamingContext cannot bind empty name");
        }

        if (n.size() == 1) {
            // leaf in the env tree
            if (this.bindings.get(name) != null) {
View Full Code Here

        logger.debug("rebind {0}", name);

        Name n = new CompositeName(name);
        if (n.size() < 1) {
            logger.error("CompNamingContext rebind empty name ?");
            throw new InvalidNameException("CompNamingContext cannot rebind empty name");
        }

        if (n.size() == 1) {
            // leaf in the env tree
            this.bindings.put(name, obj);
View Full Code Here

        logger.debug("unbind {0}", name);

        Name n = new CompositeName(name);
        if (n.size() < 1) {
            logger.error("CompNamingContext rebind empty name ?");
            throw new InvalidNameException("CompNamingContext cannot unbind empty name");
        }

        if (n.size() == 1) {
            // leaf in the env tree
            if (this.bindings.get(name) == null) {
View Full Code Here

        logger.debug("createSubcontext {0}", name);

        Name n = new CompositeName(name);
        if (n.size() < 1) {
            logger.error("CompNamingContext createSubcontext with empty name ?");
            throw new InvalidNameException("CompNamingContext cannot create empty Subcontext");
        }

        Context ctx = null; // returned ctx
        if (n.size() == 1) {
            // leaf in the env tree: create ctx and bind it in parent.
View Full Code Here

        {
            principalDn = new DN( getPrincipal( env ) );
        }
        catch ( LdapInvalidDnException lide )
        {
            throw new InvalidNameException( I18n.err( I18n.ERR_733, env ) );
        }
       
        byte[] credential = getCredential( env );
        String authentication = getAuthentication( env );
        String providerUrl = getProviderUrl( env );
View Full Code Here

   public Object lookup(String name) throws NamingException
   {
      Object binding = null;
      if( name == null || name.length() == 0 )
         throw new InvalidNameException("name cannot be null or empty");

      if( name.equals(ACTIVE_SUBJECT) )
         binding = getSubject();
      else if( name.equals(AUTHENTICATION_MGR) )
         binding = securityMgr;
View Full Code Here

        {
            principalDn = new Dn( service.getSchemaManager(), getPrincipal( env ) );
        }
        catch ( LdapInvalidDnException lide )
        {
            throw new InvalidNameException( I18n.err( I18n.ERR_733, env ) );
        }

        ServerLdapContext ctx = null;
        try
        {
View Full Code Here

                {
                    return JndiUtils.toName( new Dn( name ) );
                }
                catch ( LdapInvalidDnException lide )
                {
                    throw new InvalidNameException( lide.getMessage() );
                }
            }
        };
    }
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.