org.apache.directory.server.core
Class ServerUtils

java.lang.Object
  extended byorg.apache.directory.server.core.ServerUtils

public class ServerUtils
extends java.lang.Object

A central place to aggregate functionality used throughout the server in various subsystems yet the code here is server specific hence why it's not placed in shared-ldap.

Version:
$Rev$
Author:
Apache Directory Project

Constructor Summary
ServerUtils()
           
 
Method Summary
static javax.naming.directory.Attribute getAttribute(AttributeType type, javax.naming.directory.Attributes entry)
          Efficient server side means to perform a lookup of an attribute within an entry.
static javax.naming.directory.Attribute removeAttribute(AttributeType type, javax.naming.directory.Attributes entry)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerUtils

public ServerUtils()
Method Detail

getAttribute

public static javax.naming.directory.Attribute getAttribute(AttributeType type,
                                                            javax.naming.directory.Attributes entry)
                                                     throws javax.naming.NamingException
Efficient server side means to perform a lookup of an attribute within an entry. Simple lookups by name may fail if the user provided the attribute identifier in any way other than the common alias for the attribute. We need to check for all aliases and the OID.

Parameters:
type - the attributeType containing the OID and aliases we need
entry - the entry with user provided attribute IDENTIFIERS
Returns:
the attribute if it is present
Throws:
javax.naming.NamingException - if there are failures while accessing the attributes object

removeAttribute

public static javax.naming.directory.Attribute removeAttribute(AttributeType type,
                                                               javax.naming.directory.Attributes entry)
                                                        throws javax.naming.NamingException
Throws:
javax.naming.NamingException