Class LDAPSearch
- java.lang.Object
-
- LDAPSearch
-
public class LDAPSearch extends java.lang.ObjectExecute 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
Fields Modifier and Type Field Description protected static java.lang.Stringm_binddnprotected static LDAPConnectionm_clientprotected static intm_debugLevelprotected static intm_hopLimitprotected static booleanm_justShowprotected static java.lang.Stringm_ldaphostprotected static intm_ldapportprotected static booleanm_ordinaryprotected static java.lang.Stringm_passwdprotected static LDAPControlm_proxyControlprotected static booleanm_referralsprotected static booleanm_verboseprotected static intm_version
-
Constructor Summary
Constructors Constructor Description LDAPSearch()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static voidextractParameters(java.lang.String[] args)This function is to extract specified parameters from the arguments list.protected static GetOptextractParameters(java.lang.String privateOpts, java.lang.String[] args)This function is to extract specified parameters from the arguments list.protected static booleanisSchemaEntry(LDAPEntry entry)static voidmain(java.lang.String[] args)This is the main function.protected static voidprintString(java.lang.String value)protected static voidsetDefaultReferralCredentials(LDAPConstraints cons)
-
-
-
Field Detail
-
m_ldapport
protected static int m_ldapport
-
m_binddn
protected static java.lang.String m_binddn
-
m_ldaphost
protected static java.lang.String m_ldaphost
-
m_passwd
protected static java.lang.String 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
protected static LDAPConnection 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
protected static LDAPControl m_proxyControl
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
This is the main function.- Parameters:
args- list of arguments
-
extractParameters
protected static void extractParameters(java.lang.String[] args)
This function is to extract specified parameters from the arguments list.- Parameters:
args- list of args
-
printString
protected static void printString(java.lang.String value)
-
isSchemaEntry
protected static boolean isSchemaEntry(LDAPEntry entry)
-
extractParameters
protected static GetOpt extractParameters(java.lang.String privateOpts, java.lang.String[] args)
This function is to extract specified parameters from the arguments list.- Parameters:
args- list of args
-
setDefaultReferralCredentials
protected static void setDefaultReferralCredentials(LDAPConstraints cons)
-
-