com.ibm.commerce.usermanagement.commands

Interface MemberRoleUnassignCmd

  • All Superinterfaces:
    AccCommand, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ControllerCommand, ECCommand, Protectable, java.io.Serializable, com.ibm.websphere.command.TargetableCommand
    All Known Implementing Classes:
    MemberRoleUnassignCmdImpl


    public interface MemberRoleUnassignCmd
    extends ControllerCommand
    The MemberRoleUnassign command unassigns roles for a member from orgEntities.

    The member can be a user, organization or organizational unit. When unassigning roles from organization or organizational unit, the memberId and organEntityId should be same.

    The unassigned records are removed from the MBRROLE table. 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 parameter URL and memberId are mandatory.

    Behavior

    • Calls an empty task command PreMemberRoleUnassignCmd. Store Developers can overwrite it change the input to the command.
    • This command can unassign multiple roles for one member in one command call according to different parameter combination.
      • memberId&roledId
      • memberId&roledId&orgEntityId
      • memberId&roledId1&orgEntityId1&roleId2&orgEntityId2
      • memberId&orgEntityId1
    • The roleId parameter takes the forms like roleId, roleId1, roleId2..., the corresponding orgEntityId should be orgEntityId, orgEntiyId1, orgEntityId2...
    • If a roleId does not have corresponding orgEntityId, then the command will unassign this role from all orgEntities for this member.
    • If an orgEntityId does have corresponding roleId, the command will unassign all roles this member played in this orgEntity.
    • If unassign roles for an orgEntity and this orgEntity has descendants, this command will also unassign roles for all its descendants.
    • If unassign roles for a user, after assign roles, the command will check if the user is still a member of the SiteAdministrators group or the Administrators group. If not the command will update the RegisterType of this user to 'R'.
    • If the command fails, the GenericApplicationError view command is called. Upon successful completion, the specified URL is called.
    • Calls an empty task command PostMemberRoleUnassignCmd. Store Developers can overwrite it to perform additional operations.

    Exception Conditions

    • memberId is null (_ERR_CMD_MISSING_PARAM).
    • memberId is not a valid orgEntityId or userId (_ERR_CMD_INVALID_PARAM).
    • If memberId is an organization or organizational unit, if the corresponding orgEntityId(#) is specified but not equals to the memberId, an exception will be thrown (_ERR_INVALID_ORGENTITYID_IN_ROLEASSIGN). If the corresponding orgEntityId(#) is not specified, it will default to be the same as the memberId.
    • Method Detail

      • getCheckURL

        boolean getCheckURL()
        Gets indicator which indicates whether or not the command will check URL parameter.
        Returns:
        boolean The indicator indicates whether or not the command will check URL parameter
        • true - This command will check URL parameter
        • false - This command will not check URL parameter
      • getMemberId

        java.lang.String getMemberId()
        Gets the memberId of the user or orgEntities to unassign roles.
        Returns:
        The memberId
      • getOrgEntities

        java.util.Vector getOrgEntities()
        Gets a vector which contains all orgEntityIds (Long) for roles to unassign. These orgEntityIds are get from requestProperties.
        Returns:
        java.util.Vector A vector which contains all orgEntityIds (Long) for roles to unassigns
      • getRoles

        java.util.Vector getRoles()
        Gets a vector which contains all roldIds (Integer) to be unassigned. These roldIds are get from requestProperties.
        Returns:
        java.util.Vector A vector which contains all roldIds (Integer) to be unassigned
      • reset

        void reset()
        Resets all instance variables of the command to initial state so it can be used again.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
      • setCheckURL

        void setCheckURL(boolean abCheckURL)
        Sets whether or not this command will check URL parameters.
        Parameters:
        abCheckURL - boolean
        • true - This command will check URL parameter
        • false - This command will not check URL parameter
      • setMemberId

        void setMemberId(java.lang.String astrMemberId)
        Sets the memberId of the user or orgEntities to unassign roles.
        Parameters:
        astrMemberId - The memberId