Package javax.naming

Examples of javax.naming.CompoundName


        syntax.put("jndi.syntax.escape", "\\");
        syntax.put("jndi.syntax.beginquote", "'");
    }

    public Name parse(String name) throws NamingException {
        return new CompoundName(name, syntax);
    }
View Full Code Here


     * @return A non-null parsed form of the name using the naming convention of
     *         this parser.
     * @exception NamingException If a naming exception was encountered.
     */
    public Name parse(final String name) throws NamingException {
        return new CompoundName(name, syntax);
    }
View Full Code Here

      return syntax;
   }

   public Name parse(String name) throws NamingException
   {
      return new CompoundName(name, syntax);
   }
View Full Code Here

         private SimpleNameParser() {
         }

         public Name parse(String name) throws NamingException {
             return new CompoundName(name, PARSER_PROPERTIES);
         }
View Full Code Here

        } catch (NamingException e) {
            // OK
        }
        assertEquals("Hello", envContext.lookup(new CompositeName("hello")));
        assertEquals("Hello", compContext.lookup(new CompositeName("env/hello")));
        assertEquals("Hello", envContext.lookup(new CompoundName("hello", syntax)));
        assertEquals("Hello", compContext.lookup(new CompoundName("env/hello", syntax)));

        assertEquals(envContext, envContext.lookup(""));
    }
View Full Code Here

    private EnterpriseNamingContextNameParser() {
    }

    public Name parse(String name) throws NamingException {
        return new CompoundName(name, PARSER_PROPERTIES);
    }
View Full Code Here

   * <p>Here we are testing if a naming exception is thrown if a name is trying of be added.</p>
   */
  public void testAddAll002(){
    try {
      LdapName x=new LdapName("t=test");
      x.addAll(1,new CompoundName("",new Properties()));
      assertNotNull(x);
    } catch (InvalidNameException e) {
      fail("Failed with:"+e);
    }
   
View Full Code Here

        props.setProperty( "jndi.syntax.ignorecase", "true" );
        props.setProperty( "jndi.syntax.trimblanks", "true" );

        Name searchBaseDn = null;

        Name ctxRoot = new CompoundName( nameInNamespace, props );
        searchBaseDn = new CompoundName( baseDn, props );

        if ( !searchBaseDn.startsWith( ctxRoot ) )
        {
            throw new NamingException( I18n.err( I18n.ERR_648, baseDn ) );
        }

        for ( int ii = 0; ii < ctxRoot.size(); ii++ )
        {
            searchBaseDn.remove( 0 );
        }

        return searchBaseDn;
View Full Code Here

            syntax.put("jndi.syntax.ignorecase", "false");
        }

        public Name parse(String name) throws NamingException
        {
            return new CompoundName(name, syntax);
        }
View Full Code Here

            syntax.put("jndi.syntax.ignorecase", "false");
        }
        public Name parse (String name)
            throws NamingException
        {
            return new CompoundName (name, syntax);
        }
View Full Code Here

TOP

Related Classes of javax.naming.CompoundName

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.