org.ldaptive.schema
Class Extensions

java.lang.Object
  extended by org.ldaptive.schema.Extensions

public class Extensions
extends Object

Bean for an extension found in a schema element.

Version:
$Revision: 3189 $ $Date: 2016-11-01 17:21:43 -0400 (Tue, 01 Nov 2016) $
Author:
Middleware Services

Field Summary
protected static Pattern DEFINITION_PATTERN
          Pattern to match attribute type definitions.
 
Constructor Summary
Extensions()
          Creates a new extensions.
Extensions(String name, List<String> values)
          Creates a new extensions.
 
Method Summary
 void addExtension(String name)
          Adds an extension.
 void addExtension(String name, List<String> values)
          Adds an extension.
 boolean equals(Object o)
          
 String format()
          Returns this extension as formatted string per RFC 4512.
 Map<String,List<String>> getAllValues()
          Returns all the values in this extensions.
 Set<String> getNames()
          Returns the name.
 String getValue(String name)
          Returns a single string value for the extension with the supplied name.
 List<String> getValues(String name)
          Returns the values for the extension with the supplied name.
 int hashCode()
           
static Extensions parse(String definition)
          Parses the supplied definition string and creates an initialized extension.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFINITION_PATTERN

protected static final Pattern DEFINITION_PATTERN
Pattern to match attribute type definitions.

Constructor Detail

Extensions

public Extensions()
Creates a new extensions.


Extensions

public Extensions(String name,
                  List<String> values)
Creates a new extensions.

Parameters:
name - of a single extension
values - for that extension
Method Detail

getNames

public Set<String> getNames()
Returns the name.

Returns:
name

getValues

public List<String> getValues(String name)
Returns the values for the extension with the supplied name.

Parameters:
name - of the extension
Returns:
values

getValue

public String getValue(String name)
Returns a single string value for the extension with the supplied name. See getValues(String).

Parameters:
name - of the extension
Returns:
single string extension value

getAllValues

public Map<String,List<String>> getAllValues()
Returns all the values in this extensions.

Returns:
map of name to values for every extension

addExtension

public void addExtension(String name)
Adds an extension.

Parameters:
name - of the extension

addExtension

public void addExtension(String name,
                         List<String> values)
Adds an extension.

Parameters:
name - of the extension
values - in the extension

parse

public static Extensions parse(String definition)
Parses the supplied definition string and creates an initialized extension.

Parameters:
definition - to parse
Returns:
extension

format

public String format()
Returns this extension as formatted string per RFC 4512.

Returns:
formatted string

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.