Class LDAPSearch
java.lang.Object
LDAPSearch
Execute Search operations through the LDAP client interface.
This class is implemented based on the LDAP class library.
usage : java LDAPSearch -b baseDN [options] filter [attributes...]
for example : java LDAPSearch -b "c=us" -h ds.internic.net -p 389
"(objectClass=*)"
note: '-' or '/' is used to distinct the option field.
e.g. -a -b /c /d parameter -e parameter
filter:
Any string in RFC1558 specification.
e.g. "(objectClass=*)"
attributes: {0..n}
All the string parameters follows with the filter.
e.g. filter attrsA attrsB attrsC
- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static Stringprotected static LDAPConnectionprotected static intprotected static intprotected static booleanprotected static Stringprotected static intprotected static booleanprotected static Stringprotected static LDAPControlprotected static booleanprotected static booleanprotected static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidextractParameters(String[] args) This function is to extract specified parameters from the arguments list.protected static GetOptextractParameters(String privateOpts, String[] args) This function is to extract specified parameters from the arguments list.protected static booleanisSchemaEntry(LDAPEntry entry) static voidThis is the main function.protected static voidprintString(String value) protected static void
-
Field Details
-
m_ldapport
protected static int m_ldapport -
m_binddn
-
m_ldaphost
-
m_passwd
-
m_version
protected static int m_version -
m_debugLevel
protected static int m_debugLevel -
m_hopLimit
protected static int m_hopLimit -
m_referrals
protected static boolean m_referrals -
m_client
-
m_justShow
protected static boolean m_justShow -
m_verbose
protected static boolean m_verbose -
m_ordinary
protected static boolean m_ordinary -
m_proxyControl
-
-
Constructor Details
-
LDAPSearch
public LDAPSearch()
-
-
Method Details
-
main
This is the main function.- Parameters:
args- list of arguments
-
extractParameters
This function is to extract specified parameters from the arguments list.- Parameters:
args- list of args
-
printString
-
isSchemaEntry
-
extractParameters
This function is to extract specified parameters from the arguments list.- Parameters:
args- list of args
-
setDefaultReferralCredentials
-