Search in sources :

Example 11 with NamingEntry

use of org.apache.naming.NamingEntry in project tomcat70 by apache.

the class WARDirContext method doListBindings.

/**
 * Enumerates the names bound in the named context, along with the
 * objects bound to them. The contents of any subcontexts are not
 * included.
 * <p>
 * If a binding is added to or removed from this context, its effect on
 * an enumeration previously returned is undefined.
 *
 * @param strName the name of the context to list
 * @return an enumeration of the bindings in this context.
 * Each element of the enumeration is of type Binding.
 * @exception NamingException if a naming exception is encountered
 */
@Override
protected List<NamingEntry> doListBindings(String strName) throws NamingException {
    Name name = getEscapedJndiName(strName);
    if (name.isEmpty())
        return list(entries);
    Entry entry = treeLookup(name);
    if (entry == null)
        return null;
    return list(entry);
}
Also used : ZipEntry(java.util.zip.ZipEntry) NamingEntry(org.apache.naming.NamingEntry) CompositeName(javax.naming.CompositeName) Name(javax.naming.Name)

Aggregations

NamingEntry (org.apache.naming.NamingEntry)11 File (java.io.File)5 ArrayList (java.util.ArrayList)3 JarFile (java.util.jar.JarFile)3 ZipEntry (java.util.zip.ZipEntry)3 NameNotFoundException (javax.naming.NameNotFoundException)2 NamingException (javax.naming.NamingException)2 DirContext (javax.naming.directory.DirContext)2 NamingContextBindingsEnumeration (org.apache.naming.NamingContextBindingsEnumeration)2 NamingContextEnumeration (org.apache.naming.NamingContextEnumeration)2 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Map (java.util.Map)1 JarEntry (java.util.jar.JarEntry)1 CompositeName (javax.naming.CompositeName)1 Name (javax.naming.Name)1