/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { String } from "../../types/java/lang/String"; import type { List } from "../../types/java/util/List"; import type { Node } from "../../types/javax/jcr/Node"; import type { Property } from "../../types/javax/jcr/Property"; import type { Map } from "../../types/java/util/Map"; /** * LDAP directory utility interface. * *
* An instance of the Sitevision class implementing this interface can be obtained via {@link senselogic.sitevision.api.Utils#getDirectoryUtil()}.
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface.
*
* Some examples of RFC 2254 valid values for aSearchFilter:
*
"magnus" - find all magnus, using the search base specified by the directories (usually common name) "(cn=magnus)" - find all with common name (cn) magnus"(cn=magnus*)" - find all that has a common name (cn) that starts with magnus"(&(cn=magnus)(mail=*))" - find all that has a mail address and magnus as common name (cn)"(|(cn=magnus)((sn=L*)))" - find all with common name (cn) magnus or a surname (sn) that starts with LList. If there are no hits, an empty List is returned.
* @see #search(String,Node)
*/
search(aSearchFilter: String | string): List;
/**
* Searches for objects in a specified LDAP directory.
* * Tip! The repository for all LDAP directory nodes can be located via the * {@link senselogic.sitevision.api.resource.ResourceLocatorUtil#getDirectoryRepository() getDirectoryRepository()} * method in {@link senselogic.sitevision.api.resource.ResourceLocatorUtil} *
* @param aSearchFilter LDAP search filter (as specified by RFC 2254) * @param aDirectoryNode a LDAP directoryNode
* @return the search result as a List. If there are no hits, an empty List is returned.
* @see #search(String)
*/
search(aSearchFilter: String | string, aDirectoryNode: Node): List;
/**
* Searches for objects in a specified search base in a specified LDAP directory.
* @param aSearchFilter LDAP search filter (as specified by RFC 2254)
* @param aDirectoryNode a LDAP directory Node
* @param aSearchBase a search base that exist in aDirectoryNode
* @return the search result as a List. If there are no hits, an empty List is returned.
* @see #search(String,Node)
*/
search(
aSearchFilter: String | string,
aDirectoryNode: Node,
aSearchBase: String | string
): List;
/**
* Gets a directory node object with a specific distinguished name, dn.
* @param aDirectoryObjectDN the directory dn for a directory object
* @return the directory object Node, or null if indeterminate
*/
getNodeByDN(aDirectoryObjectDN: String | string): Node;
/**
* Gets a directory attribute value for a directory node object as Property.
* * The default properties for a directory node object adheres/corresponds to the attributes defined in the directory scheme. * All attributes that are defined in the scheme are exposed as properties in the Sitevision JCR model. This method tries to * find the attribute via the Sitevision JCR model but if no property can be found it executes LDAP queries * to find the attribute. This makes it possible to find scheme-defined attributes, but also custom-defined ones. *
* @param aDirectoryObjectNode a directory object node that has an attribute * @param anAttributeName the attribute name * @return the attribute value asProperty, or null if indeterminate
(e.g. aDirectoryObjectNode is not a directory object node
or aDirectoryObjectNode has no attribute named anAttributeName)
*/
getAttributeAsProperty(
aDirectoryObjectNode: Node,
anAttributeName: String | string
): Property;
/**
* Searches for ids in a specified search base in all directories.
* @param aSearchFilter LDAP search filter (as specified by RFC 2254)
* @param searchBase search base for the search, if null all directories for current node will be searched
* @param attributes a List of return attributes
* @return the search result as a Map. If there are no hits, an empty Map is returned.
The Map contains ids as keys and a Map as values containing the returned attributes.
* @since Sitevision 2.6.1_02
*/
simpleSearch(
aSearchFilter: String | string,
searchBase: String | string,
attributes: List | unknown[]
): Map;
}
declare namespace DirectoryUtil {}
declare var directoryUtil: DirectoryUtil;
export default directoryUtil;