Package com.isode.dsapi.util.data
Class DataNodeDSAPIReader
java.lang.Object
com.isode.util.data.DataReader
com.isode.util.data.DataNodeReader
com.isode.dsapi.util.data.DataNodeDSAPIReader
DataNodeDSAPIReader allows to read other than String data types
(especially DS API related data types) from DataNode.
- Since:
- 16.0
- Author:
- mst
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns single DN associated with given name.Returns single DN associated with given name.Returns all DNs associated with given name.Returns all DNs associated with given name.getLDAPFilter(String name, String defValue) Returns single LDAP filter associated with given name.getLDAPFilterList(String name, String... defValues) Returns all LDAP filters associated with given name.Methods inherited from class com.isode.util.data.DataNodeReader
getNodeMethods inherited from class com.isode.util.data.DataReader
addListener, decode, getBoolean, getBoolean, getBoolean, getInteger, getInteger, getInteger, getInteger, getLong, getLong, getString, getString, getString, getStringList, getValue, getValues, notifyRead, removeListener
-
Constructor Details
-
DataNodeDSAPIReader
Constructs a DataNodeDSAPIReader- Parameters:
node- (nullallowed)
-
-
Method Details
-
getDN
public DN getDN(String name, String description, DN defValue) throws DataAccessException, DataBadArgumentException, DataBadValueException, DataCodecException, DataMultipleValueException Returns single DN associated with given name.- Parameters:
name- (notnull)description- used in place of name in error reports and notifications (nullallowed - than name will be used)defValue- default value returned when there is no value associated (nullallowed)- Returns:
- single DN
(may be
nullif defValue isnullor defined value is empty) - Throws:
DataAccessException- on access problemsDataBadArgumentException- on bad nameDataBadValueException- on unexpected/bad valueDataCodecException- on decoding problemsDataMultipleValueException- when multiple values found
-
getDN
public DN getDN(String name, DN defValue) throws DataAccessException, DataBadArgumentException, DataBadValueException, DataCodecException, DataMultipleValueException Returns single DN associated with given name.- Parameters:
name- (notnull)defValue- default value returned when there is no value associated (nullallowed)- Returns:
- single DN
(may be
nullif defValue isnullor defined value is empty) - Throws:
DataAccessException- on access problemsDataBadArgumentException- on bad nameDataBadValueException- on unexpected/bad valueDataCodecException- on decoding problemsDataMultipleValueException- when multiple values found
-
getDNList
public List<DN> getDNList(String name, String description, DN... defValues) throws DataAccessException, DataBadArgumentException, DataBadValueException, DataCodecException, DataMultipleValueException Returns all DNs associated with given name.- Parameters:
name- (notnull)description- used in place of name in error reports and notifications (nullallowed - than name will be used)defValues- default values returned when there is no other values associated (nullallowed)- Returns:
- values list (not
nullbut list may be empty or may containnullvalues) - Throws:
DataAccessException- on access problemsDataBadArgumentException- on bad nameDataBadValueException- on unexpected/bad valueDataCodecException- on decoding problemsDataMultipleValueException- when multiple values found
-
getDNList
public List<DN> getDNList(String name, DN... defValues) throws DataAccessException, DataBadArgumentException, DataBadValueException, DataCodecException, DataMultipleValueException Returns all DNs associated with given name.- Parameters:
name- (notnull)defValues- default values returned when there is no other values associated (nullallowed)- Returns:
- values list (not
nullbut list may be empty or may containnullvalues) - Throws:
DataAccessException- on access problemsDataBadArgumentException- on bad nameDataBadValueException- on unexpected/bad valueDataCodecException- on decoding problemsDataMultipleValueException- when multiple values found
-
getLDAPFilterList
public List<String> getLDAPFilterList(String name, String... defValues) throws DataAccessException, DataBadArgumentException, DataBadValueException, DataCodecException Returns all LDAP filters associated with given name. If there are no values defined returns defValues.- Parameters:
name- (notnull)defValues- (nullallowed - ignored)- Returns:
- values list (not
nullbut list may be empty or may containnullvalues) - Throws:
DataAccessException- on access problemsDataBadArgumentException- on bad nameDataBadValueException- on unexpected/bad valueDataCodecException- on decoding problems- Since:
- 16.2
-
getLDAPFilter
public String getLDAPFilter(String name, String defValue) throws DataAccessException, DataBadArgumentException, DataBadValueException, DataCodecException, DataMultipleValueException Returns single LDAP filter associated with given name.- Parameters:
name- (notnull)defValue- default value returned when there is no value associated (nullallowed)- Returns:
- single LDAP filter
(may be
nullif defValue isnullor defined value is empty) - Throws:
DataAccessException- on access problemsDataBadArgumentException- on bad nameDataBadValueException- on unexpected/bad valueDataCodecException- on decoding problemsDataMultipleValueException- when multiple values found- Since:
- 16.2
-