org.apache.directory.server.core.configuration
Class ConfigurationUtil

java.lang.Object
  extended by org.apache.directory.server.core.configuration.ConfigurationUtil

public class ConfigurationUtil
extends java.lang.Object

A utility class that provides common functionality while validating configuration.

Version:
$Rev: 493916 $, $Date: 2007-01-08 03:44:33 +0100 (Mon, 08 Jan 2007) $
Author:
Apache Directory Project

Method Summary
static java.util.List getClonedAttributesList(java.util.List list)
          Returns the deep clone of the specified Attributes list.
static java.util.List getClonedList(java.util.List list)
          Returns the clone of the specified list.
static java.util.Set getClonedSet(java.util.Set set)
          Returns the clone of the specified set.
static void getTypeSafeCollection(java.util.Collection collection, java.lang.Class type, java.util.Collection newCollection)
           
static java.util.List getTypeSafeList(java.util.List list, java.lang.Class type)
          Checks all elements of the specified list is of the specified type, and returns cloned list.
static java.util.Set getTypeSafeSet(java.util.Set set, java.lang.Class type)
          Checks all elements of the specified set is of the specified type, and returns cloned set.
static void validatePortNumber(int port)
          Throws a ConfigurationException if the specified port number is out of range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTypeSafeSet

public static java.util.Set getTypeSafeSet(java.util.Set set,
                                           java.lang.Class type)
Checks all elements of the specified set is of the specified type, and returns cloned set.

Throws:
ConfigurationException - if the specified set has an element of wrong type

getTypeSafeList

public static java.util.List getTypeSafeList(java.util.List list,
                                             java.lang.Class type)
Checks all elements of the specified list is of the specified type, and returns cloned list.

Throws:
ConfigurationException - if the specified set has an element of wrong type

getTypeSafeCollection

public static void getTypeSafeCollection(java.util.Collection collection,
                                         java.lang.Class type,
                                         java.util.Collection newCollection)

getClonedSet

public static java.util.Set getClonedSet(java.util.Set set)
Returns the clone of the specified set.


getClonedList

public static java.util.List getClonedList(java.util.List list)
Returns the clone of the specified list.


getClonedAttributesList

public static java.util.List getClonedAttributesList(java.util.List list)
                                              throws java.lang.CloneNotSupportedException
Returns the deep clone of the specified Attributes list.

Throws:
java.lang.CloneNotSupportedException

validatePortNumber

public static void validatePortNumber(int port)
Throws a ConfigurationException if the specified port number is out of range.



Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.