Package de.xima.fc.manager
Class LDAPQueryManager
java.lang.Object
de.xima.fc.manager.LDAPQueryManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.alibaba.fastjson.JSONArray
executePublicQuery
(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters) static com.alibaba.fastjson.JSONArray
executePublicQuery
(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters, IReplacerParams replacerParams) static com.alibaba.fastjson.JSONArray
executeQuery
(@NotEmpty String baseDN, @NotEmpty String query, com.unboundid.ldap.sdk.LDAPConnection ldapConnection, int pageSize, Serializable[] queryParameter, String[] attributeArray) Executes a given LDAP query and return the result asJSONArray
.static com.alibaba.fastjson.JSONArray
executeQuery
(LDAPAbfrage abfrage, MandantLdapData data, Serializable[] parameters) static com.alibaba.fastjson.JSONArray
executeQuery
(LDAPAbfrage abfrage, MandantLdapData data, Serializable[] parameters, IReplacerParams replacerParams) static com.alibaba.fastjson.JSONArray
executeQuery
(LDAPAbfrage ldapQuery, MandantLdapData data, Serializable[] queryParameter, String[] attributeArray) static com.alibaba.fastjson.JSONArray
executeQuery
(LDAPAbfrage ldapQuery, MandantLdapData data, Serializable[] queryParameter, String[] attributeArray, IReplacerParams replacerParams) Executes a given LDAP query and return the result asJSONArray
.static com.alibaba.fastjson.JSONArray
executeQuery
(IEntityContext ec, Mandant client, String queryName, boolean publicOnly, Serializable[] parameters) static com.alibaba.fastjson.JSONArray
executeQuery
(IEntityContext ec, Mandant client, String queryName, boolean publicOnly, Serializable[] parameters, IReplacerParams replacerParams) static com.alibaba.fastjson.JSONArray
executeQuery
(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters)
-
Constructor Details
-
LDAPQueryManager
public LDAPQueryManager()
-
-
Method Details
-
executeQuery
public static com.alibaba.fastjson.JSONArray executeQuery(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters) throws GeneralSecurityException, com.unboundid.ldap.sdk.LDAPException, IllegalArgumentException - Throws:
GeneralSecurityException
com.unboundid.ldap.sdk.LDAPException
IllegalArgumentException
-
executePublicQuery
public static com.alibaba.fastjson.JSONArray executePublicQuery(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters) throws GeneralSecurityException, com.unboundid.ldap.sdk.LDAPException, IllegalArgumentException - Throws:
GeneralSecurityException
com.unboundid.ldap.sdk.LDAPException
IllegalArgumentException
-
executePublicQuery
public static com.alibaba.fastjson.JSONArray executePublicQuery(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters, IReplacerParams replacerParams) throws GeneralSecurityException, com.unboundid.ldap.sdk.LDAPException, IllegalArgumentException - Throws:
GeneralSecurityException
com.unboundid.ldap.sdk.LDAPException
IllegalArgumentException
-
executeQuery
public static com.alibaba.fastjson.JSONArray executeQuery(IEntityContext ec, Mandant client, String queryName, boolean publicOnly, Serializable[] parameters) throws GeneralSecurityException, com.unboundid.ldap.sdk.LDAPException, IllegalArgumentException - Throws:
GeneralSecurityException
com.unboundid.ldap.sdk.LDAPException
IllegalArgumentException
-
executeQuery
public static com.alibaba.fastjson.JSONArray executeQuery(IEntityContext ec, Mandant client, String queryName, boolean publicOnly, Serializable[] parameters, IReplacerParams replacerParams) throws GeneralSecurityException, com.unboundid.ldap.sdk.LDAPException, IllegalArgumentException - Throws:
GeneralSecurityException
com.unboundid.ldap.sdk.LDAPException
IllegalArgumentException
-
executeQuery
public static com.alibaba.fastjson.JSONArray executeQuery(LDAPAbfrage abfrage, MandantLdapData data, Serializable[] parameters) throws com.unboundid.ldap.sdk.LDAPException, GeneralSecurityException, com.alibaba.fastjson.JSONException, IllegalArgumentException - Throws:
com.unboundid.ldap.sdk.LDAPException
GeneralSecurityException
com.alibaba.fastjson.JSONException
IllegalArgumentException
-
executeQuery
public static com.alibaba.fastjson.JSONArray executeQuery(LDAPAbfrage abfrage, MandantLdapData data, Serializable[] parameters, IReplacerParams replacerParams) throws com.unboundid.ldap.sdk.LDAPException, GeneralSecurityException, com.alibaba.fastjson.JSONException, IllegalArgumentException - Throws:
com.unboundid.ldap.sdk.LDAPException
GeneralSecurityException
com.alibaba.fastjson.JSONException
IllegalArgumentException
-
executeQuery
public static com.alibaba.fastjson.JSONArray executeQuery(LDAPAbfrage ldapQuery, MandantLdapData data, Serializable[] queryParameter, String[] attributeArray) throws com.unboundid.ldap.sdk.LDAPException, GeneralSecurityException, com.alibaba.fastjson.JSONException, IllegalArgumentException - Throws:
com.unboundid.ldap.sdk.LDAPException
GeneralSecurityException
com.alibaba.fastjson.JSONException
IllegalArgumentException
-
executeQuery
public static com.alibaba.fastjson.JSONArray executeQuery(LDAPAbfrage ldapQuery, MandantLdapData data, Serializable[] queryParameter, String[] attributeArray, IReplacerParams replacerParams) throws com.unboundid.ldap.sdk.LDAPException, GeneralSecurityException, com.alibaba.fastjson.JSONException, IllegalArgumentException Executes a given LDAP query and return the result asJSONArray
.- Parameters:
ldapQuery
- an object ofLDAPAbfrage
data
- an object ofMandantLdapData
ornull
. If null, then the LDAP connection data must be referenced in theLDAPAbfrage
object.queryParameter
- an array of parameters for the LDAP query, if necessary. The parameters are used in the specified list order.attributeArray
- an array for the result filter. No filter is used fornull
.- Returns:
- a
JSONArray
ornull
ifldapQuery
is null. - Throws:
com.unboundid.ldap.sdk.LDAPException
- if an exception in LDAP communication occursGeneralSecurityException
- if an exception occurs while establishing an LDAP connectioncom.alibaba.fastjson.JSONException
- if an exception inside JSON result building occursIllegalArgumentException
- occurs, if count of parameters does not fit to the count of the given LDAP parameters
-
executeQuery
public static com.alibaba.fastjson.JSONArray executeQuery(@NotEmpty @NotEmpty String baseDN, @NotEmpty @NotEmpty String query, com.unboundid.ldap.sdk.LDAPConnection ldapConnection, int pageSize, Serializable[] queryParameter, String[] attributeArray) throws com.unboundid.ldap.sdk.LDAPException, GeneralSecurityException, com.alibaba.fastjson.JSONException, IllegalArgumentException Executes a given LDAP query and return the result asJSONArray
.- Parameters:
baseDN
- the LDAP BaseDNquery
- the query to be executed. Query can contain '?' as placeholders for parameters.ldapConnection
- the data for establishing an LDAP connection.pageSize
- The maximum number of entries that the server should return in the next page of the results.queryParameter
- an array of parameters for the LDAP query, if necessary. The parameters are used in the specified list order.attributeArray
- an array for the result filter. No filter is used fornull
.- Returns:
- a
JSONArray
ornull
ifquery
is empty. - Throws:
com.unboundid.ldap.sdk.LDAPException
- if an exception in LDAP communication occursGeneralSecurityException
- if an exception occurs while establishing an LDAP connectioncom.alibaba.fastjson.JSONException
- if an exception inside JSON result building occursIllegalArgumentException
- occurs, if count of parameters does not fit to the count of the given LDAP parameters
-