public class DefaultCallContextController extends AbstractCsWidgetController implements CallContextController, CustomerController
CallContextController interface.CONTROLLER_CONTEXT| Constructor and Description |
|---|
DefaultCallContextController() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
clearCallContextCurrency() |
protected void |
clearCurrentCustomer() |
protected void |
clearCurrentOrder() |
protected void |
clearCurrentTicket() |
protected void |
clearImpersonationContextChanged() |
protected boolean |
compare(java.lang.Object instance1,
java.lang.Object instance2) |
TypedObject |
createNewCustomerAddress(ObjectValueContainer addressContainer,
java.lang.String addressTypeCode)
Create a new customer address
|
void |
dispatchEvent(java.lang.String context,
java.lang.Object source,
java.util.Map<java.lang.String,java.lang.Object> data)
Notifies all event acceptors which are registered for events with the context code context.
|
boolean |
endCall()
End the current call.
|
<R,T extends java.lang.Throwable> |
executeInContext(ImpersonationService.Executor<R,T> wrapper)
Execute the wrapper in the call centre context specified in context
|
protected java.util.List<CreditCardPaymentInfoModel> |
filterOutInvalidTokenisedCreditCards(java.util.List<CreditCardPaymentInfoModel> savedCards) |
java.lang.String |
getAnonymousCartCode()
Get the cart code for the currently loaded anonymous cart.
|
TypedObject |
getAnonymousCustomer()
Get the anonymous customer
|
java.util.List<TypedObject> |
getAvailableCurrencies()
Get the available session currencies
|
java.util.List<TypedObject> |
getAvailableSites() |
BaseSiteService |
getBaseSiteService() |
protected BasketController |
getBasketController() |
protected BeanFactory |
getBeanFactory() |
protected WidgetBrowserModel |
getBrowserToSwitchOnEndCall() |
TypedObject |
getCallContextCurrency()
Get the current call context currency.
|
protected CommerceCommonI18NService |
getCommerceCommonI18NService() |
protected CommonI18NService |
getCommonI18NService() |
TypedObject |
getCurrentCustomer()
Get the current customer
|
protected CustomerModel |
getCurrentCustomerModelOrAnonymousModel() |
protected Customer |
getCurrentCustomerOrAnonymous()
Deprecated.
since ages use getCurrentCustomerModelOrAnonymousModel instead
|
TypedObject |
getCurrentOrder()
Get the current order
|
TypedObject |
getCurrentSite() |
TypedObject |
getCurrentTicket()
Get the current ticket
|
protected CustomerAccountService |
getCustomerAccountService() |
java.util.List<TypedObject> |
getCustomerAddresses()
Get the list of addresses for the customer
|
java.util.List<TypedObject> |
getCustomerOrders()
Get the customers list of historic orders
|
protected CustomerOrdersStrategy |
getCustomerOrdersStrategy() |
java.util.List<TypedObject> |
getCustomerTickets()
Gets the list of tickets associated with this customer
|
protected java.util.Collection<AbstractCallContextDependantController> |
getDependantControllers()
Lookup the CallContext dependant controllers by asking the spring bean factory for all beans defined of that type.
|
protected ImpersonationService |
getImpersonationService() |
protected NewItemService |
getNewItemService() |
protected PropertyDescriptor |
getPropertyDescriptor(java.util.Set<PropertyDescriptor> properties,
java.lang.String qualifier) |
protected CurrencyModel |
getSiteDefaultCurrency() |
protected TicketStrategy |
getTicketStrategy() |
CommentTypeModel |
getTicketType(java.lang.String ticketType) |
java.util.List<TypedObject> |
getTokenisedCreditCards()
Gets the list of tokenised credit cards of this customer
|
protected UserService |
getUserService() |
protected WidgetHelper |
getWidgetHelper() |
protected java.lang.String |
getWidgetToFocusOnEndCall() |
protected boolean |
hasProperCurrency() |
protected void |
initialiseCurrentSite() |
boolean |
isAnonymousCustomer(TypedObject customer)
Test if a specified customer is the anonymous customer
|
protected boolean |
isAnonymousCustomerCart(TypedObject cartObject) |
protected boolean |
isImpersonationContextChanged() |
protected boolean |
isValidSite(BaseSiteModel baseSite) |
protected WidgetBrowserModel |
lookupBrowserToSwitchOnEndCall()
Must be overwritten! Use <lookup-method> in spring.
|
void |
removeCustomerAddress(TypedObject address)
Delete a customer address
|
void |
setAnonymousCartCode(java.lang.String anonymousCartCode)
Set the current anonymous cart based on the specified cart code.
|
void |
setBaseSiteService(BaseSiteService baseSiteService) |
void |
setBasketController(BasketController basketController) |
void |
setBeanFactory(BeanFactory beanFactory) |
boolean |
setCallContextCurrency(TypedObject currency)
Set the current currency.
|
void |
setCommerceCommonI18NService(CommerceCommonI18NService commerceCommonI18NService) |
void |
setCommonI18NService(CommonI18NService commonI18NService) |
boolean |
setCurrentCustomer(TypedObject customer)
Set the current customer.
|
boolean |
setCurrentOrder(TypedObject order)
Set the current order in the call context.
|
boolean |
setCurrentSite(TypedObject baseSite) |
boolean |
setCurrentTicket(TypedObject ticket)
Set the current ticket in the call context.
|
void |
setCustomerAccountService(CustomerAccountService customerAccountService) |
void |
setCustomerOrdersStrategy(CustomerOrdersStrategy customerOrdersStrategy) |
boolean |
setDefaultShipmentAddress(TypedObject address)
Set the customer's default shipment address
|
protected void |
setImpersonationContextChanged() |
void |
setImpersonationService(ImpersonationService impersonationService) |
void |
setNewItemService(NewItemService newItemService) |
void |
setTicketStrategy(TicketStrategy ticketStrategy) |
void |
setUserService(UserService userService) |
void |
setWidgetHelper(WidgetHelper widgetHelper) |
void |
setWidgetToFocusOnEndCall(java.lang.String widgetToFocusOnEndCall) |
protected void |
transferAnonymousCartToCustomer(TypedObject customer) |
getCockpitTypeService, getModelService, setCockpitTypeService, setModelServiceaddCockpitEventAcceptor, dispatchEvent, getAcceptors, removeCockpitEventAcceptor, setCockpitEventAcceptorsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCockpitEventAcceptor, removeCockpitEventAcceptor, setCockpitEventAcceptorsprotected WidgetHelper getWidgetHelper()
public void setWidgetHelper(WidgetHelper widgetHelper)
protected ImpersonationService getImpersonationService()
public void setImpersonationService(ImpersonationService impersonationService)
protected java.lang.String getWidgetToFocusOnEndCall()
public void setWidgetToFocusOnEndCall(java.lang.String widgetToFocusOnEndCall)
protected WidgetBrowserModel getBrowserToSwitchOnEndCall()
protected WidgetBrowserModel lookupBrowserToSwitchOnEndCall()
protected BasketController getBasketController()
public void setBasketController(BasketController basketController)
protected CustomerOrdersStrategy getCustomerOrdersStrategy()
public void setCustomerOrdersStrategy(CustomerOrdersStrategy customerOrdersStrategy)
protected TicketStrategy getTicketStrategy()
public void setTicketStrategy(TicketStrategy ticketStrategy)
protected UserService getUserService()
public void setUserService(UserService userService)
protected CustomerAccountService getCustomerAccountService()
public void setCustomerAccountService(CustomerAccountService customerAccountService)
protected CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
protected CommerceCommonI18NService getCommerceCommonI18NService()
public void setCommerceCommonI18NService(CommerceCommonI18NService commerceCommonI18NService)
protected BeanFactory getBeanFactory()
public BaseSiteService getBaseSiteService()
public void setBaseSiteService(BaseSiteService baseSiteService)
protected NewItemService getNewItemService()
public void setNewItemService(NewItemService newItemService)
public void setBeanFactory(BeanFactory beanFactory)
throws BeansException
BeansExceptionpublic void dispatchEvent(java.lang.String context,
java.lang.Object source,
java.util.Map<java.lang.String,java.lang.Object> data)
WidgetControllerdispatchEvent in interface WidgetControllerdispatchEvent in class AbstractWidgetControllercontext - event contextsource - event sourcedata - parameters to be be passed to registered listenerspublic TypedObject getCurrentCustomer()
CallContextControllergetCurrentCustomer in interface CallContextControllergetCurrentCustomer in interface CustomerControllerpublic TypedObject getAnonymousCustomer()
CallContextControllergetAnonymousCustomer in interface CallContextControllerpublic boolean isAnonymousCustomer(TypedObject customer)
CallContextControllerisAnonymousCustomer in interface CallContextControllercustomer - the customer to testpublic java.lang.String getAnonymousCartCode()
CallContextControllergetAnonymousCartCode in interface CallContextControllerpublic void setAnonymousCartCode(java.lang.String anonymousCartCode)
CallContextControllersetAnonymousCartCode in interface CallContextControlleranonymousCartCode - the cart codeprotected void transferAnonymousCartToCustomer(TypedObject customer)
public boolean setCurrentCustomer(TypedObject customer)
CallContextControllersetCurrentCustomer in interface CallContextControllercustomer - the new customerprotected void clearCurrentCustomer()
public boolean setDefaultShipmentAddress(TypedObject address)
CustomerControllersetDefaultShipmentAddress in interface CustomerControlleraddress - The address to set as the default shipment addresspublic TypedObject getCurrentOrder()
CallContextControllergetCurrentOrder in interface CallContextControllerpublic boolean setCurrentOrder(TypedObject order)
CallContextControllersetCurrentOrder in interface CallContextControllerorder - the orderprotected void clearCurrentOrder()
public TypedObject getCurrentTicket()
CallContextControllergetCurrentTicket in interface CallContextControllerpublic boolean setCurrentTicket(TypedObject ticket)
CallContextControllersetCurrentTicket in interface CallContextControllerticket - the ticketprotected void clearCurrentTicket()
public void removeCustomerAddress(TypedObject address)
CustomerControllerremoveCustomerAddress in interface CustomerControlleraddress - The address to deletepublic java.util.List<TypedObject> getCustomerOrders()
CustomerControllergetCustomerOrders in interface CustomerControllerpublic java.util.List<TypedObject> getTokenisedCreditCards()
CustomerControllergetTokenisedCreditCards in interface CustomerControllerprotected java.util.List<CreditCardPaymentInfoModel> filterOutInvalidTokenisedCreditCards(java.util.List<CreditCardPaymentInfoModel> savedCards)
public java.util.List<TypedObject> getCustomerTickets()
CustomerControllergetCustomerTickets in interface CustomerControllerpublic CommentTypeModel getTicketType(java.lang.String ticketType)
public java.util.List<TypedObject> getCustomerAddresses()
CustomerControllergetCustomerAddresses in interface CustomerControllerpublic <R,T extends java.lang.Throwable> R executeInContext(ImpersonationService.Executor<R,T> wrapper) throws T extends java.lang.Throwable
CallContextControllerexecuteInContext in interface CallContextControllerwrapper - The code to execute in that contextT - The exceptionT extends java.lang.Throwablepublic java.util.List<TypedObject> getAvailableCurrencies()
CallContextControllergetAvailableCurrencies in interface CallContextControllerprotected CustomerModel getCurrentCustomerModelOrAnonymousModel()
@Deprecated protected Customer getCurrentCustomerOrAnonymous()
protected boolean isAnonymousCustomerCart(TypedObject cartObject)
protected boolean compare(java.lang.Object instance1,
java.lang.Object instance2)
public boolean endCall()
CallContextControllerendCall in interface CallContextControllerprotected boolean hasProperCurrency()
public TypedObject getCallContextCurrency()
CallContextControllergetCallContextCurrency in interface CallContextControllerpublic boolean setCallContextCurrency(TypedObject currency)
CallContextControllersetCallContextCurrency in interface CallContextControllercurrency - the currencyprotected void clearCallContextCurrency()
public TypedObject createNewCustomerAddress(ObjectValueContainer addressContainer, java.lang.String addressTypeCode) throws ValueHandlerException
CustomerControllercreateNewCustomerAddress in interface CustomerControlleraddressContainer - The value containeraddressTypeCode - The object template type codeValueHandlerException - If the address cannot be createdpublic java.util.List<TypedObject> getAvailableSites()
getAvailableSites in interface CallContextControllerprotected boolean isValidSite(BaseSiteModel baseSite)
protected void initialiseCurrentSite()
public TypedObject getCurrentSite()
getCurrentSite in interface CallContextControllerpublic boolean setCurrentSite(TypedObject baseSite)
setCurrentSite in interface CallContextControllerprotected CurrencyModel getSiteDefaultCurrency()
protected PropertyDescriptor getPropertyDescriptor(java.util.Set<PropertyDescriptor> properties, java.lang.String qualifier)
protected void setImpersonationContextChanged()
protected boolean isImpersonationContextChanged()
protected void clearImpersonationContextChanged()
public void afterPropertiesSet()
throws java.lang.Exception
java.lang.Exceptionprotected java.util.Collection<AbstractCallContextDependantController> getDependantControllers()
Copyright © 2018 SAP SE. All Rights Reserved.