public class SyncAddressRequest extends TelesalesRequest
Modifier and Type | Field and Description |
---|---|
protected org.w3c.dom.Element | addressesElement_
addressesElement_ contains the request document's Addresses element.
|
protected org.w3c.dom.Element | alternatePartyIdsElement_
alternatePartyIdsElement_ contains the request document's AlternativePartyIds element.
|
protected org.w3c.dom.Element | contactElement_
contactElement contains the request document's Contact element.
|
protected org.w3c.dom.Element | contactsElement_
contactsElement_ contains the request document's Contacts element.
|
protected Customer | customer_
Customer data.
|
protected org.w3c.dom.Element | customerDemographicsElement_
customerDemographicsElement_ contains the request document's CustomerDemographics element.
|
protected org.w3c.dom.Element | customerElement_
customerElement_ contains the request document's Customer element.
|
protected org.w3c.dom.Element | customerPartyElement_
customerPartyElement_ contains the request document's CustomerParty element.
|
protected org.w3c.dom.Element | partyIdElement_
partyIdElement_ contains the request document's PartyId element.
|
protected org.w3c.dom.Element | personElement_
personElement contains the request document's Person element.
|
protected org.w3c.dom.Element | syncCriteriaElement_
syncCriteriaElement_ contains the request document's SyncCriteria element.
|
protected org.w3c.dom.Element | syncElement_
syncElement_ contains the request document's Sync element.
|
protected org.w3c.dom.Element | userAccountElement_
userAccountElement_ contains the request document's UserAccount element.
|
Constructor and Description |
---|
SyncAddressRequest()
Default constructor to create a new request handler.
|
Modifier and Type | Method and Description |
---|---|
protected org.w3c.dom.Element | createAddressElement(Address address)
This method builds the Address element and adds it as a child of addressesElement_.
|
protected org.w3c.dom.Element | createAddressesElement()
This method builds the Addresses element and adds it as a child of customerPartyElement_.
|
protected org.w3c.dom.Element | createAlternatePartyIdsElement()
This method builds the AlternatePartyIds element and adds it as a child of customerPartyElement_.
|
protected org.w3c.dom.Element | createContactElement()
This method builds the Contact element and adds it as a child of contactsElement_.
|
protected org.w3c.dom.Element | createContactsElement()
This method builds the Contacts element and adds it as a child of customerPartyElement_.
|
protected org.w3c.dom.Element | createCustomerDemographicsElement()
This method builds the CustomerDemographics element and adds it as a child of customerElement_.
|
protected org.w3c.dom.Element | createCustomerElement()
This method builds the Customer element and adds it as a child of dataAreaElement_.
|
protected org.w3c.dom.Element | createCustomerPartyElement()
This method builds the CustomerParty element and adds it as a child of customerElement_.
|
protected org.w3c.dom.Element | createDataAreaElement()
This method builds the DataArea element and adds it as a child of rootElement_.
|
protected org.w3c.dom.Element | createPartyIdElement()
This method builds the PartyId element and adds it as a child of customerPartyElement_.
|
protected org.w3c.dom.Element | createPersonElement()
This method builds the Person element and adds it as a child of contactElement_.
|
protected org.w3c.dom.Element | createSenderElement()
This method builds the Sender element and adds it as a child of applicationAreaElement_.
|
protected org.w3c.dom.Element | createSyncCriteriaElement()
This method builds the SyncCriteria element and adds it as a child of syncElement_.
|
protected org.w3c.dom.Element | createSyncElement()
This method builds the Sync element and adds it as a child of dataAreaElement_.
|
protected org.w3c.dom.Element | createUserAccountElement()
This method builds the UserAccount element and adds it as a child of customerElement_.
|
protected org.w3c.dom.Document | getRequestBod()
This method constructs the request document.
|
protected java.lang.String[] | getRequestNodePathsToMask()
The SyncCustomerUpdateRequest implementation returns the SyncCustomer/DataArea/Customer/UserAccount/Authorization/Password SyncCustomer/DataArea/Customer/UserAccount/Authorization/ChallengeQuestion SyncCustomer/DataArea/Customer/UserAccount/Authorization/ChallengeAnswer values to be masked.
|
protected Session | getResponseData()
This method returns the unmarshalled response data in the form of a com.ibm.commerce.telesales.model.Customer object.
|
protected java.lang.String[] | getResponseNodePathsToMask()
The SyncCustomerUpdateRequest implementation returns the ConfirmBOD/DataArea/BOD/NounOutcome/Customer/UserAccount/Authorization/Password ConfirmBOD/DataArea/BOD/NounOutcome/Customer/UserAccount/Authorization/ChallengeQuestion ConfirmBOD/DataArea/BOD/NounOutcome/Customer/UserAccount/Authorization/ChallengeAnswer value to be masked.
|
ServiceContext | getServiceContext()
This method gets the appropriate ServiceContext properties.
|
protected java.lang.String | getSyncExpressionAction()
This method returns the action attribute for the SyncExpression element.
|
protected java.lang.String | getXSDFileName()
This method returns the name of the schema file for the request BOD (business object document).
|
protected org.w3c.dom.Document | maskRequestBod(org.w3c.dom.Document bod)
The SyncAddressRequest implementation masks the elements returned by getRequestNodePathsToMask method.
|
protected org.w3c.dom.Document | maskResponseBod(org.w3c.dom.Document bod)
The SyncAddressRequest implementation masks the elements returned by getResponseNodePathsToMask method.
|
protected void | setTelesalesProperties(TelesalesProperties properties)
This method sets the TelesalesProperties properties.
|
protected void | unmarshallBOD(org.w3c.dom.Element bodElement)
This method unmarshalls the BOD element.
|
protected void | unmarshallBODHeader(org.w3c.dom.Element bodHeaderElement)
This method unmarshalls the BODHeader element.
|
protected void | unmarshallConfirmBOD(org.w3c.dom.Element confirmBODElement)
This method unmarshalls the ConfirmBOD element.
|
protected void | unmarshallDataArea(org.w3c.dom.Element dataAreaElement)
This method unmarshalls the DataArea element.
|
protected void | unmarshallDocumentId(org.w3c.dom.Element documentIdElement)
This method unmarshalls the DocumentIds element.
|
protected void | unmarshallDocumentIds(org.w3c.dom.Element documentIdsElement)
This method unmarshalls the DocumentIds element.
|
protected void | unmarshallNounOutcome(org.w3c.dom.Element nounOutcomeElement)
This method unmarshalls the NounOutcome element.
|
protected void | unmarshallResponseBod(org.w3c.dom.Document bod)
This method unmarshalls the response BOD.
|
protected void | updateModel(java.lang.Object databean)
This method updates the model after the action has completed.
|
protected Customer customer_
protected org.w3c.dom.Element syncElement_
protected org.w3c.dom.Element syncCriteriaElement_
protected org.w3c.dom.Element customerElement_
protected org.w3c.dom.Element customerPartyElement_
protected org.w3c.dom.Element partyIdElement_
protected org.w3c.dom.Element alternatePartyIdsElement_
protected org.w3c.dom.Element addressesElement_
protected org.w3c.dom.Element contactsElement_
protected org.w3c.dom.Element contactElement_
protected org.w3c.dom.Element personElement_
protected org.w3c.dom.Element userAccountElement_
protected org.w3c.dom.Element customerDemographicsElement_
public SyncAddressRequest()
protected void updateModel(java.lang.Object databean)
protected Session getResponseData()
public ServiceContext getServiceContext()
protected java.lang.String getXSDFileName()
protected java.lang.String getSyncExpressionAction()
protected org.w3c.dom.Document getRequestBod()
<SyncCustomer> <!-- created by the createWCRootElement method --> . . </SyncCustomer>
protected org.w3c.dom.Element createSenderElement()
The following sample Sender element shows how the element is constructed:
<oa:Sender> <oa:LogicalId>TSCLIENT</oa:LogicalId> <oa:Component>Customer</oa:Component> <oa:Task>UpdateCustomer</oa:Task> <oa:ReferenceId>-1680589954192190044</oa:ReferenceId> <!-- value of getActionCtx --> <oa:Confirmation>2</oa:Confirmation> <oa:AuthorizationId>LOGON_TOKEN_ID_SCAFFOLDING</oa:AuthorizationId> <!-- value of ContextManager.getInstance().getSessionCtx() --> </oa:Sender>
protected org.w3c.dom.Element createDataAreaElement()
The following outline shows the structure of the DataArea element and its construction:
<DataArea> <oa:Sync> <!-- constructed by createSyncElement() --> . . </oa:Sync> <Customer> <!-- constructed by createCustomerElement() --> . . </Customer> </DataArea>
protected org.w3c.dom.Element createSyncElement()
The following outline shows the structure of the DataArea element and its construction:
<oa:Sync confirm="Always"> <oa:SyncCriteria> <!-- constructed by createSyncCriteriaElement() --> . . </oa:SyncCriteria> </oa:Sync>
protected org.w3c.dom.Element createSyncCriteriaElement()
The following sample shows the structure of the SyncCriteria element and its construction:
<oa:SyncCriteria expressionLanguage="XPath"> <oa:SyncExpression action="Add">CustomerAddress</oa:SyncExpression> <!-- the value of the action attribute is set to getSyncExpressionAction() --> </oa:SyncCriteria>
protected org.w3c.dom.Element createCustomerElement()
The following outline shows the structure of the Customer element and its construction:
<Customer> <oa:CustomerParty> <!-- constructed by createCustomerPartyElement() --> . . </oa:CustomerParty> <CommerceArea> <!-- constructed by createCommerceAreaElement() --> . . </CommerceArea> <UserAccount> <!-- constructed by createUserAccountElement() --> . . </UserAccount> <oa:CustomerDemographics> <!-- constructed by createCustomerDemographicsElement() --> . . </oa:CustomerDemographics> <UserData> <!-- constructed by createUserDataElement() --> <wc:UserDataField name="name">value</wc:UserDataField> . </UserData> </Customer>
protected org.w3c.dom.Element createCustomerPartyElement()
The following outline shows the structure of the CustomerParty element and its construction:
<oa:CustomerParty active="false" oneTime="false"> <oa:PartyId> <!-- constructed by createPartyIdElement() --> . . </oa:PartyId> <oa:AlternatePartyIds> <!-- constructed by createAlternatePartyIdsElement() --> . . </oa:AlternatePartyIds> <oa:Currency>USD</oa:Currency> <!-- customer_.getPreferredCurrency() --> <oa:Addresses> <!-- constructed by createAddressesElement() --> . . </oa:Addresses> <oa:Contacts> <!-- constructed by createContactsElement() --> . . </oa:Contacts> <oa:CorrespondenceLanguage>-1</oa:CorrespondenceLanguage> <!-- customer_.getPreferredLanguage() --> </oa:CustomerParty>
protected org.w3c.dom.Element createPartyIdElement()
The following outline shows the structure of the PartyId element and its construction:
<oa:PartyId> <oa:Id>4052</oa:Id> <!-- customer_.getMemberId() --> </oa:PartyId>
protected org.w3c.dom.Element createAlternatePartyIdsElement()
The following outline shows the structure of the AlternatePartyIds element and its construction:
<oa:AlternatePartyIds> <oa:CustomerPartyId> <oa:Id>4052</oa:Id> <!-- customer_.getMemberId() --> </oa:CustomerPartyId> </oa:AlternatePartyIds>
protected org.w3c.dom.Element createAddressesElement()
The following outline shows the structure of the Addresses element and its construction:
<oa:Addresses> <oa:Address> <!-- constructed by createAddressElement(). --> . . </oa:Address> </oa:Addresses>
The address passed to the createAddressElement() method is determined by the "address" TelesalesProperties property.
protected org.w3c.dom.Element createAddressElement(Address address)
The following sample shows the structure of the Address element and its construction:
<oa:Address primary="false" type="SB"> <!-- primary is address.getPrimary(), type is address.getType() --> <oa:AddressId>4052</oa:AddressId> <!-- address.getAddressId(); if this a new address this element is excluded --> <oa:AddressLine>123 Broadway</oa:AddressLine> <!-- address.getAddressLine1() --> <oa:AddressLine>123 Broadway</oa:AddressLine> <!-- address.getAddressLine2() --> <oa:AddressLine>123 Broadway</oa:AddressLine> <!-- address.getAddressLine3() --> <oa:City>New York</oa:City> <!-- address.getTownCity() --> <wc:StateOrProvinceCode>NY</wc:StateOrProvinceCode> <!-- Address.setStateProvinceCode() --> <wc:CountryCode>US</wc:CountryCode> <!-- Address.setCountryCode() --> <oa:Region>USA</oa:Region> <!-- address.getRegion() --> <oa:PostalCode>12345</oa:PostalCode> <!-- address.getPostalCode() --> <AddressNickName>home</AddressNickName> <!-- address.getAddressNickName() --> <!-- constructed by createUserDataElement() --> <wc:UserData> <!-- optional --> <wc:UserDataField name="name">value</wc:UserDataField> . </wc:UserData> </oa:Address>
protected org.w3c.dom.Element createContactsElement()
The following outline shows the structure of the Contacts element and its construction:
<oa:Contacts> <Contact> <!-- constructed by createContactElement(). --> . . </Contact> </oa:Contacts>
protected org.w3c.dom.Element createContactElement()
The following sample shows the structure of the Contact element and its construction:
<Contact> <oa:Person> <!-- constructed by createPersonElement() --> . . </oa:Person> <oa:EmailAddress>joe@ibm.com</oa:EmailAddress> <!-- customer_.getEmailAddress1() --> <oa:EmailAddress>joe@ibm.com</oa:EmailAddress> <!-- customer_.getEmailAddress2() --> <oa:Fax>555-1111</oa:Fax> <!-- customer_.getFax1() --> <oa:Fax>555-2222</oa:Fax> <!-- customer_.getFax2() --> <oa:URI/> <oa:Description lang="en-US" owner="" /> <Telephone publish="0" type="PHN">555-3333</oa:Telephone> <!-- customer_.getTelephone1(), customer_.getPublishTelephone1(), customer_.getTelephoneType1() --> <Telephone publish="0" type="PHN">555-4444</oa:Telephone> <!-- customer_.getTelephone2(), customer_.getPublishTelephone2(), customer_.getTelephoneType2() --> <oa:BestCallTime/> <!-- customer_.getBestCallTime1() --> </oa:Contact>
protected org.w3c.dom.Element createPersonElement()
The following sample shows the structure of the Person element and its construction:
<oa:Person> <oa:PersonCode/> <oa:PersonName> <oa:Salutation lang="en-US">Mr.</oa:Salutation> <!-- customer_.getSalutation() --> <oa:GivenName lang="en-US">Joe</oa:GivenName> <!-- customer_.getGivenName() --> <oa:PreferredGivenName lang="en-US">Joe</oa:PreferredGivenName> <!-- customer_.getPreferredGivenName() --> <oa:MiddleName lang="en-US">John</oa:MiddleName> <!-- customer_.getMiddleName() --> <oa:FamilyName lang="en-US">Doe</oa:FamilyName> <!-- customer_.getFamilyName() --> <oa:Suffix lang="en-US">M.D.</oa:Suffix> <!-- customer_.getSuffix() --> <oa:FormattedName lang="en-US">Mr. Joe John Doe M.D.</oa:FormattedName> <!-- customer_.getFormattedName() --> </oa:PersonName> </oa:Person>
protected org.w3c.dom.Element createUserAccountElement()
The following sample shows the structure of the UserAccount element and its construction:
<UserAccount> <SystemId>NOT_IMPLEMENTED</SystemId> <-- customer_.getSystemId() --> <Authorization> <ChallengeQuestion>Mother's maiden name</ChallengeQuestion> <!-- customer_.getChallengeQuestion() --> <ChallengeAnswer>Smith</ChallengeAnswer> <!-- customer_.getChallengeAnswer() --> </Authorization> </UserAccount>
protected org.w3c.dom.Element createCustomerDemographicsElement()
The following sample shows the structure of the CustomerDemographics element and its construction:
<CustomerDemographics> <Age>3</Age> <!-- customer_.getAge() --> <Gender>M</Gender> <!-- customer_.getGender() --> <MaritalStatus>S</MaritalStatus> <!-- customer_.getMaritalStatus() --> <AnnualIncome currency="">6</AnnualIncome> <!-- customer_.getAnnualIncome() --> <NumberInHousehold>1</NumberInHousehold> <!-- customer_.getHouseholdSize() --> <NumberOfChildren>0</NumberOfChildren> <!-- customer_.getChildrenSize() --> <oa:Employer>IBM</oa:Employer> <!-- customer_.getEmployer() --> <ReturnCustomer>No</ReturnCustomer> <!-- customer_.getReturningCustomer() --> </CustomerDemographics>
protected void unmarshallResponseBod(org.w3c.dom.Document bod)
protected void unmarshallConfirmBOD(org.w3c.dom.Element confirmBODElement)
<ConfirmBOD> <oa:ApplicationArea> <!-- unmarshalled by unmarshallApplicationArea() --> . . </oa:ApplicationArea> <DataArea> <!-- unmarshalled by unmarshallDataArea() --> . . </DataArea> </ConfirmBOD>
protected void unmarshallDataArea(org.w3c.dom.Element dataAreaElement)
<DataArea> <BOD> <!-- unmarshalled by unmarshallBOD() --> . . </BOD> </DataArea>
protected void unmarshallBOD(org.w3c.dom.Element bodElement)
<BOD> <BODHeader> <!-- unmarshalled by unmarshallBODHeader() --> . . </BODHeader> <NounOutcome> <!-- unmarshalled by unmarshallNounOutcome() --> . . </NounOutcome> </BOD>
protected void unmarshallBODHeader(org.w3c.dom.Element bodHeaderElement)
<BODHeader> <BODFailure> <!-- unmarshalled by unmarshallBODFailure() --> . . </BODFailure> </BODHeader>
protected void unmarshallNounOutcome(org.w3c.dom.Element nounOutcomeElement)
<NounOutcome> <oa:DocumentIds> <!-- unmarshalled by unmarshallDocumentIds() --> . . </oa:DocumentIds> </NounOutcome>
protected void unmarshallDocumentIds(org.w3c.dom.Element documentIdsElement)
<oa:DocumentIds> <oa:DocumentId> <!-- unmarshalled by unmarshallDocumentId() --> . . </oa:DocumentId> </oa:DocumentIds>
protected void unmarshallDocumentId(org.w3c.dom.Element documentIdElement)
<oa:DocumentId> <oa:Id>53</oa:Id> <!-- stored in Address.setAddressId --> </oa:DocumentIds>
protected void setTelesalesProperties(TelesalesProperties properties)
protected org.w3c.dom.Document maskRequestBod(org.w3c.dom.Document bod)
protected org.w3c.dom.Document maskResponseBod(org.w3c.dom.Document bod)
protected java.lang.String[] getRequestNodePathsToMask()
protected java.lang.String[] getResponseNodePathsToMask()