package at.knowcenter.wag.egov.egiz.ldap.client; import iaik.x509.X509Certificate; import java.math.BigInteger; import java.net.URL; /** * @author Thomas Knall */ public interface LDAPClient { /** * Returns the ldap url this client was registered for. * * @return The ldap url linked with this client. */ URL getUrl(); /** * Sets the ldap url this client should be registered for. * * @param ldapURL * The ldap url linked with this client. */ void setUrl(URL ldapURL); /** * Returns the attribute name that represents the serial number. * * @return The attribute name representing the serial number. */ String getSerialNumberAttrName(); /** * Sets the attribute name that represents the serial number. * * @param serialNumberAttrName * The attribute name representing the serial number. */ void setSerialNumberAttrName(String serialNumberAttrName); /** * Retrieves the certificate(s) matching the filter {@code filter}. * * @param filter * The filter for the ldap request. * @return An array of certificates matching the filter {@code filter}. * @throws LDAPException * Is thrown in case of error. */ X509Certificate[] retrieveCertificates(String filter) throws LDAPException; /** * Retriebes the certificate with the serial number {@code serialNumber}. * * @param serialNumber * The serial number of the required certificate. * @return The certificate with the serial number {@code serialNumber}. * @throws LDAPException * Is thrown in case of error. */ X509Certificate retrieveCertificate(BigInteger serialNumber) throws LDAPException; }