com.ibm.commerce.usermanagement.commands

Class ProcessProfileTypeCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, ProcessProfileTypeCmd, 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 ProcessProfileTypeCmdImpl
    extends TaskCommandImpl
    implements ProcessProfileTypeCmd
    This task command is called by UserRegistration commands to determine the profileType of a user during registration.

    This task command is called after the ProcessParentMember task command is called.
    The default logic of this task command is:
    If profileType is specified in requestProperties, check if it equals either 'C' or 'B'. If it does not equal either of these values, an exception is thrown.
    If profileType is not specified in requestProperties, and parentMemberId is null or is Default Organization, then set profileType to 'C', otherwise, set profileType to 'B'.
    The default logic can be overwritten.

    Inputs of this task command are:

     setRequestProperties(TypedProperty)
     - sets request properties which may or may not contain profileType property, but should contain
       parentMemberId property, otherwise, an exception is thrown.
     
    Outputs of this task command are:
     getRequestProperties(TypedProperty)
     - returns request properties which contains the profileType property.
     getProfileType
     - gets the profileType.
     
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

        public static final java.lang.String CLASSNAME
        The name of this implementation of the command.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProcessProfileTypeCmdImpl

        public ProcessProfileTypeCmdImpl()
    • Method Detail

      • getProfileType

        public java.lang.String getProfileType()
        Gets the profile type.
        Specified by:
        getProfileType in interface ProcessProfileTypeCmd
        Returns:
        The profile type.
      • performExecute

        public void performExecute()
                            throws ECException
        Determines the profileType value to use for a user. If is specified in requestProperties, check if it equals either 'C' or 'B'. If it does not equal either of these values, an ECException is thrown. If profileType is not specified in requestProperties, and parentMemberId is null or is Default Organization, then set profileType to 'C', otherwise, set profileType to 'B'.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - If the profile type is neither ECMemberConstants.EC_USER_PROFILE_BUSINESS ('B') nor ECMemberConstants.EC_USER_PROFILE_CUSTOMER ('C').