src/java.naming/share/classes/javax/naming/directory/InitialDirContext.java
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 32029 jdk/src/java.naming/share/classes/javax/naming/directory/InitialDirContext.java@a5538163e144
child 52493 a609d549992a
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4349
diff changeset
     2
 * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4349
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4349
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4349
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4349
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4349
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
package javax.naming.directory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.util.Hashtable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import javax.naming.spi.NamingManager;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import javax.naming.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * This class is the starting context for performing
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * directory operations. The documentation in the class description
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * of InitialContext (including those for synchronization) apply here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * @author Rosanna Lee
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * @author Scott Seligman
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * @see javax.naming.InitialContext
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
public class InitialDirContext extends InitialContext implements DirContext {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
     * Constructs an initial DirContext with the option of not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
     * initializing it.  This may be used by a constructor in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
     * a subclass when the value of the environment parameter
32029
a5538163e144 8132877: docs: replace <tt> tags (obsolete in html5) for javax.naming
avstepan
parents: 25859
diff changeset
    52
     * is not yet known at the time the {@code InitialDirContext}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
     * constructor is called.  The subclass's constructor will
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     * call this constructor, compute the value of the environment,
32029
a5538163e144 8132877: docs: replace <tt> tags (obsolete in html5) for javax.naming
avstepan
parents: 25859
diff changeset
    55
     * and then call {@code init()} before returning.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
     * @param lazy
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
     *          true means do not initialize the initial DirContext; false
32029
a5538163e144 8132877: docs: replace <tt> tags (obsolete in html5) for javax.naming
avstepan
parents: 25859
diff changeset
    59
     *          is equivalent to calling {@code new InitialDirContext()}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
     * @throws  NamingException if a naming exception is encountered
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * @see InitialContext#init(Hashtable)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * @since 1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    protected InitialDirContext(boolean lazy) throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
        super(lazy);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
     * Constructs an initial DirContext.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
     * No environment properties are supplied.
32029
a5538163e144 8132877: docs: replace <tt> tags (obsolete in html5) for javax.naming
avstepan
parents: 25859
diff changeset
    72
     * Equivalent to {@code new InitialDirContext(null)}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * @throws  NamingException if a naming exception is encountered
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * @see #InitialDirContext(Hashtable)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    public InitialDirContext() throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        super();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     * Constructs an initial DirContext using the supplied environment.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * Environment properties are discussed in the
32029
a5538163e144 8132877: docs: replace <tt> tags (obsolete in html5) for javax.naming
avstepan
parents: 25859
diff changeset
    85
     * {@code javax.naming.InitialContext} class description.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     *
32029
a5538163e144 8132877: docs: replace <tt> tags (obsolete in html5) for javax.naming
avstepan
parents: 25859
diff changeset
    87
     * <p> This constructor will not modify {@code environment}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * or save a reference to it, but may save a clone.
4349
c72a4e2ec170 6886058: JNDI LDAP InitialLdapContext SECURITY_CREDENTIALS byte[] can be corrupted, then LDAP referral fails
weijun
parents: 2
diff changeset
    89
     * Caller should not modify mutable keys and values in
32029
a5538163e144 8132877: docs: replace <tt> tags (obsolete in html5) for javax.naming
avstepan
parents: 25859
diff changeset
    90
     * {@code environment} after it has been passed to the constructor.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * @param environment
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     *          environment used to create the initial DirContext.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     *          Null indicates an empty environment.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * @throws  NamingException if a naming exception is encountered
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    public InitialDirContext(Hashtable<?,?> environment)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        super(environment);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    private DirContext getURLOrDefaultInitDirCtx(String name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
        Context answer = getURLOrDefaultInitCtx(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        if (!(answer instanceof DirContext)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
            if (answer == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
                throw new NoInitialContextException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
                throw new NotContextException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                    "Not an instance of DirContext");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        return (DirContext)answer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    private DirContext getURLOrDefaultInitDirCtx(Name name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        Context answer = getURLOrDefaultInitCtx(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        if (!(answer instanceof DirContext)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            if (answer == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
                throw new NoInitialContextException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                throw new NotContextException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                    "Not an instance of DirContext");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        return (DirContext)answer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
// DirContext methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
// Most Javadoc is deferred to the DirContext interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    public Attributes getAttributes(String name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        return getAttributes(name, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    public Attributes getAttributes(String name, String[] attrIds)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        return getURLOrDefaultInitDirCtx(name).getAttributes(name, attrIds);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    public Attributes getAttributes(Name name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        return getAttributes(name, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    public Attributes getAttributes(Name name, String[] attrIds)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        return getURLOrDefaultInitDirCtx(name).getAttributes(name, attrIds);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    public void modifyAttributes(String name, int mod_op, Attributes attrs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        getURLOrDefaultInitDirCtx(name).modifyAttributes(name, mod_op, attrs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    public void modifyAttributes(Name name, int mod_op, Attributes attrs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        getURLOrDefaultInitDirCtx(name).modifyAttributes(name, mod_op, attrs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    public void modifyAttributes(String name, ModificationItem[] mods)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        getURLOrDefaultInitDirCtx(name).modifyAttributes(name, mods);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    public void modifyAttributes(Name name, ModificationItem[] mods)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        getURLOrDefaultInitDirCtx(name).modifyAttributes(name, mods);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    public void bind(String name, Object obj, Attributes attrs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
        getURLOrDefaultInitDirCtx(name).bind(name, obj, attrs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
    public void bind(Name name, Object obj, Attributes attrs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        getURLOrDefaultInitDirCtx(name).bind(name, obj, attrs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    public void rebind(String name, Object obj, Attributes attrs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        getURLOrDefaultInitDirCtx(name).rebind(name, obj, attrs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    public void rebind(Name name, Object obj, Attributes attrs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        getURLOrDefaultInitDirCtx(name).rebind(name, obj, attrs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    public DirContext createSubcontext(String name, Attributes attrs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        return getURLOrDefaultInitDirCtx(name).createSubcontext(name, attrs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    public DirContext createSubcontext(Name name, Attributes attrs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
            throws NamingException  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        return getURLOrDefaultInitDirCtx(name).createSubcontext(name, attrs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    public DirContext getSchema(String name) throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
        return getURLOrDefaultInitDirCtx(name).getSchema(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    public DirContext getSchema(Name name) throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        return getURLOrDefaultInitDirCtx(name).getSchema(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    public DirContext getSchemaClassDefinition(String name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
        return getURLOrDefaultInitDirCtx(name).getSchemaClassDefinition(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    public DirContext getSchemaClassDefinition(Name name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
            throws NamingException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        return getURLOrDefaultInitDirCtx(name).getSchemaClassDefinition(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
// -------------------- search operations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    public NamingEnumeration<SearchResult>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        search(String name, Attributes matchingAttributes)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        return getURLOrDefaultInitDirCtx(name).search(name, matchingAttributes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    public NamingEnumeration<SearchResult>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        search(Name name, Attributes matchingAttributes)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        return getURLOrDefaultInitDirCtx(name).search(name, matchingAttributes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    public NamingEnumeration<SearchResult>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
        search(String name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
               Attributes matchingAttributes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
               String[] attributesToReturn)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
        return getURLOrDefaultInitDirCtx(name).search(name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
                                                      matchingAttributes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
                                                      attributesToReturn);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    public NamingEnumeration<SearchResult>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
        search(Name name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
               Attributes matchingAttributes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
               String[] attributesToReturn)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
        return getURLOrDefaultInitDirCtx(name).search(name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
                                            matchingAttributes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
                                            attributesToReturn);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
    public NamingEnumeration<SearchResult>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
        search(String name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
               String filter,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
               SearchControls cons)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
        return getURLOrDefaultInitDirCtx(name).search(name, filter, cons);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    public NamingEnumeration<SearchResult>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
        search(Name name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
               String filter,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
               SearchControls cons)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
        return getURLOrDefaultInitDirCtx(name).search(name, filter, cons);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
    public NamingEnumeration<SearchResult>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
        search(String name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
               String filterExpr,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
               Object[] filterArgs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
               SearchControls cons)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
        return getURLOrDefaultInitDirCtx(name).search(name, filterExpr,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
                                                      filterArgs, cons);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
    public NamingEnumeration<SearchResult>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
        search(Name name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
               String filterExpr,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
               Object[] filterArgs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
               SearchControls cons)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
        throws NamingException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
        return getURLOrDefaultInitDirCtx(name).search(name, filterExpr,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
                                                      filterArgs, cons);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
}