public class UserSyncBean extends MemberSyncBean
UserDO
: USERS table
UserRegistryDO
: USERREG table
UserDemographicsDO
: USERDEMO table
SelfAddressDO
: ADDRESS table (self-address only)
BusinessProfileDO
: BUSPROF table
UserProfileDO
: USERPROF table
MemberAttributesDO
: MBRATTRVAL table
VMMProxy
is used to read from and write to LDAP, using Virtual Member Manager (VMM). VMM is a component
of WebSphere Application Server (WAS) that's used when WAS security is configured to use the federated user repository.
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 |
---|
UserSyncBean(TypedProperty tpCreate)
Constructor that creates a new user in the database and LDAP.
|
Modifier and Type | Method and Description |
---|---|
static void |
clearTransactionCachedUserSyncBean()
Clear the UserSyncBean that in the transaction cache.
|
static UserSyncBean |
findByCommerceDN(java.lang.String strCommerceDN)
Finds a user based on the distinguished name of the user in the Commerce database.
|
static UserSyncBean |
findByLDAPDN(java.lang.String strLDAPDN)
Finds a user based on the distinguished name of the user in LDAP.
|
static UserSyncBean |
findByLogonId(java.lang.String strLogonId)
Finds a user by logon ID.
|
static UserSyncBean |
findByMemberId(java.lang.String strMemberId)
Finds a user by member ID.
|
static commonj.sdo.DataObject |
findInLDAPByLogonId(java.lang.String astrLogonId)
Finds a user in LDAP by logon ID.
|
java.lang.Long[] |
getAncestors()
Returns a list of orgEntity IDs of the ancestors.
|
java.lang.Integer[] |
getRoles()
Returns a list of role IDs that the user has.
|
java.lang.Integer[] |
getRoles(java.lang.String astrOrgEntityId)
Returns a list of roles that the user has in the specified organization
|
java.lang.Integer[] |
getRolesForOrgEntityAndAncestors(java.lang.String astrOrgEntityId)
Gets all roles assigned to this user for the specified organization and all of the
organization's ancestor organizations.
|
static UserSyncBean |
getTransactionCachedUserSyncBean(java.lang.String astrUserId)
Returns a UserSyncBean from the transaction cache, or, if it is not there,
then creates a new UserSyncBean,
and places it in the transaction cache.
|
static boolean |
isMigrationEnabled()
Returns whether or not existing users in the database should be migrated to LDAP during
logon or update of the user profile.
|
void |
updatePasswordInLDAP(java.lang.String strLogonPassword)
Updates the user's password in LDAP.
|
isMemberInRole, isMemberInRole, isMemberInRole
getCommerceDN, getLDAPDN, getLDAPMember, getMemberId, getMemberType, getProperties, getProperty, getProperty, getWMMMapAccessBean, isWMMEnabled, refresh, update
public static final java.lang.String COPYRIGHT
public UserSyncBean(TypedProperty tpCreate) throws ECException, java.rmi.RemoteException, javax.persistence.NoResultException
tpCreate
- The properties of the new user.ECException
java.rmi.RemoteException
javax.persistence.NoResultException
public static final UserSyncBean getTransactionCachedUserSyncBean(java.lang.String astrUserId) throws java.rmi.RemoteException, javax.persistence.NoResultException, ECException
astrUserId
- the user Id for the bean.java.rmi.RemoteException
javax.persistence.NoResultException
ECException
public static final void clearTransactionCachedUserSyncBean()
public static boolean isMigrationEnabled()
MigrateUsersFromWCSdb
setting in the instance configuration file.MigrateUsersFromWCSdb
equals ON
; false otherwise.public static UserSyncBean findByLogonId(java.lang.String strLogonId) throws java.rmi.RemoteException, javax.persistence.NoResultException, ECException
If user data is stored only in the database, this finder method will lookup the user using the "logonId" field in the USERREG table.
If LDAP is the master repository for user profile data, the logonId field in the database will
contain the DN in lower case. Thus, if the input logon ID is a DN string,
findByCommerceDN()
will be called. However, if the input logon ID is a short name
(non-DN) and the user is found in LDAP, then the user will be found in the database using the
"DN" field of the USERS table. If the user has been updated in LDAP since the last synchronization,
the database will be updated with the most recent values from LDAP.
strLogonId
- The logon ID.java.rmi.RemoteException
javax.persistence.NoResultException
ECException
public static UserSyncBean findByMemberId(java.lang.String strMemberId) throws java.rmi.RemoteException, javax.persistence.NoResultException, ECException
strMemberId
- The member ID of the user.java.rmi.RemoteException
javax.persistence.NoResultException
ECException
public static commonj.sdo.DataObject findInLDAPByLogonId(java.lang.String astrLogonId) throws java.rmi.RemoteException, javax.persistence.NoResultException, ECException
astrLogonId
- The logon ID of the user.java.rmi.RemoteException
javax.persistence.NoResultException
ECException
public java.lang.Integer[] getRoles() throws javax.persistence.NoResultException
javax.persistence.NoResultException
public java.lang.Integer[] getRoles(java.lang.String astrOrgEntityId) throws javax.persistence.NoResultException
astrOrgEntityId
- Organization ID where the user has roles.javax.persistence.NoResultException
public java.lang.Integer[] getRolesForOrgEntityAndAncestors(java.lang.String astrOrgEntityId) throws javax.persistence.NoResultException
astrOrgEntityId
- The organization ID.javax.persistence.NoResultException
public java.lang.Long[] getAncestors() throws javax.persistence.NoResultException
javax.persistence.NoResultException
public void updatePasswordInLDAP(java.lang.String strLogonPassword) throws ECException, java.rmi.RemoteException, javax.persistence.NoResultException
strLogonPassword
- Logon passwordECException
java.rmi.RemoteException
javax.persistence.NoResultException
public static UserSyncBean findByCommerceDN(java.lang.String strCommerceDN) throws java.rmi.RemoteException, javax.persistence.NoResultException, ECException
strCommerceDN
- Distinguished name of the user in the Commerce database.java.rmi.RemoteException
javax.persistence.NoResultException
ECException
public static UserSyncBean findByLDAPDN(java.lang.String strLDAPDN) throws java.rmi.RemoteException, javax.persistence.NoResultException, ECException
strLDAPDN
- Distinguished name of the user in LDAP.java.rmi.RemoteException
javax.persistence.NoResultException
ECException