## org.mortbay.jetty.plus.naming
Class NamingEntryUtil

    java.lang.Object
      org.mortbay.jetty.plus.naming.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.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 instance.
`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:
    `asName` - the name to bind as
    `mappedName` - the name from the environment to link to asName
    `namingEntryType` -
  Throws:
    `javax.naming.NamingException`

### lookupNamingEntry

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

  Find a NamingEntry instance. First the webapp's naming space is searched, and then the container's.

  Parameters:
    `jndiName` - name to lookup
  Returns:
  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:
  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.