com.ibm.commerce.member.syncbeans

Class VMMProxy

  • java.lang.Object
    • com.ibm.commerce.member.syncbeans.VMMProxy


  • public class VMMProxy
    extends java.lang.Object
    When WebSphere Commerce is configured to authenticate and store user and organization data in an LDAP server, this helper class is used to interact with the LDAP server using the Virtual Member Manager (VMM) APIs that are part of WebSphere Application Server. When WebSphere Application Server Security is configured to use federated repositories, the VMM APIs are used.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM Copyright notice field.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      commonj.sdo.DataObject addMemberToGroups(java.util.ArrayList alstGroups, java.lang.String astrDN)
      Adds an entity (member) to one or more groups.
      commonj.sdo.DataObject checkPassword(java.lang.String astrLogonID, java.lang.String astrPassword)
      Verifies the password of a user in VMM.
      commonj.sdo.DataObject createMember(TypedProperty atpProperties, short anMemberType, java.lang.String astrParentDN)
      Creates a member in VMM.
      java.util.List deleteMember(java.lang.String astrDN)
      Deletes a member in VMM.
      commonj.sdo.DataObject findUserByLogonId(java.lang.String astrRDNName, java.lang.String astrLogonId)
      Searches for users in VMM based on the logon ID.
      static VMMProxy getInstance()
      Gets the singleton instance of this class.
      commonj.sdo.DataObject getMemberByDN(java.lang.String astrDN)
      Gets the member entity object within the Commerce Root Organization or its search bases.
      commonj.sdo.DataObject getMemberByUniqueId(java.lang.String astrUniqueId)
      Gets the entity object containing the member and all of its standard properties.
      commonj.sdo.DataObject removeMemberFromGroups(java.util.ArrayList alstGroups, java.lang.String astrDN)
      Removes an entity (member) from one or more groups.
      commonj.sdo.DataObject updateMember(TypedProperty atpProperties, java.lang.String astrDN, short anMemberType)
      Updates an entity (member) with the specified properties.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static VMMProxy getInstance()
                                    throws ECSystemException
        Gets the singleton instance of this class.
        Returns:
        the singleton instance of this class.
        Throws:
        ECSystemException - if the VMM service is not available.
      • checkPassword

        public commonj.sdo.DataObject checkPassword(java.lang.String astrLogonID,
                                                    java.lang.String astrPassword)
                                             throws com.ibm.websphere.wim.exception.WIMException,
                                                    ECException,
                                                    java.rmi.RemoteException
        Verifies the password of a user in VMM.
        Parameters:
        astrLogonID - the logon ID of the user, for example, "wcsadmin" or "uid=wcsadmin,o=root organization".
        astrPassword - the plain text password.
        Returns:
        an entity data object of the
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if VMM is not available.
        java.rmi.RemoteException - if a remote exception occurs.
      • createMember

        public commonj.sdo.DataObject createMember(TypedProperty atpProperties,
                                                   short anMemberType,
                                                   java.lang.String astrParentDN)
                                            throws com.ibm.websphere.wim.exception.WIMException,
                                                   ECException,
                                                   java.rmi.RemoteException
        Creates a member in VMM.
        Parameters:
        atpProperties - the properties of the member to be created.
        anMemberType - The member type:
        • 0: User
        • 1: Organization
        • 2: Organization Unit
        astrParentDN - the DN of the member's parent organization.
        Returns:
        the root data object which contains the created member and its identifier.
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if the VMM service is not available.
        java.rmi.RemoteException - if a remote exception occurs.
      • updateMember

        public commonj.sdo.DataObject updateMember(TypedProperty atpProperties,
                                                   java.lang.String astrDN,
                                                   short anMemberType)
                                            throws com.ibm.websphere.wim.exception.WIMException,
                                                   ECException,
                                                   java.rmi.RemoteException
        Updates an entity (member) with the specified properties.
        Parameters:
        atpProperties - the properties of the member to be updated in LDAP.
        astrDN - the distinguished name of the entity to be updated.
        anMemberType - The member type:
        • 0: User
        • 1: Organization
        • 2: Organization Unit
        Returns:
        the root data object.
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if the VMM service is not available.
        java.rmi.RemoteException - if a remote exception occurs.
      • getMemberByDN

        public commonj.sdo.DataObject getMemberByDN(java.lang.String astrDN)
                                             throws com.ibm.websphere.wim.exception.WIMException,
                                                    ECException,
                                                    java.rmi.RemoteException
        Gets the member entity object within the Commerce Root Organization or its search bases. The entity object is returned with all of its standard VMM properties. Aside from the standard properties, the following information is also returned:
        • modifyTimestamp attribute
        • parent element
        • group membership
        Parameters:
        astrDN - the distinguished name of the member to be retrieved.
        Returns:
        the entity data object containing the requested information.
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if the VMM service is not available.
        java.rmi.RemoteException - if a remote exception occurs.
      • getMemberByUniqueId

        public commonj.sdo.DataObject getMemberByUniqueId(java.lang.String astrUniqueId)
                                                   throws com.ibm.websphere.wim.exception.WIMException,
                                                          ECException,
                                                          java.rmi.RemoteException
        Gets the entity object containing the member and all of its standard properties.
        Parameters:
        astrUniqueId - the unique identifier of the member to be retrieved.
        Returns:
        the entity data object containing the requested information.
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if the VMM service is not available.
        java.rmi.RemoteException - if a remote exception occurs.
      • findUserByLogonId

        public commonj.sdo.DataObject findUserByLogonId(java.lang.String astrRDNName,
                                                        java.lang.String astrLogonId)
                                                 throws com.ibm.websphere.wim.exception.WIMException,
                                                        ECException,
                                                        java.rmi.RemoteException
        Searches for users in VMM based on the logon ID.
        Parameters:
        astrRDNName - the Relative DN used for users, for example "uid".
        astrLogonId - the logon ID, for example, "wcsadmin".
        Returns:
        the root data object containing the entities matching the search expression.
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if the VMM service is not available.
        java.rmi.RemoteException - if a remote exception occurs.
      • addMemberToGroups

        public commonj.sdo.DataObject addMemberToGroups(java.util.ArrayList alstGroups,
                                                        java.lang.String astrDN)
                                                 throws com.ibm.websphere.wim.exception.WIMException,
                                                        ECException,
                                                        java.rmi.RemoteException
        Adds an entity (member) to one or more groups.
        Parameters:
        alstGroups - A list of groups, identified by distinguished name.
        astrDN - The distinguished name of the entity to be added to the groups.
        Returns:
        the root data object which contains the created entity and its identifier.
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if the VMM service is not available.
        java.rmi.RemoteException - if a remote exception occurs.
      • removeMemberFromGroups

        public commonj.sdo.DataObject removeMemberFromGroups(java.util.ArrayList alstGroups,
                                                             java.lang.String astrDN)
                                                      throws com.ibm.websphere.wim.exception.WIMException,
                                                             ECException,
                                                             java.rmi.RemoteException
        Removes an entity (member) from one or more groups.
        Parameters:
        alstGroups - A list of groups, identified by distinguished name.
        astrDN - The distinguished name of the entity to be added to the groups.
        Returns:
        the root data object which contains the unassigned entity and its identifier.
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if the VMM service is not available.
        java.rmi.RemoteException - if a remote exception occurs.
      • deleteMember

        public java.util.List deleteMember(java.lang.String astrDN)
                                    throws com.ibm.websphere.wim.exception.WIMException,
                                           ECException,
                                           java.rmi.RemoteException
        Deletes a member in VMM.
        Parameters:
        astrDN - the DN of the entity to be deleted.
        Returns:
        a list of entities that are removed from VMM.
        Throws:
        com.ibm.websphere.wim.exception.WIMException - if a VMM error occurs.
        ECException - if the VMM service is not available.
        java.rmi.RemoteException - if a remote exception occurs.