|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.ldap.LDAPModel
com.knowgate.ldap.LDAPNovell
public class LDAPNovell
Very Basic LDAP interface API implementation
| Field Summary |
|---|
| Fields inherited from class com.knowgate.ldap.LDAPModel |
|---|
ACCOUNT_CANCELLED, ACCOUNT_DEACTIVATED, DOMAIN_NOT_FOUND, INTERNAL_ERROR, INVALID_PASSWORD, organizationalUnitPattern, PASSWORD_EXPIRED, PWD_CLEAR_TEXT, PWD_DTIP_RC4, SESSION_EXPIRED, USER_NOT_FOUND, WORKAREA_NOT_FOUND, WORKAREA_NOT_SET |
| Constructor Summary | |
|---|---|
LDAPNovell()
|
|
| Method Summary | |
|---|---|
void |
addAddress(java.sql.Connection oJdbc,
java.lang.String sAddrId)
Add an address from v_ldap_contacts view to an LDAP directory Addresses may be either public or private depending on the value of field v_ldap_contacts.bo_private. |
void |
addOrReplaceAddress(java.sql.Connection oJdbc,
java.lang.String sAddrId)
Add or replace an Address This method is the same as addAddress() except that it does not raise an LDAPException if address already exists; in that case address is just replaced. |
void |
addOrReplaceUser(java.sql.Connection oJdbc,
java.lang.String sUserId)
Add or replace a User from v_ldap_users SQL view to the LDAP directory |
void |
addUser(java.sql.Connection oJdbc,
java.lang.String sUserId)
Add a User from v_ldap_users view to an LDAP directory Users are added under cn=user@mail.com,dc=users,dc=workarea_name,dc=domain_name,dc=hipergate,dc=org |
void |
bind(java.lang.String sUser,
java.lang.String sPass)
Synchronously authenticates to the LDAP server using LDAP_V3. |
void |
connect(java.lang.String sConnStr)
Connect to LDAP Service At this point, there is no authentication, and any operations are conducted as an anonymous client. |
void |
connectAndBind(java.util.Properties oProps)
Connect to LDAP Server using a Properties object |
void |
deleteAddress(java.sql.Connection oJdbc,
java.lang.String sAddrId)
Delete an address from LDAP directory |
void |
deleteUser(java.sql.Connection oJdbc,
java.lang.String sUserId)
Delete a User from LDAP directory |
void |
deleteWorkArea(java.lang.String sDomainNm,
java.lang.String sWorkAreaNm)
Delete a WorkArea from the LDAP directory All entries under dc=sDomainNm,dc=hipergate,dc=org that match dc=sWorkAreaNm are deleted |
void |
disconnect()
Synchronously disconnects from the LDAP server The disconnect method abandons any outstanding requests, issues an unbind request to the server, and then closes the socket. |
void |
dropAll()
Drop an entire LDAP directory |
boolean |
exists(java.lang.String sSearchString)
Check whether or not an LDAP entry exists The directory is searched from the connection string key. |
void |
loadDomain(java.sql.Connection oJdbc,
int iDomainId)
Load all users and contact address from a Domain into an LDAP directory |
void |
loadWorkArea(java.sql.Connection oJdbc,
java.lang.String sDomainNm,
java.lang.String sWorkAreaNm)
Load all users and contact address from a WorkArea into an LDAP directory |
static void |
main(java.lang.String[] argv)
|
| Methods inherited from class com.knowgate.ldap.LDAPModel |
|---|
getPartitionName, makeName, setPartitionName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LDAPNovell()
| Method Detail |
|---|
public void connect(java.lang.String sConnStr)
throws LDAPException
Connect to LDAP Service
At this point, there is no authentication, and any operations are conducted as an anonymous client.
connect in class LDAPModelsConnStr - ldap://host:port/distinguished_nameLDAPException
public void connectAndBind(java.util.Properties oProps)
throws LDAPException
Connect to LDAP Server using a Properties object
connectAndBind in class LDAPModeloProps - Properties for connecting to LDAP server.LDAPException
public void disconnect()
throws LDAPException
Synchronously disconnects from the LDAP server
The disconnect method abandons any outstanding requests, issues an unbind request to the server, and then closes the socket.
disconnect in class LDAPModelLDAPException
public void bind(java.lang.String sUser,
java.lang.String sPass)
throws LDAPException,
java.lang.IllegalStateException
Synchronously authenticates to the LDAP server using LDAP_V3.
If the object has been disconnected from an LDAP server, this method attempts to reconnect to the server. If the object has already authenticated, the old authentication is discarded.
bind in class LDAPModelsUser - If non-null and non-empty, specifies that the connection and all operations through it should be authenticated with dn as the distinguished name.sPass - If non-null and non-empty, specifies that the connection and all operations through it should be authenticated with dn as the distinguished name and passwd as password.
LDAPException
java.lang.IllegalStateException - If not conencted to LDAP
public boolean exists(java.lang.String sSearchString)
throws LDAPException
Check whether or not an LDAP entry exists
The directory is searched from the connection string key.
exists in class LDAPModelsSearchString - LDAP search string, for example "cn=user@mail.com,dc=publicContacts,dc=my_workarea,dc=my_domain"
LDAPException
public void addAddress(java.sql.Connection oJdbc,
java.lang.String sAddrId)
throws LDAPException,
java.sql.SQLException,
java.lang.IllegalStateException
Add an address from v_ldap_contacts view to an LDAP directory
Addresses may be either public or private depending on the value of field v_ldap_contacts.bo_private. If bo_private is zero then the address is public, if bo_private is not zero then the address is private.
addAddress in class LDAPModeloJdbc - JDBC ConnectionsAddrId - GUID of address to be added
LDAPException - If address already exists at directory
java.sql.SQLException - If sAddrId is not found at v_ldap_contacts SQL view
java.lang.IllegalStateException - If not connected to LDAP
public void addOrReplaceAddress(java.sql.Connection oJdbc,
java.lang.String sAddrId)
throws LDAPException,
java.sql.SQLException
Add or replace an Address
This method is the same as addAddress() except that it does not raise an LDAPException if address already exists; in that case address is just replaced.
addOrReplaceAddress in class LDAPModeloJdbc - JDBC ConnectionsAddrId - GUID of address to be added or replaced
LDAPException
java.sql.SQLException
public void deleteAddress(java.sql.Connection oJdbc,
java.lang.String sAddrId)
throws LDAPException,
java.sql.SQLException,
java.lang.IllegalStateException
deleteAddress in class LDAPModeloJdbc - JDBC ConnectionsAddrId - GUID of address to be deleted
LDAPException
java.sql.SQLException - If sAddrId is not found at v_ldap_contacts SQL view
java.lang.IllegalStateException - If not connected to LDAP
public void addUser(java.sql.Connection oJdbc,
java.lang.String sUserId)
throws LDAPException,
java.sql.SQLException,
java.lang.IllegalStateException
Add a User from v_ldap_users view to an LDAP directory
Users are added under cn=user@mail.com,dc=users,dc=workarea_name,dc=domain_name,dc=hipergate,dc=org
addUser in class LDAPModeloJdbc - JDBC ConnectionsUserId - GUID of user to be added
LDAPException
java.sql.SQLException - If sUserId is not found at v_ldap_users SQL view
java.lang.IllegalStateException - If not connected to LDAP
public void addOrReplaceUser(java.sql.Connection oJdbc,
java.lang.String sUserId)
throws LDAPException,
java.sql.SQLException
addOrReplaceUser in class LDAPModeloJdbc - JDBC database connectionsUserId - GUID of user to be added or replaced
LDAPException
java.sql.SQLException
public void deleteUser(java.sql.Connection oJdbc,
java.lang.String sUserId)
throws LDAPException,
java.sql.SQLException
deleteUser in class LDAPModeloJdbc - JDBC ConnectionsUserId - GUID of user to be added
LDAPException
java.sql.SQLException - If sUserId is not found at v_ldap_users SQL view
public void loadDomain(java.sql.Connection oJdbc,
int iDomainId)
throws LDAPException,
java.sql.SQLException
Load all users and contact address from a Domain into an LDAP directory
loadDomain in class LDAPModeloJdbc - JDBC ConnectioniDomainId - Numeric Identifier for Domain
LDAPException
java.sql.SQLException
public void loadWorkArea(java.sql.Connection oJdbc,
java.lang.String sDomainNm,
java.lang.String sWorkAreaNm)
throws LDAPException,
java.sql.SQLException
Load all users and contact address from a WorkArea into an LDAP directory
loadWorkArea in class LDAPModeloJdbc - JDBC ConnectionsDomainNm - Name for Domain containing the WorkAreasWorkAreaNm - WorkArea Name
LDAPException
java.sql.SQLException
public void deleteWorkArea(java.lang.String sDomainNm,
java.lang.String sWorkAreaNm)
throws LDAPException,
java.lang.IllegalStateException
Delete a WorkArea from the LDAP directory
All entries under dc=sDomainNm,dc=hipergate,dc=org that match dc=sWorkAreaNm are deleted
deleteWorkArea in class LDAPModelsDomainNm - Domain NamesWorkAreaNm - WorkArea Name
LDAPException
java.lang.IllegalStateException - If not connected to LDAP
public void dropAll()
throws LDAPException,
java.lang.IllegalStateException
dropAll in class LDAPModelLDAPException
java.lang.IllegalStateException - If not connected to LDAP
public static void main(java.lang.String[] argv)
throws java.lang.ClassNotFoundException,
java.io.IOException,
java.sql.SQLException,
LDAPException
java.lang.ClassNotFoundException
java.io.IOException
java.sql.SQLException
LDAPException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||