com.ibm.commerce.usermanagement.commands

Class MemberRoleUpdateCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, MemberRoleUpdateCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class MemberRoleUpdateCmdImpl
    extends ControllerCommandImpl
    implements MemberRoleUpdateCmd
    The MemberRoleUpdateCmdImpl command assigns roles to a member for an organization. Use this command with SSL (Secure Sockets Layer) to ensure that the information are encrypted. To do so type the command with the HTTPS secure protocol.

    The parameters memberId, roleId and orgEntityId are mandatory. Usage:
    Usage 1: To assign roles to a user in an organization based on the user's users_id, use the following syntax (in this example, the user with users_id 2 will be granted roles -2 and -4 in the default organization):
    memberId=2&roleId0=-2&orgEntityId0=-2000&roleId1=-4&orgEntityId1=-2000
    Note that if the user had other roles defined, then these roles will be implicitly removed. The end result will be that the user only plays the two roles defined in this example.
    Usage 2: To define roles for an organization (in this example, the roles -2 and -4 will be added to the default organization):
    memberId=-2000&roleId0=-2&orgentityId0=-2000&roleId1=-4&orgentityId1=-2000
    Usage 3: To assign a role to a user based on the user's distinguished name (DN):
    distinguishedName=uid=buyeraadmin,o=buyer a organization,o=root organization&roleId=-2&orgentityId=-2000
    In this example, the user with DN uid=buyeraadmin,o=buyer a organization,o=root organization will be granted the -2 role in the default organization.
    Usage 4: To unassign a role from a user based on the user's distinguished name (DN):
    distinguishedName=uid=buyeraadmin,o=buyer a organization,o=root organization&roleId=-2&orgentityId=-2000&unassignRole=true
    This example will take away the buyeraadmin's -2 role in the default organization (if it existed). Exception Conditions

    • The memberId, roleId and the noURL orgEntityId must be non-null and their length must be greater than 0.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MemberRoleUpdateCmdImpl

        public MemberRoleUpdateCmdImpl()
    • Method Detail

      • getMemberId

        public java.lang.String getMemberId()
        Gets the memberId of the user or orgEntities to assign roles.
        Specified by:
        getMemberId in interface MemberRoleUpdateCmd
        Returns:
        The memberId
      • getRedirectURL

        public java.lang.String getRedirectURL()
        Return redirect URL.
        Specified by:
        getRedirectURL in interface MemberRoleUpdateCmd
        Returns:
        The redirect URL.
      • performExecute

        public void performExecute()
                            throws ECException
        The performExecute method is called to when the marketing manager asks to add one or more users to a customer segment.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECExcption - thrown if user does not exist
        ECException
      • setMemberId

        public void setMemberId(java.lang.String astrMemberId)
        Sets the memberId of the user or orgEntities to assign roles.
        Specified by:
        setMemberId in interface MemberRoleUpdateCmd
        Parameters:
        astrMemberId - The memberId
      • setRedirectURL

        public void setRedirectURL(java.lang.String astrRedirectURL)
        Sets redirect URL.
        Specified by:
        setRedirectURL in interface MemberRoleUpdateCmd
        Parameters:
        astrRedirectURL - The redirect URL
      • getIsUpdatingRoleByDN

        public boolean getIsUpdatingRoleByDN()
        Get whether or not the role(s) are being updated based on the user distinguished name.
        Returns:
        true if we are updating the roles based on a user's DN, false otherwise
      • getIsAssigningRoleToOrgentity

        public boolean getIsAssigningRoleToOrgentity()
        Get whether or not we are assigning the role to an organization.
        Returns:
        true if we are assigning the role to an org; false if we are assigning the role to a user.
      • getIsUnassigningRoleFromDN

        public boolean getIsUnassigningRoleFromDN()
        Get whether or not we are unassigning the role; applies only when updating a role based on a user DN.
        Returns:
        true if we are unassigning the role; false if we are assigning the role.
      • getOrgEntityIdsToAssign

        public java.util.Vector getOrgEntityIdsToAssign()
        Get the list of organization Ids for the role assignment.
        Returns:
        The organization Ids for the role assignment.
      • getOrgEntityIdsToUnassign

        public java.util.Vector getOrgEntityIdsToUnassign()
        Get the list of organization Ids for the role unassignment.
        Returns:
        The list of organization Ids for the role unassignment.
      • getRoleIdsToUnassign

        public java.util.Vector getRoleIdsToUnassign()
        Get the role Ids for the role unassignment.
        Returns:
        The role Ids for the role unassignment
      • getRoleIdsToAssign

        public java.util.Vector getRoleIdsToAssign()
        Get the role Ids for the role assignment.
        Returns:
        The role Ids for the role assignment
      • setIsUpdatingRoleByDN

        public void setIsUpdatingRoleByDN(boolean abByUserDN)
        Set whether or not we are updating the role by DN.
        Parameters:
        abByUserDN - true if we are updating the role by DN; false if we are updating the role by member Id.
      • setIsAssigningRoleToOrgentity

        public void setIsAssigningRoleToOrgentity(boolean abOrgEntity)
        Set whether or not we are assigning the role to an orgEntity.
        Parameters:
        abOrgEntity - true if we are assigning the role to an orgEntity; false if we are assigning the role to a user.
      • setIsUnassigningRoleFromDN

        public void setIsUnassigningRoleFromDN(boolean abUnassignRoleByDN)
        Set whether or not we are unassigning the role.
        Parameters:
        abUnassignRoleByDN - true if we are unassigning a role; false if we are assigning the role.
      • setOrgEntityIdsToAssign

        public void setOrgEntityIdsToAssign(java.util.Vector avecOrgEntityId)
        Set the organization Ids to assign.
        Parameters:
        avecOrgEntityId - The organization Ids to assign.
      • setOrgEntityIdsToUnassign

        public void setOrgEntityIdsToUnassign(java.util.Vector avecRemOrgEntityId)
        Set the organization Ids to unassign.
        Parameters:
        avecRemOrgEntityId - The organization Ids to unassign.
      • setRoleIdsToUnassign

        public void setRoleIdsToUnassign(java.util.Vector avecRemRoleId)
        Set the role Ids to unassign.
        Parameters:
        avecRemRoleId - The role Ids to unassign.
      • setRoleIdsToAssign

        public void setRoleIdsToAssign(java.util.Vector avecRoleId)
        The role Ids to assign.
        Parameters:
        avecRoleId - The role Ids to assign.