Class DefaultSapQualtricsConfigurationFacade
- java.lang.Object
-
- de.hybris.platform.sapqualtricsaddon.webfacades.impl.DefaultSapQualtricsConfigurationFacade
-
- All Implemented Interfaces:
SapQualtricsConfigurationFacade
public class DefaultSapQualtricsConfigurationFacade extends java.lang.Object implements SapQualtricsConfigurationFacade
Default implementation forSapQualtricsConfigurationFacade.
-
-
Constructor Summary
Constructors Constructor Description DefaultSapQualtricsConfigurationFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<SapQualtricsConfigurationData>getQualtricsConfiguration()Get all theConsumedDestinationModelwithDestinationTargetModelid qualtricsDestinationTarget , formats it to fit into qualtrics javascript template.protected java.lang.StringgetQualtricsSiteInterceptContentId(java.lang.String projectId)protected java.lang.StringgetQualtricsSiteInterceptProjectId(java.lang.String projectId)protected java.lang.StringgetQualtricsSiteInterceptProjectUrl(java.lang.String projectId, java.lang.String brandId)booleanisLoggedInCustomerConsentGiven()Check if the logged in customer has given consent for sending Qualtrics feedback surveys.voidsetBaseSiteService(de.hybris.platform.site.BaseSiteService baseSiteService)voidsetCommerceConsentService(de.hybris.platform.commerceservices.consent.CommerceConsentService commerceConsentService)voidsetDestinationService(de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel> destinationService)voidsetUserService(de.hybris.platform.servicelayer.user.UserService userService)
-
-
-
Method Detail
-
getQualtricsConfiguration
public java.util.List<SapQualtricsConfigurationData> getQualtricsConfiguration()
Get all theConsumedDestinationModelwithDestinationTargetModelid qualtricsDestinationTarget , formats it to fit into qualtrics javascript template. Reads all theConsumedDestinationwithDestinationTargetid 'qualtricsDestinationTarget'. Multiple such configurations are can be handled. If projectId or brandId is missing, the method throwsIllegalArgumentException.- Specified by:
getQualtricsConfigurationin interfaceSapQualtricsConfigurationFacade- Returns:
Listlist of qualtrics configurations with content ID, project ID and project URL
-
isLoggedInCustomerConsentGiven
public boolean isLoggedInCustomerConsentGiven()
Check if the logged in customer has given consent for sending Qualtrics feedback surveys. If there is no consent given by the customer or if the customer has withdrawn the consent, return false. If there is an active consent available for the logged in customer, return true.- Specified by:
isLoggedInCustomerConsentGivenin interfaceSapQualtricsConfigurationFacade- Returns:
- logged in customer consent status
-
getQualtricsSiteInterceptContentId
protected java.lang.String getQualtricsSiteInterceptContentId(java.lang.String projectId)
- Parameters:
projectId- Project ID- Returns:
- Qualtrics ContentID for the page
-
getQualtricsSiteInterceptProjectId
protected java.lang.String getQualtricsSiteInterceptProjectId(java.lang.String projectId)
- Parameters:
projectId- Project ID- Returns:
- Formatted project ID
-
getQualtricsSiteInterceptProjectUrl
protected java.lang.String getQualtricsSiteInterceptProjectUrl(java.lang.String projectId, java.lang.String brandId)- Parameters:
projectId- project IDbrandId- brand ID- Returns:
- project URL for Qualtrrics App/Website Feedback project
-
setCommerceConsentService
public void setCommerceConsentService(de.hybris.platform.commerceservices.consent.CommerceConsentService commerceConsentService)
- Parameters:
commerceConsentService- the commerceConsentService to set
-
setUserService
public void setUserService(de.hybris.platform.servicelayer.user.UserService userService)
- Parameters:
userService- the userService to set
-
setBaseSiteService
public void setBaseSiteService(de.hybris.platform.site.BaseSiteService baseSiteService)
- Parameters:
baseSiteService- the baseSiteService to set
-
setDestinationService
public void setDestinationService(de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel> destinationService)
- Parameters:
destinationService- the destinationService to set
-
-