public class AttributeUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AttributeUtil.AttributeGetResult
transformed retrieved Attributes result
|
Constructor and Description |
---|
AttributeUtil() |
Modifier and Type | Method and 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 LDAP
|
LdapContextCreateResult |
createSubContext(java.lang.String dn,
javax.naming.directory.Attributes attrs)
This method is to give the user ability to create the sub context
|
LdapAttributeGetResult |
getAttributeValue(java.lang.String dn,
java.lang.String[] attributeNames)
This interface gives the user ability to get the attribute from LDAP
|
void |
init(LdapServerConnection ldapConn,
java.lang.String serverConnName,
java.lang.String baseDN)
This method is to initiate with the server connection name and baseDN
|
void |
init(java.lang.String ldapConn,
java.lang.String baseDN)
This method is to initiate with server connection name and baseDN
|
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
|
AttributeUtil.AttributeGetResult |
ldapAttributeGetResultToAttributeGetResult(java.lang.String attributeName,
LdapAttributeGetResult lagr)
Transform the attribute GET result
|
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
|
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
|
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
|
public LdapModifyResult removeAttribute(java.lang.String dn, java.lang.String attributeName, java.lang.String attributeValue)
dn,
- the distinguished name which operations againstattributeName,
- the attribute name to removeattributeValue,
- the attribute value to removepublic AttributeUtil.AttributeGetResult ldapAttributeGetResultToAttributeGetResult(java.lang.String attributeName, LdapAttributeGetResult lagr)
attributeName,
- the attribute nameAttributes
- get result before transformpublic LdapAttributeGetResult getAttributeValue(java.lang.String dn, java.lang.String[] attributeNames)
dn,
- the distinguished name which operations againstattributeNames,
- the attribute name to retreive , if null, retrieve all the attributespublic LdapModifyResult setAttributeValue(java.lang.String dn, java.lang.String attributeName, java.lang.Object value)
dn,
- the distinguished name which operations againstattributeName,
- the attribute name to modifyvalue,
- the attribute value to modifypublic LdapModifyResult addAttributeValue(java.lang.String dn, java.lang.String attributeName, java.lang.Object value)
dn,
- the distinguished name which operations againstattributeName,
- the attribute name to addvalue,
- the attribute value to addpublic void init(java.lang.String ldapConn, java.lang.String baseDN)
ldapConn,
- the connection from lmi server connectionsbaseDN,
- the base distinguished namepublic void init(LdapServerConnection ldapConn, java.lang.String serverConnName, java.lang.String baseDN)
ldapConn,
- the LdapServerConnection connection objectserverConnName,
- customer given unique server connection namebaseDN,
- the base distinguished namepublic 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)
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 namepublic LdapSearchResult search(java.lang.String dn, java.lang.String filter)
dn
- , the distinguished name which operations againstfilter,
- the search filterpublic LdapContextCreateResult createSubContext(java.lang.String dn, javax.naming.directory.Attributes attrs)
dn
- the distinguished name which operations againstattrs,
- the attributes which is created in the new sub context