Class AttributeUtil
- java.lang.Object
-
- com.ibm.security.access.ldap.utils.AttributeUtil
-
public class AttributeUtil extends java.lang.Object
Static utility methods for Native LdapHelper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AttributeUtil.AttributeGetResult
transformed retrieved Attributes result
-
Constructor Summary
Constructors Constructor Description AttributeUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LdapModifyResult
addAttributeValue(java.lang.String dn, java.lang.String attributeName, java.lang.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.LdapContextCreateResult
createSubContext(java.lang.String dn, javax.naming.directory.Attributes attrs)
This method is to give the user ability to create the sub contextLdapAttributeGetResult
getAttributeValue(java.lang.String dn, java.lang.String[] attributeNames)
This interface gives the user ability to get the attribute from LDAPvoid
init(LdapServerConnection ldapConn, java.lang.String serverConnName, java.lang.String baseDN)
This method is to initiate with the server connection name and baseDNvoid
init(java.lang.String ldapConn, java.lang.String baseDN)
This method is to initiate with server connection name and baseDNvoid
initWithParameters(java.lang.String serverConnName, java.lang.String connectionTimeout, java.lang.String idleTimeout, java.lang.String poolSize, java.lang.String hostname, boolean isSsl, int port, java.lang.String bindDN, java.lang.String bindDnPWD, java.lang.String keystoreStr, java.lang.String labelStr, java.lang.String baseDN)
This method is to initiate with the detailed LDAP connection parametersAttributeUtil.AttributeGetResult
ldapAttributeGetResultToAttributeGetResult(java.lang.String attributeName, LdapAttributeGetResult lagr)
Transform the attribute GET resultLdapModifyResult
removeAttribute(java.lang.String dn, java.lang.String attributeName, java.lang.String attributeValue)
This interface gives the user ability to update the attribute from LDAPLdapSearchResult
search(java.lang.String dn, java.lang.String filter)
This method gives the user ability to search LDAP for the given filter in the specific dnLdapModifyResult
setAttributeValue(java.lang.String dn, java.lang.String attributeName, java.lang.Object value)
This interface will give the user ability to update the attribute from the LDAP
-
-
-
Method Detail
-
removeAttribute
public LdapModifyResult removeAttribute(java.lang.String dn, java.lang.String attributeName, java.lang.String attributeValue)
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(java.lang.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
public LdapAttributeGetResult getAttributeValue(java.lang.String dn, java.lang.String[] attributeNames)
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
public LdapModifyResult setAttributeValue(java.lang.String dn, java.lang.String attributeName, java.lang.Object value)
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
public LdapModifyResult addAttributeValue(java.lang.String dn, java.lang.String attributeName, java.lang.Object value)
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
public void init(java.lang.String ldapConn, java.lang.String baseDN)
This method is to initiate with server connection name and baseDN- Parameters:
ldapConn
- , the connection from lmi server connectionsbaseDN
- , the base distinguished name
-
init
public void init(LdapServerConnection ldapConn, java.lang.String serverConnName, java.lang.String baseDN)
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(java.lang.String serverConnName, java.lang.String connectionTimeout, java.lang.String idleTimeout, java.lang.String poolSize, java.lang.String hostname, boolean isSsl, int port, java.lang.String bindDN, java.lang.String bindDnPWD, java.lang.String keystoreStr, java.lang.String labelStr, java.lang.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
public LdapSearchResult search(java.lang.String dn, java.lang.String filter)
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
-
createSubContext
public LdapContextCreateResult createSubContext(java.lang.String dn, javax.naming.directory.Attributes attrs)
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
-
-