Package de.xima.fc.manager
Class LDAPQueryManager
- java.lang.Object
-
- de.xima.fc.manager.LDAPQueryManager
-
public class LDAPQueryManager extends Object
-
-
Constructor Summary
Constructors Constructor Description LDAPQueryManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.alibaba.fastjson.JSONArrayexecutePublicQuery(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters)static com.alibaba.fastjson.JSONArrayexecutePublicQuery(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters, IReplacerParams replacerParams)static com.alibaba.fastjson.JSONArrayexecuteQuery(@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.JSONArrayexecuteQuery(LDAPAbfrage abfrage, MandantLdapData data, Serializable[] parameters)static com.alibaba.fastjson.JSONArrayexecuteQuery(LDAPAbfrage abfrage, MandantLdapData data, Serializable[] parameters, IReplacerParams replacerParams)static com.alibaba.fastjson.JSONArrayexecuteQuery(LDAPAbfrage ldapQuery, MandantLdapData data, Serializable[] queryParameter, String[] attributeArray)static com.alibaba.fastjson.JSONArrayexecuteQuery(LDAPAbfrage ldapQuery, MandantLdapData data, Serializable[] queryParameter, String[] attributeArray, IReplacerParams replacerParams)Executes a given LDAP query and return the result asJSONArray.static com.alibaba.fastjson.JSONArrayexecuteQuery(IEntityContext ec, Mandant client, String queryName, boolean publicOnly, Serializable[] parameters)static com.alibaba.fastjson.JSONArrayexecuteQuery(IEntityContext ec, Mandant client, String queryName, boolean publicOnly, Serializable[] parameters, IReplacerParams replacerParams)static com.alibaba.fastjson.JSONArrayexecuteQuery(IEntityContext ec, Mandant client, String queryName, Serializable[] parameters)
-
-
-
Method Detail
-
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:
GeneralSecurityExceptioncom.unboundid.ldap.sdk.LDAPExceptionIllegalArgumentException
-
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:
GeneralSecurityExceptioncom.unboundid.ldap.sdk.LDAPExceptionIllegalArgumentException
-
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:
GeneralSecurityExceptioncom.unboundid.ldap.sdk.LDAPExceptionIllegalArgumentException
-
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:
GeneralSecurityExceptioncom.unboundid.ldap.sdk.LDAPExceptionIllegalArgumentException
-
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:
GeneralSecurityExceptioncom.unboundid.ldap.sdk.LDAPExceptionIllegalArgumentException
-
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.LDAPExceptionGeneralSecurityExceptioncom.alibaba.fastjson.JSONExceptionIllegalArgumentException
-
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.LDAPExceptionGeneralSecurityExceptioncom.alibaba.fastjson.JSONExceptionIllegalArgumentException
-
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.LDAPExceptionGeneralSecurityExceptioncom.alibaba.fastjson.JSONExceptionIllegalArgumentException
-
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 ofLDAPAbfragedata- an object ofMandantLdapDataornull. If null, then the LDAP connection data must be referenced in theLDAPAbfrageobject.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
JSONArrayornullifldapQueryis 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, IllegalArgumentExceptionExecutes 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
JSONArrayornullifqueryis 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
-
-