Class AttributeUtil
java.lang.Object
com.ibm.security.access.ldap.utils.AttributeUtil
Static utility methods for Native LdapHelper
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
transformed retrieved Attributes result -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttributeValue
(String dn, String attributeName, Object value) This interface gives the user ability to add the attribute from the LDAPvoid
close()
This method is to give the user ability to close the connection.createSubContext
(String dn, Attributes attrs) This method is to give the user ability to create the sub contextgetAttributeValue
(String dn, String[] attributeNames) This interface gives the user ability to get the attribute from LDAPvoid
init
(LdapServerConnection ldapConn, String serverConnName, String baseDN) This method is to initiate with the server connection name and baseDNvoid
This method is to initiate with server connection name and baseDNvoid
initWithParameters
(String serverConnName, String connectionTimeout, String idleTimeout, String poolSize, String hostname, boolean isSsl, int port, String bindDN, String bindDnPWD, String keystoreStr, String labelStr, String baseDN) This method is to initiate with the detailed LDAP connection parametersldapAttributeGetResultToAttributeGetResult
(String attributeName, LdapAttributeGetResult lagr) Transform the attribute GET resultremoveAttribute
(String dn, String attributeName, String attributeValue) This interface gives the user ability to update the attribute from LDAPThis method gives the user ability to search LDAP for the given filter in the specific dnsearch
(String dn, String filter, SearchControls sc) This method gives the user ability to search LDAP for the given filter in the specific dn with specific control.setAttributeValue
(String dn, String attributeName, Object value) This interface will give the user ability to update the attribute from the LDAP
-
Constructor Details
-
AttributeUtil
public AttributeUtil()
-
-
Method Details
-
removeAttribute
This interface gives the user ability to update the attribute from LDAP- Parameters:
dn
- , the distinguished name which operations againstattributeName
- , the attribute name to removeattributeValue
- , the attribute value to remove- Returns:
- LdapModifyResult, the result of ldap operations
-
ldapAttributeGetResultToAttributeGetResult
public AttributeUtil.AttributeGetResult ldapAttributeGetResultToAttributeGetResult(String attributeName, LdapAttributeGetResult lagr) Transform the attribute GET result- Parameters:
attributeName
- , the attribute nameAttributes
- get result before transform- Returns:
- Attributes get result before transform
-
getAttributeValue
This interface gives the user ability to get the attribute from LDAP- Parameters:
dn
- , the distinguished name which operations againstattributeNames
- , the attribute name to retreive , if null, retrieve all the attributes- Returns:
- LdapAttributeGetResult,the result for retrieved attributes
-
setAttributeValue
This interface will give the user ability to update the attribute from the LDAP- Parameters:
dn
- , the distinguished name which operations againstattributeName
- , the attribute name to modifyvalue
- , the attribute value to modify- Returns:
- LdapModifyResult, the result of modification for the attribute
-
addAttributeValue
This interface gives the user ability to add the attribute from the LDAP- Parameters:
dn
- , the distinguished name which operations againstattributeName
- , the attribute name to addvalue
- , the attribute value to add- Returns:
- LdapModifyResult, the result of add for the attribute
-
init
This method is to initiate with server connection name and baseDN- Parameters:
ldapConn
- , the connection from lmi server connectionsbaseDN
- , the base distinguished name
-
init
This method is to initiate with the server connection name and baseDN- Parameters:
ldapConn
- , the LdapServerConnection connection objectserverConnName
- , customer given unique server connection namebaseDN
- , the base distinguished name
-
initWithParameters
public void initWithParameters(String serverConnName, String connectionTimeout, String idleTimeout, String poolSize, String hostname, boolean isSsl, int port, String bindDN, String bindDnPWD, String keystoreStr, String labelStr, String baseDN) This method is to initiate with the detailed LDAP connection parameters- Parameters:
serverConnName
- , the unique server connection nameconnectionTimeout
- , the connection time out valueidleTimeout
- , the idle connect time out valuepoolSize
- , the pool sizehostname
- , the host nameisSsl
- , boolean value whether this use sslport
- , the port numberbindDN
- , the userid / bindDNbindDnPWD
- , the passwordkeystoreStr
- , the SSL keystore file locationlabelStr
- , the ssl client certificate labelbaseDN
- , the base distinguished name
-
search
This method gives the user ability to search LDAP for the given filter in the specific dn- Parameters:
dn
- , the distinguished name which operations againstfilter
- , the search filter- Returns:
- the search result for the name research
-
search
This method gives the user ability to search LDAP for the given filter in the specific dn with specific control. If a search() method was invoked with a specified size limit of 'n'and the result consists of more than 'n' results, search() would first return a NamingEnumeration. When the n'th result has been returned by invoking next() on the NamingEnumeration, a SizeLimitExceedException would then thrown when hasMore() is invoked.- Parameters:
dn
- , the distinguished name which operations againstfilter
- , the search filtersearchcontrols
- , the search controls- Returns:
- the search result for the name research
-
createSubContext
This method is to give the user ability to create the sub context- Parameters:
dn
- the distinguished name which operations againstattrs
- , the attributes which is created in the new sub context- Returns:
- LdapContextCreateResult, return the result for sub context creation
-
close
public void close()This method is to give the user ability to close the connection. Added for APAR IJ36891
-