public abstract class LDAPModel
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static short |
ACCOUNT_CANCELLED |
static short |
ACCOUNT_DEACTIVATED |
static short |
DOMAIN_NOT_FOUND |
static short |
INTERNAL_ERROR |
static short |
INVALID_PASSWORD |
static short |
PASSWORD_EXPIRED |
static int |
PWD_CLEAR_TEXT |
static int |
PWD_DTIP_RC4 |
static short |
SESSION_EXPIRED |
static short |
USER_NOT_FOUND |
static short |
WORKAREA_NOT_FOUND |
static short |
WORKAREA_NOT_SET |
Constructor and Description |
---|
LDAPModel() |
Modifier and Type | Method and Description |
---|---|
abstract 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.
|
abstract 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.
|
abstract 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
|
abstract 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
|
abstract void |
bind(java.lang.String sUser,
java.lang.String sPass)
Synchronously authenticates to the LDAP server using LDAP_V3.
|
abstract 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.
|
abstract void |
connectAndBind(java.util.Properties oProps)
Connect to LDAP Server using a Properties object
|
abstract void |
deleteAddress(java.sql.Connection oJdbc,
java.lang.String sAddrId)
Delete an address from LDAP directory
|
abstract void |
deleteUser(java.sql.Connection oJdbc,
java.lang.String sUserId)
Delete a User from LDAP directory
|
abstract 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
|
abstract 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.
|
abstract void |
dropAll()
Drop an entire LDAP directory
|
abstract boolean |
exists(java.lang.String sSearchString)
Check whether or not an LDAP entry exists
The directory is searched from the connection string key.
|
java.lang.String |
getPartitionName() |
abstract void |
loadDomain(java.sql.Connection oJdbc,
int iDomainId)
Load all users and contact address from a Domain into an LDAP directory
|
abstract 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
|
void |
setPartitionName(java.lang.String sName) |
public static final int PWD_CLEAR_TEXT
public static final int PWD_DTIP_RC4
public static final short USER_NOT_FOUND
public static final short INVALID_PASSWORD
public static final short ACCOUNT_DEACTIVATED
public static final short SESSION_EXPIRED
public static final short DOMAIN_NOT_FOUND
public static final short WORKAREA_NOT_FOUND
public static final short WORKAREA_NOT_SET
public static final short ACCOUNT_CANCELLED
public static final short PASSWORD_EXPIRED
public static final short INTERNAL_ERROR
public abstract 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.sConnStr
- ldap://host:port/distinguished_nameLDAPException
public abstract void connectAndBind(java.util.Properties oProps) throws LDAPException
Connect to LDAP Server using a Properties object
oProps
- Properties for connecting to LDAP server.LDAPException
public abstract void bind(java.lang.String sUser, java.lang.String sPass) throws LDAPException
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.sUser
- 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 LDAPpublic abstract 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.LDAPException
public abstract 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.sSearchString
- LDAP search string, for example "cn=user@mail.com,dc=publicContacts,dc=my_workarea,dc=my_domain"LDAPException
public abstract void dropAll() throws LDAPException
LDAPException
java.lang.IllegalStateException
- If not connected to LDAPpublic abstract void addAddress(java.sql.Connection oJdbc, java.lang.String sAddrId) throws LDAPException, java.sql.SQLException
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.oJdbc
- JDBC ConnectionsAddrId
- GUID of address to be addedLDAPException
- If address already exists at directoryjava.sql.SQLException
- If sAddrId is not found at v_ldap_contacts SQL viewjava.lang.IllegalStateException
- If not connected to LDAPpublic abstract 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.oJdbc
- JDBC ConnectionsAddrId
- GUID of address to be added or replacedLDAPException
java.sql.SQLException
public abstract void deleteAddress(java.sql.Connection oJdbc, java.lang.String sAddrId) throws LDAPException, java.sql.SQLException
oJdbc
- JDBC ConnectionsAddrId
- GUID of address to be deletedLDAPException
java.sql.SQLException
- If sAddrId is not found at v_ldap_contacts SQL viewjava.lang.IllegalStateException
- If not connected to LDAPpublic abstract void addUser(java.sql.Connection oJdbc, java.lang.String sUserId) throws LDAPException, java.sql.SQLException
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=orgoJdbc
- JDBC ConnectionsUserId
- GUID of user to be addedLDAPException
java.sql.SQLException
- If sUserId is not found at v_ldap_users SQL viewjava.lang.IllegalStateException
- If not connected to LDAPpublic abstract void addOrReplaceUser(java.sql.Connection oJdbc, java.lang.String sUserId) throws LDAPException, java.sql.SQLException
oJdbc
- JDBC database connectionsUserId
- GUID of user to be added or replacedLDAPException
java.sql.SQLException
public abstract void deleteUser(java.sql.Connection oJdbc, java.lang.String sUserId) throws LDAPException, java.sql.SQLException
oJdbc
- JDBC ConnectionsUserId
- GUID of user to be addedLDAPException
java.sql.SQLException
- If sUserId is not found at v_ldap_users SQL viewpublic abstract 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
oJdbc
- JDBC ConnectioniDomainId
- Numeric Identifier for DomainLDAPException
java.sql.SQLException
public abstract 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
oJdbc
- JDBC ConnectionsDomainNm
- Name for Domain containing the WorkAreasWorkAreaNm
- WorkArea NameLDAPException
java.sql.SQLException
public abstract 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 deletedsDomainNm
- Domain NamesWorkAreaNm
- WorkArea NameLDAPException
java.lang.IllegalStateException
- If not connected to LDAPpublic java.lang.String getPartitionName()
public void setPartitionName(java.lang.String sName)