public class CreateSegmentFromXMLCmdImpl extends ControllerCommandImpl implements CreateSegmentFromXMLCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright
|
static java.lang.String | GET_REG_USERS_QUERY
The Query executed to get the list of users present in the segment xml
|
static java.lang.String | GUEST_USER_TYPE
The User Registration type
|
static java.lang.String | STATUS_MSG_ALL_OK
Status message - All actions completed successfully
|
static java.lang.String | STATUS_MSG_EMPTY_SEGMENT_WARNING
Status message - Warning, segment created but with no members
|
static java.lang.String | STATUS_MSG_INPUT_VALIDATION_ERROR
Status message - Input parameters (logonId, encryptedPassword, XML) are missing or invalid
|
static java.lang.String | STATUS_MSG_LOGON_ERROR
Status message - Logon failure
|
static java.lang.String | STATUS_MSG_SEGMENT_CREATE_ERROR
Status message - Error creating segment(s)
|
static java.lang.String | STATUS_MSG_SEGMENT_XML_ERROR
Status message - Segment XML markup is invalid
|
static java.lang.String | STATUS_MSG_UNKNOWN_ERROR
Status message - Unknown error occurred
|
Constructor and Description |
---|
CreateSegmentFromXMLCmdImpl()
Class constructor
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String | decryptPassword(java.lang.String encrypted)
Takes an encrypted password created by wcs_encrypt.{bat|sh} with no key and returns the decrypted version of the password.
|
protected java.lang.String | generateSegmentXML(java.util.Hashtable segment)
Parses through the given segment and generates a new XML in the format SegmentSave expects.
|
protected CommerceFoundationFactory | getCommerceFoundationFactory()
Get the Instance of Commerce Foundation Factory
|
protected MemberFactory | getMemberFactory()
Get the Instance of the Member Factory
|
protected java.io.InputStream | getOutputContent(java.lang.String statusMessage)
Given a status message, build an InputStream with the HTML contents so we can tell the client what happened.
|
protected java.lang.String | getSegmentName(java.lang.String name)
This method formats the given segment name before saving it to ensure the name is informative and distinct.
|
boolean | isGeneric()
Whether or not a generic user is permitted to execute this command
|
void | performExecute()
Execute the command.
|
void | setRequestProperties(TypedProperty reqParms)
Extracts and stores the relevant information from the web request.
|
void | validateParameters()
Validates input parameters.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String STATUS_MSG_ALL_OK
public static final java.lang.String STATUS_MSG_UNKNOWN_ERROR
public static final java.lang.String STATUS_MSG_LOGON_ERROR
public static final java.lang.String STATUS_MSG_SEGMENT_CREATE_ERROR
public static final java.lang.String STATUS_MSG_INPUT_VALIDATION_ERROR
public static final java.lang.String STATUS_MSG_SEGMENT_XML_ERROR
public static final java.lang.String STATUS_MSG_EMPTY_SEGMENT_WARNING
public static final java.lang.String GUEST_USER_TYPE
public static final java.lang.String GET_REG_USERS_QUERY
public CreateSegmentFromXMLCmdImpl()
public void setRequestProperties(TypedProperty reqParms)
public void validateParameters()
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>
public void performExecute() throws ECException
protected java.lang.String decryptPassword(java.lang.String encrypted)
protected java.lang.String generateSegmentXML(java.util.Hashtable segment)
The segment input should represent XML in the following format:
<segment name="Segment Name" description="Segment Description"> <members>1000, 1001, 1002</members> </segment>
protected java.lang.String getSegmentName(java.lang.String name)
protected java.io.InputStream getOutputContent(java.lang.String statusMessage)
public boolean isGeneric()
protected MemberFactory getMemberFactory()
protected CommerceFoundationFactory getCommerceFoundationFactory()