Class AccountUserDetailsBuilder

java.lang.Object
com.avoka.tm.security.AccountUserDetailsBuilder

public class AccountUserDetailsBuilder extends Object

Provide a Builder for the Account User Details Vo.

Examples


 import com.avoka.tm.security.*;
 import com.avoka.tm.vo.*;

 import java.util.HashSet;
 import java.util.Set;

 Set<String> authorities = new HashSet<>();
 authorities.add(GROUP_NAME);

 AccountUserDetailsVo accountUserDetailsVo = new AccountUserDetailsBuilder()
                                                 .setUser(user)
                                                 .setGrantedAuthorities(authorities)
                                                 .build(); 
Since:
19.11.0
  • Constructor Details

    • AccountUserDetailsBuilder

      public AccountUserDetailsBuilder()
  • Method Details

    • setUser

      public AccountUserDetailsBuilder setUser(User user)
      Set the User.
      Parameters:
      user - the user (required)
      Returns:
      this builder
    • setGrantedAuthorities

      public AccountUserDetailsBuilder setGrantedAuthorities(Set<String> authorities)
      Set the list of Granted Authorities.
      Parameters:
      authorities - set of granted authorities
      Returns:
      this builder
    • build

      public AccountUserDetails build()
      Create an AccountUserDetails VO
      Returns:
      An AccountUserDetailsVo