|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsc.jndi.JndiServices
public final class JndiServices
General LDAP services wrapper. This class is designed to manage all the needed operations to the directory
| Field Summary | |
|---|---|
static String |
DEFAULT_FILTER
Default LDAP filter. |
| Method Summary | |
|---|---|
boolean |
apply(JndiModifications jm)
Apply directory modifications. |
boolean |
exists(String dn)
Check if the entry with the specified distinguish name exists (or not). |
boolean |
exists(String dn,
String filter)
Check if the entry with the specified distinguish name exists (or not). |
Map<String,LscAttributes> |
getAttrsList(String base,
String filter,
int scope,
List<String> attrsNames)
Search for a list of attribute values This method is a simple LDAP search operation which is attended to return a list of the attribute values in all returned entries |
LdapContext |
getContext()
Get the JNDI context. |
String |
getContextDn()
|
List<String> |
getDnList(String base,
String filter,
int scope)
Search for a list of DN. |
static JndiServices |
getDstInstance()
Get the target directory connected service. |
SearchResult |
getEntry(String base,
String filter)
Search for an entry. |
SearchResult |
getEntry(String base,
String filter,
SearchControls sc)
Search for an entry. |
SearchResult |
getEntry(String base,
String filter,
SearchControls sc,
int scope)
Search for an entry. |
static JndiServices |
getInstance(Properties props)
Instance getter. |
Map<String,List<String>> |
getSchema(String[] attrsToReturn)
Return the LDAP schema. |
static JndiServices |
getSrcInstance()
Get the source directory connected service. |
SearchResult |
readEntry(String base,
boolean allowError)
Search for an entry. |
SearchResult |
readEntry(String base,
String filter,
boolean allowError)
|
SearchResult |
readEntry(String base,
String filter,
boolean allowError,
SearchControls sc)
|
String |
rewriteBase(String base)
|
List<String> |
sup(String dn,
int level)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_FILTER
| Method Detail |
|---|
public static JndiServices getSrcInstance()
public static JndiServices getDstInstance()
public static JndiServices getInstance(Properties props)
throws NamingException,
IOException
props - the connection properties
IOException
NamingException
public SearchResult getEntry(String base,
String filter)
throws NamingException
base - the base of the search operationfilter - the filter of the search operation
NamingException - thrown if something goes wrong
public SearchResult getEntry(String base,
String filter,
SearchControls sc)
throws NamingException
base - the base of the search operationfilter - the filter of the search operationsc - the search controls
NamingException - thrown if something goes wrong
public SearchResult getEntry(String base,
String filter,
SearchControls sc,
int scope)
throws NamingException
base - the base of the search operationfilter - the filter of the search operationsc - the search controlsscope - the search scope to use
SizeLimitExceededException - thrown if more than one entry is returned by the search
NamingException - thrown if something goes wrong
public boolean exists(String dn,
String filter)
dn - the entry's distinguish namefilter - look at the dn according this filter
public boolean exists(String dn)
dn - the entry's distinguish name
public SearchResult readEntry(String base,
boolean allowError)
throws NamingException
base - the base of the search operationallowError - log error if not found or not
NamingException - thrown if something goes wrong
public SearchResult readEntry(String base,
String filter,
boolean allowError)
throws NamingException
NamingExceptionpublic String rewriteBase(String base)
public SearchResult readEntry(String base,
String filter,
boolean allowError,
SearchControls sc)
throws NamingException
NamingException
public List<String> getDnList(String base,
String filter,
int scope)
throws NamingException
base - the base of the search operationfilter - the filter of the search operationscope - the scope of the search operation
NamingException - thrown if something goes wrong
public boolean apply(JndiModifications jm)
throws CommunicationException
jm - modifications to apply
CommunicationException - If the connection to the directory is lost
public Map<String,List<String>> getSchema(String[] attrsToReturn)
throws NamingException
attrsToReturn - list of attribute names to return (or null for all
'standard' attributes)
NamingException - thrown if something goes wrong (bad
public List<String> sup(String dn,
int level)
throws NamingException
NamingException
public Map<String,LscAttributes> getAttrsList(String base,
String filter,
int scope,
List<String> attrsNames)
throws NamingException
base - the base of the search operationfilter - the filter of the search operationscope - the scope of the search operationattrsNames - table of attribute names to get
NamingException - thrown if something goes wrongpublic String getContextDn()
public LdapContext getContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||