~ubuntu-branches/ubuntu/saucy/tomcat7/saucy

« back to all changes in this revision

Viewing changes to java/org/apache/naming/resources/FileDirContext.java

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-12-06 13:47:08 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20121206134708-xub74b3086g2xwt3
Tags: 7.0.34-0ubuntu1
* New upstream release.
  - d/p/0014-fix-override.patch: Fix FTBFS due to differing dependency
    versions compared to upstream.
* d/p/0015-use-jdbc-pool-default.patch: Make jdbc-pool module the default
  pool implementation for DataSources (LP: #1071817).

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
import java.util.List;
31
31
 
32
32
import javax.naming.NameAlreadyBoundException;
33
 
import javax.naming.NameClassPair;
34
33
import javax.naming.NameNotFoundException;
35
34
import javax.naming.NamingEnumeration;
36
35
import javax.naming.NamingException;
41
40
import javax.naming.directory.SearchControls;
42
41
import javax.naming.directory.SearchResult;
43
42
 
44
 
import org.apache.naming.NamingContextEnumeration;
45
43
import org.apache.naming.NamingEntry;
46
44
import org.apache.tomcat.util.http.RequestUtil;
47
45
 
49
47
 * Filesystem Directory Context implementation helper class.
50
48
 *
51
49
 * @author Remy Maucherat
52
 
 * @version $Id: FileDirContext.java 1378819 2012-08-30 06:49:33Z kkolinko $
 
50
 * @version $Id: FileDirContext.java 1392099 2012-09-30 19:48:36Z markt $
53
51
 */
54
52
 
55
53
public class FileDirContext extends BaseDirContext {
279
277
 
280
278
 
281
279
    /**
282
 
     * Enumerates the names bound in the named context, along with the class
283
 
     * names of objects bound to them. The contents of any subcontexts are
284
 
     * not included.
285
 
     * <p>
286
 
     * If a binding is added to or removed from this context, its effect on
287
 
     * an enumeration previously returned is undefined.
288
 
     *
289
 
     * @param name the name of the context to list
290
 
     * @return an enumeration of the names and class names of the bindings in
291
 
     * this context. Each element of the enumeration is of type NameClassPair.
292
 
     * @exception NamingException if a naming exception is encountered
293
 
     */
294
 
    @Override
295
 
    public NamingEnumeration<NameClassPair> list(String name)
296
 
        throws NamingException {
297
 
 
298
 
        File file = file(name);
299
 
 
300
 
        if (file == null)
301
 
            throw new NameNotFoundException
302
 
                (sm.getString("resources.notFound", name));
303
 
 
304
 
        return new NamingContextEnumeration(list(file).iterator());
305
 
 
306
 
    }
307
 
 
308
 
 
309
 
    /**
310
280
     * Enumerates the names bound in the named context, along with the
311
281
     * objects bound to them. The contents of any subcontexts are not
312
282
     * included.