01: /*
02: * Copyright 2003-2006 Rick Knowles <winstone-devel at lists sourceforge net>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: */
07: package winstone.jndi;
08:
09: import java.util.Properties;
10:
11: import javax.naming.CompoundName;
12: import javax.naming.Name;
13: import javax.naming.NameParser;
14: import javax.naming.NamingException;
15:
16: /**
17: * The name parser for winstone jndi names
18: *
19: * @author <a href="mailto:rick_knowles@hotmail.com">Rick Knowles</a>
20: * @version $Id: WinstoneNameParser.java,v 1.2 2006/02/28 07:32:48 rickknowles Exp $
21: */
22: public class WinstoneNameParser implements NameParser {
23: private static final Properties syntax = new Properties();
24: static {
25: syntax.put("jndi.syntax.direction", "left_to_right");
26: syntax.put("jndi.syntax.separator", "/");
27: syntax.put("jndi.syntax.ignorecase", "false");
28: syntax.put("jndi.syntax.escape", "\\");
29: syntax.put("jndi.syntax.beginquote", "'");
30: }
31:
32: public Name parse(String name) throws NamingException {
33: return new CompoundName(name, syntax);
34: }
35: }
|