Class DefaultB2BUserGroupProvider

java.lang.Object
de.hybris.platform.travelacceleratorstorefront.security.impl.DefaultB2BUserGroupProvider
All Implemented Interfaces:
B2BUserGroupProvider

public class DefaultB2BUserGroupProvider extends Object implements B2BUserGroupProvider
Default provider for B2b User group.
  • Constructor Details

    • DefaultB2BUserGroupProvider

      public DefaultB2BUserGroupProvider()
  • Method Details

    • getAllowedUserGroup

      public Set<String> getAllowedUserGroup()
      Specified by:
      getAllowedUserGroup in interface B2BUserGroupProvider
      Returns:
      authorized user groups
    • isCurrentUserAuthorized

      public boolean isCurrentUserAuthorized()
      Description copied from interface: B2BUserGroupProvider
      Checks if current user belongs to at least one group that is authorized.
      Specified by:
      isCurrentUserAuthorized in interface B2BUserGroupProvider
      Returns:
      true if current user is authorized.
    • isUserAuthorized

      public boolean isUserAuthorized(UserModel user)
      Description copied from interface: B2BUserGroupProvider
      Checks if given user belongs to at least one group that is authorized.
      Specified by:
      isUserAuthorized in interface B2BUserGroupProvider
      Parameters:
      user - to verify
      Returns:
      true if current user is authorized.
    • isUserAuthorized

      public boolean isUserAuthorized(String loginName)
      Description copied from interface: B2BUserGroupProvider
      Checks if given user belongs to at least one group that is authorized.
      Specified by:
      isUserAuthorized in interface B2BUserGroupProvider
      Parameters:
      loginName - (the user UID) to verify
      Returns:
      true if current user is authorized.
    • isUserEnabled

      public boolean isUserEnabled(String userId)
      Specified by:
      isUserEnabled in interface B2BUserGroupProvider
      Parameters:
      userId - the user UID
      Returns:
      true if user is active.
    • checkIfUserAuthorized

      protected boolean checkIfUserAuthorized(UserModel user)
    • isCurrentUserAuthorizedToCheckOut

      public boolean isCurrentUserAuthorizedToCheckOut()
      Description copied from interface: B2BUserGroupProvider
      Checks if current user belongs to at least one group that is authorized to checkout.
      Specified by:
      isCurrentUserAuthorizedToCheckOut in interface B2BUserGroupProvider
      Returns:
      true if current user is authorized.
    • isUserAuthorizedToCheckOut

      public boolean isUserAuthorizedToCheckOut(UserModel user)
      Description copied from interface: B2BUserGroupProvider
      Checks if given user belongs to at least one group that is authorized to checkout.
      Specified by:
      isUserAuthorizedToCheckOut in interface B2BUserGroupProvider
      Parameters:
      user - to verify
      Returns:
      true if current user is authorized.
    • isUserAuthorizedToCheckOut

      public boolean isUserAuthorizedToCheckOut(String loginName)
      Description copied from interface: B2BUserGroupProvider
      Checks if given user belongs to at least one group that is authorized to checkout.
      Specified by:
      isUserAuthorizedToCheckOut in interface B2BUserGroupProvider
      Parameters:
      loginName - (the user UID) to verify
      Returns:
      true if current user is authorized.
    • checkIfUserAuthorizedToCheckOut

      protected boolean checkIfUserAuthorizedToCheckOut(UserModel user)
    • getAuthorizedGroupsToCheckOut

      public Set<String> getAuthorizedGroupsToCheckOut()
    • setAuthorizedGroupsToCheckOut

      public void setAuthorizedGroupsToCheckOut(Set<String> authorizedGroupsToCheckOut)
    • getUserService

      protected de.hybris.platform.servicelayer.user.UserService getUserService()
    • setUserService

      public void setUserService(de.hybris.platform.servicelayer.user.UserService userService)
    • getAuthorizedGroups

      protected Set<String> getAuthorizedGroups()
    • setAuthorizedGroups

      public void setAuthorizedGroups(Set<String> authorizedGroups)
    • getB2BCustomerService

      public de.hybris.platform.b2b.services.B2BCustomerService<B2BCustomerModel,B2BUnitModel> getB2BCustomerService()
    • setB2BCustomerService

      public void setB2BCustomerService(de.hybris.platform.b2b.services.B2BCustomerService<B2BCustomerModel,B2BUnitModel> b2bCustomerService)