public class OrganizationSyncBean extends MemberSyncBean
If WebSphere Commerce is configured to use its own database as the master member profile repository, then the sync beans will only interact with WebSphere Commerce member tables. If on the other hand, WebSphere Commerce is configured to use an LDAP server as the master profile repository, the sync beans will persist member data to LDAP as well as the WebSphere Commerce database. During a read operation, the sync bean's properties are first populated based on the data in the database. Then, if the data on the LDAP server has been updated since the last synchronization, any LDAP properties that are configured to be synchronized will overwrite the existing property values. The ldapentry.xml configuration file controls which properties are synchronized between WebSphere Commerce and LDAP, and in which direction:
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM Copyright notice field.
|
Constructor and Description |
---|
OrganizationSyncBean(TypedProperty tpCreate)
Constructor that creates a new organization in the database and LDAP.
|
Modifier and Type | Method and Description |
---|---|
protected boolean | existsInDB()
Checks if the organization exists in the Commerce database.
|
protected boolean | existsInLDAP()
Checks if the organization exists in LDAP.
|
static OrganizationSyncBean | findByCommerceDN(java.lang.String strCommerceDN)
Finds an organization based on the distinguished name of the organization in the Commerce database.
|
static OrganizationSyncBean | findByLDAPDN(java.lang.String astrLDAPDN)
Finds an organization based on the distinguished name of the organization in LDAP.
|
static OrganizationSyncBean | findByMemberId(java.lang.String strMemberId)
Finds an organization by member ID.
|
protected static commonj.sdo.DataObject | findInLDAPByDN(java.lang.String astrDN)
Finds an organization in LDAP by DN.
|
java.lang.Long[] | getAncestors()
Returns an array of orgEntity IDs of the ancestors.
|
java.lang.Long[] | getChildOrgEntities()
Returns an array of orgEntity IDs that are immediate children (one level) of this orgEntity.
|
java.lang.Long[] | getChildren()
Returns an array of member IDs of the immediate children (one level) of the organization.
|
java.lang.Long[] | getChildUsers()
Returns an array of user IDs that are immediate children (one level) of the organization.
|
java.lang.Long[] | getDescendantOrgEntities()
Returns an array of orgEntity IDs of all the descendant orgEntities.
|
java.lang.Long[] | getDescendants()
Returns an array of member IDs of all the descendants of this organization.
|
java.lang.Long[] | getDescendantUsers()
Returns an array of user IDs that are descendants of the organization.
|
java.lang.Integer[] | getRoles()
Returns an array of role IDs that the organization has.
|
protected void | initDOs()
Initialization for the list of sync helper data object classes for reading and writing data to the various organization database tables.
|
protected static boolean | isAuthorizationDomain(java.lang.String astrDN)
Checks if the distinguished name is an authorization domain, for example, ad=my organization,o=root organization.
|
protected static boolean | isDomainController(java.lang.String astrDN)
Checks if the distinguished name is a LDAP domain controller.
|
protected static boolean | isExcludedOrganization(java.lang.String astrDN)
Checks if the distinguished name is in the list of organizations to exclude from synchronization.
|
protected boolean | isSynchronizationNeeded()
Checks if synchronization is needed between the database and LDAP.
|
public static final java.lang.String COPYRIGHT
public OrganizationSyncBean(TypedProperty tpCreate) throws ECException, java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException, javax.ejb.CreateException
public static OrganizationSyncBean findByCommerceDN(java.lang.String strCommerceDN) throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException, ECException
public static OrganizationSyncBean findByMemberId(java.lang.String strMemberId) throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException, ECException
protected static boolean isDomainController(java.lang.String astrDN)
protected static boolean isExcludedOrganization(java.lang.String astrDN)
protected static boolean isAuthorizationDomain(java.lang.String astrDN)
protected static commonj.sdo.DataObject findInLDAPByDN(java.lang.String astrDN) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException, javax.ejb.CreateException, ECException
public java.lang.Integer[] getRoles() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException
public java.lang.Long[] getAncestors() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException
public java.lang.Long[] getDescendants() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException
public java.lang.Long[] getChildren() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException
public java.lang.Long[] getChildOrgEntities() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException
public java.lang.Long[] getChildUsers() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException
public java.lang.Long[] getDescendantOrgEntities() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException
public java.lang.Long[] getDescendantUsers() throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException
protected void initDOs() throws ECException
The default logic is to use the following data object classes:
protected boolean isSynchronizationNeeded()
protected boolean existsInDB()
protected boolean existsInLDAP()
public static OrganizationSyncBean findByLDAPDN(java.lang.String astrLDAPDN) throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, javax.ejb.FinderException, ECException