com.ibm.commerce.tools.segmentation

Class CreateSegmentFromXMLCmdImpl

    • Field Detail

      • COPYRIGHT

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

        public static final java.lang.String STATUS_MSG_ALL_OK
        Status message - All actions completed successfully
        See Also:
        Constant Field Values
      • STATUS_MSG_UNKNOWN_ERROR

        public static final java.lang.String STATUS_MSG_UNKNOWN_ERROR
        Status message - Unknown error occurred
        See Also:
        Constant Field Values
      • STATUS_MSG_LOGON_ERROR

        public static final java.lang.String STATUS_MSG_LOGON_ERROR
        Status message - Logon failure
        See Also:
        Constant Field Values
      • STATUS_MSG_SEGMENT_CREATE_ERROR

        public static final java.lang.String STATUS_MSG_SEGMENT_CREATE_ERROR
        Status message - Error creating segment(s)
        See Also:
        Constant Field Values
      • STATUS_MSG_INPUT_VALIDATION_ERROR

        public static final java.lang.String STATUS_MSG_INPUT_VALIDATION_ERROR
        Status message - Input parameters (logonId, encryptedPassword, XML) are missing or invalid
        See Also:
        Constant Field Values
      • STATUS_MSG_SEGMENT_XML_ERROR

        public static final java.lang.String STATUS_MSG_SEGMENT_XML_ERROR
        Status message - Segment XML markup is invalid
        See Also:
        Constant Field Values
      • STATUS_MSG_EMPTY_SEGMENT_WARNING

        public static final java.lang.String STATUS_MSG_EMPTY_SEGMENT_WARNING
        Status message - Warning, segment created but with no members
        See Also:
        Constant Field Values
      • STATUS_MSG_LOGOFF_ERROR

        public static final java.lang.String STATUS_MSG_LOGOFF_ERROR
        Status message - Logoff failure
        See Also:
        Constant Field Values
      • STATUS_MSG_EMPTY_MEMBER_LIST_ERROR

        public static final java.lang.String STATUS_MSG_EMPTY_MEMBER_LIST_ERROR
        Status message - Empty member list failure
        See Also:
        Constant Field Values
      • STATUS_MSG_LOGON_HEX_WARNING

        public static final java.lang.String STATUS_MSG_LOGON_HEX_WARNING
        Status message - Warning, possible use of Hex password instead of Ascii
        See Also:
        Constant Field Values
      • STATUS_MSG_DUPLICATE_MEMBERS_WARNING

        public static final java.lang.String STATUS_MSG_DUPLICATE_MEMBERS_WARNING
        Status message - Duplicate members
        See Also:
        Constant Field Values
      • GUEST_USER_TYPE

        public static final java.lang.String GUEST_USER_TYPE
        The User Registration type
        See Also:
        Constant Field Values
      • GET_REG_USERS_QUERY

        public static final java.lang.String GET_REG_USERS_QUERY
        The Query executed to get the list of users present in the segment xml
        See Also:
        Constant Field Values
    • Constructor Detail

      • CreateSegmentFromXMLCmdImpl

        public CreateSegmentFromXMLCmdImpl()
        Class constructor
    • Method Detail

      • validateParameters

        public void validateParameters()
        Validates input parameters. Mandatory values are logonId, encryptedPassword, and XML.

        The XML must be in the following format:

         
          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
          <segmentation>
             <chart name="Chart Title" store_id="1234">
                 <segment name="Segment 1" description="Description for Segment 1">
                     <members>1000, 1001, 1002</members>
                 </segment>
                 <segment name="Segment 2" description="Description for Segment 2">
                     <members>2000, 2001, 2002</members>
                 </segment>
             </chart>
          </segmentation>
         
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
      • performExecute

        public void performExecute()
                            throws ECException
        Execute the command. First we authenticate the user credentials and log onto the Commerce system. If the user is valid and has the proper Marketing Manager roles, a new customer segment is created before the user is logged off.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException
      • isGeneric

        public boolean isGeneric()
        Whether or not a generic user is permitted to execute this command
        Specified by:
        isGeneric in interface ControllerCommand
        Overrides:
        isGeneric in class ControllerCommandImpl
        Returns:
        boolean true if a generic user can execute this command; always true for this command