public class PersonHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BILLING
Billing type
|
static java.lang.String |
CHECKOUT_ACCESS_PROFILE
The checkout access profile.
|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
static java.lang.String |
DEFAULT_ACCESS_PROFILE
The default access profile.
|
static java.lang.String |
FIND_BY_SELF_XPATH
The default expression, used when a noun identifier is not provided.
|
static java.lang.String |
NOUN
The OAGIS noun that this helper performs BOD action on.
|
static java.lang.String |
SHIPPING
Shipping type
|
static java.lang.String |
SHIPPING_ADD_BILLING
ShippingAndBilling type
|
Constructor and Description |
---|
PersonHelper() |
PersonHelper(com.ibm.commerce.rest.utils.Instrumentor instrumentor)
Instantiates a new person helper.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
deleteAddressForPerson(BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh,
java.lang.String nickName)
This method is used to delete contact
|
java.util.Map |
deleteContextAttributeForPerson(java.lang.String jobName,
java.lang.String storeId,
java.lang.String attrVal,
BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh)
Deletes one or more context attributes of an existing person.
|
java.lang.String |
getAddressIdByNickName(java.lang.String nickName,
BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh,
java.lang.String accessProfile)
Get address Id by a person's nick name.
|
com.ibm.commerce.rest.utils.Instrumentor |
getInstrumentor()
Get the instrumentor associated with this request instance.
|
commonj.sdo.DataObject |
getPerson(BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh,
java.lang.String expression,
java.lang.String accessProfile)
This method performs a
GetPerson service request. |
commonj.sdo.DataObject |
getPersonContact(PersonType person,
java.lang.String nickName,
BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh,
java.lang.String accessProfile)
This method get PersonContact from a PersonType object.
|
commonj.sdo.DataObject |
getPersonContact(java.lang.String nickName,
BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh,
java.lang.String accessProfile)
This method performs a
GetPersonContact service request. |
commonj.sdo.DataObject |
getPersonContactByAddressType(java.lang.String addressType,
BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh,
java.lang.String accessProfile)
Get person contact by address type.
|
commonj.sdo.DataObject |
getPersonContactById(java.lang.String addressId,
BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh,
java.lang.String accessProfile)
Get person contact by address Id.
|
java.lang.String |
getPersonIdForSelf(BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh)
Get person id for the user who is logged on.
|
PersonType |
getPersonType(BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh,
java.lang.String expression,
java.lang.String accessProfile)
This method get DataObject for the first and then extract PersonType.
|
java.util.Map<java.lang.String,java.lang.Object> |
processOrChangePerson(java.lang.String resourceName,
java.lang.String urlParamGrpName,
java.lang.String verb,
java.lang.String actionCode,
java.util.Map requestMap,
BusinessContextType businessContext,
javax.security.auth.callback.CallbackHandler callbackHandler)
Create BOD object and execute it.
|
java.util.Map<java.lang.String,java.lang.Object> |
resetPassword(java.util.Map<java.lang.String,java.lang.Object> requestMap,
java.lang.String resourceName,
BusinessContextType bContext,
javax.security.auth.callback.CallbackHandler cbh)
This method is used to reset password for registered shopper.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String DEFAULT_ACCESS_PROFILE
public static final java.lang.String CHECKOUT_ACCESS_PROFILE
public static final java.lang.String FIND_BY_SELF_XPATH
public static final java.lang.String NOUN
public static final java.lang.String SHIPPING_ADD_BILLING
public static final java.lang.String SHIPPING
public static final java.lang.String BILLING
public PersonHelper()
public PersonHelper(com.ibm.commerce.rest.utils.Instrumentor instrumentor)
instrumentor
- the instrumentorpublic com.ibm.commerce.rest.utils.Instrumentor getInstrumentor()
public commonj.sdo.DataObject getPerson(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String expression, java.lang.String accessProfile) throws PersonException
GetPerson
service request.bContext
- the b contextcbh
- the cbhexpression
- the XPath expression.accessProfile
- the access profile of the get expression.PersonException
- the exception representing the error of the
GetPerson request.
public PersonType getPersonType(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String expression, java.lang.String accessProfile) throws PersonException
bContext
- the business contextcbh
- the cbhexpression
- the expressionaccessProfile
- the access profilePersonException
- the person exceptionpublic java.lang.String getPersonIdForSelf(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws PersonException
bContext
- the b contextcbh
- the cbhPersonException
- the person exceptionpublic commonj.sdo.DataObject getPersonContact(java.lang.String nickName, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String accessProfile) throws PersonException
GetPersonContact
service request.nickName
- Nick name of the contactbContext
- Business contextcbh
- Callback handleraccessProfile
- access profilePersonException
- the exception representing the error of the
getPersonContact request.
public commonj.sdo.DataObject getPersonContactByAddressType(java.lang.String addressType, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String accessProfile) throws PersonException
addressType
- address typebContext
- business contextcbh
- callback handleraccessProfile
- access profilePersonException
public commonj.sdo.DataObject getPersonContactById(java.lang.String addressId, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String accessProfile) throws PersonException
addressId
- bContext
- cbh
- accessProfile
- PersonException
public java.lang.String getAddressIdByNickName(java.lang.String nickName, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String accessProfile) throws PersonException
nickName
- Nick name.bContext
- Business context.cbh
- Callback handler.accessProfile
- Access profile.PersonException
- May throw PersonException.public commonj.sdo.DataObject getPersonContact(PersonType person, java.lang.String nickName, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String accessProfile) throws PersonException
person
- the current shopper.nickName
- of the contact to get.bContext
- Business context.cbh
- Callback handler.accessProfile
- Access profile.PersonException
public java.util.Map<java.lang.String,java.lang.Object> processOrChangePerson(java.lang.String resourceName, java.lang.String urlParamGrpName, java.lang.String verb, java.lang.String actionCode, java.util.Map requestMap, BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler) throws java.lang.Exception
resourceName
- resource nameurlParamGrpName
- URL parameter group name defined in XML configuration fileverb
- verbactionCode
- action coderequestMap
- request databusinessContext
- business contextcallbackHandler
- callback handlerjava.lang.Exception
- throw exception when error happenspublic java.util.Map<java.lang.String,java.lang.Object> deleteAddressForPerson(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String nickName) throws PersonException
bContext
- cbh
- nickName
- PersonException
public java.util.Map<java.lang.String,java.lang.Object> resetPassword(java.util.Map<java.lang.String,java.lang.Object> requestMap, java.lang.String resourceName, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws java.lang.Exception
requestMap
- resourceName
- bContext
- cbh
- java.lang.Exception
public java.util.Map deleteContextAttributeForPerson(java.lang.String jobName, java.lang.String storeId, java.lang.String attrVal, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws PersonException
jobName
- storeId
- attrVal
- bContext
- cbh
- PersonException