Package com.hybris.ymkt.common.user
Class UserContextService
java.lang.Object
com.hybris.ymkt.common.user.UserContextService
Provide utility methods such as
getUserOrigin() and getUserId().-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected de.hybris.platform.servicelayer.user.UserServiceprotected YmktConsentService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringID Origin is a synonym of User Type.booleanbooleanChecks user consent for personalization consent template.protected booleanisPiwikCookie(javax.servlet.http.Cookie c) voidsetAnonymousUserOrigin(String anonymousUserOrigin) voidsetUserService(de.hybris.platform.servicelayer.user.UserService userService) voidsetYmktConsentService(YmktConsentService ymktConsentService)
-
Field Details
-
anonymousUserOrigin
-
userService
protected de.hybris.platform.servicelayer.user.UserService userService -
ymktConsentService
-
-
Constructor Details
-
UserContextService
public UserContextService()
-
-
Method Details
-
getOriginIdSapHybrisConsumer
- Returns:
SAP_HYBRIS_CONSUMERor the property value ofsapymktcommon.user.origin.SAP_HYBRIS_CONSUMER.
-
getOriginIdIncognito
- Returns:
ANONYMOUSor the property value ofsapymktcommon.user.origin.incognito.
-
getAnonymousUserId
-
getAnonymousUserOrigin
-
getLoggedInUserOrigin
-
getUserId
- Returns:
- User ID according to the
getUserOrigin()if user consent is provided. Otherwise return empty string.
-
getUserOrigin
ID Origin is a synonym of User Type.- Returns:
- COOKIE_ID or SAP_HYBRIS_CONSUMER
-
isAnonymousUser
public boolean isAnonymousUser() -
isIncognitoUser
public boolean isIncognitoUser()Checks user consent for personalization consent template. When true, Marketing considers the user 'incognito'.- Returns:
- boolean true when user consent is not given
-
isPiwikCookie
protected boolean isPiwikCookie(javax.servlet.http.Cookie c) -
setAnonymousUserOrigin
-
setUserService
public void setUserService(de.hybris.platform.servicelayer.user.UserService userService) -
setYmktConsentService
-