## org.eclipse.jetty.plus.jndi
Class NamingEntryUtil

    java.lang.Object
      org.eclipse.jetty.plus.jndi.NamingEntryUtil

    public class NamingEntryUtil

extends java.lang.Object

Constructor Summary
`NamingEntryUtil()`

Method Summary
`static boolean` `bindToENC(java.lang.Object scope, java.lang.String asName, java.lang.String mappedName)` Link a name in a webapp's java:/comp/evn namespace to a pre-existing resource.
`static javax.naming.Context` `getContextForNamingEntries(java.lang.Object scope)`
`static javax.naming.Context` `getContextForScope(java.lang.Object scope)`
`static javax.naming.Name` `getNameForScope(java.lang.Object scope)`
`static java.lang.Object` `lookup(java.lang.Object scope, java.lang.String jndiName)`
`static java.util.List` `lookupNamingEntries(java.lang.Object scope, java.lang.Class clazz)` Get all NameEntries of a certain type in the given naming environment scope (server-wide names or context-specific names)
`static NamingEntry` `lookupNamingEntry(java.lang.Object scope, java.lang.String jndiName)` Find a NamingEntry in the given scope.
`static javax.naming.Name` `makeNamingEntryName(javax.naming.NameParser parser, NamingEntry namingEntry)`
`static javax.naming.Name` `makeNamingEntryName(javax.naming.NameParser parser, java.lang.String jndiName)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NamingEntryUtil

    public NamingEntryUtil()

Method Detail

### bindToENC

    public static boolean bindToENC(java.lang.Object scope,
                                    java.lang.String asName,
                                    java.lang.String mappedName)
                             throws javax.naming.NamingException

  Link a name in a webapp's java:/comp/evn namespace to a pre-existing resource. The pre-existing resource can be either in the webapp's naming environment, or in the container's naming environment. Webapp's environment takes precedence over the server's namespace.

  Parameters:
    `scope` - the scope of the lookup
    `asName` - the name to bind as
    `mappedName` - the name from the environment to link to asName
  Throws:
    `javax.naming.NamingException`

### lookupNamingEntry

    public static NamingEntry lookupNamingEntry(java.lang.Object scope,
                                                java.lang.String jndiName)
                                         throws javax.naming.NamingException

  Find a NamingEntry in the given scope.

  Parameters:
    `scope` -
    `jndiName` -
  Returns:
    the naming entry for the given scope
  Throws:
    `javax.naming.NamingException`

### lookup

    public static java.lang.Object lookup(java.lang.Object scope,
                                          java.lang.String jndiName)
                                   throws javax.naming.NamingException

  Throws:
    `javax.naming.NamingException`

### lookupNamingEntries

    public static java.util.List lookupNamingEntries(java.lang.Object scope,
                                                     java.lang.Class clazz)
                                              throws javax.naming.NamingException

  Get all NameEntries of a certain type in the given naming environment scope (server-wide names or context-specific names)

  Parameters:
    `scope` -
    `clazz` - the type of the entry
  Returns:
    all NameEntries of a certain type in the given naming environment scope (server-wide names or context-specific names)
  Throws:
    `javax.naming.NamingException`

### makeNamingEntryName

    public static javax.naming.Name makeNamingEntryName(javax.naming.NameParser parser,
                                                        NamingEntry namingEntry)
                                                 throws javax.naming.NamingException

  Throws:
    `javax.naming.NamingException`

### makeNamingEntryName

    public static javax.naming.Name makeNamingEntryName(javax.naming.NameParser parser,
                                                        java.lang.String jndiName)
                                                 throws javax.naming.NamingException

  Throws:
    `javax.naming.NamingException`

### getNameForScope

    public static javax.naming.Name getNameForScope(java.lang.Object scope)

### getContextForScope

    public static javax.naming.Context getContextForScope(java.lang.Object scope)
                                                   throws javax.naming.NamingException

  Throws:
    `javax.naming.NamingException`

### getContextForNamingEntries

    public static javax.naming.Context getContextForNamingEntries(java.lang.Object scope)
                                                           throws javax.naming.NamingException

  Throws:
    `javax.naming.NamingException`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.