Package com.avoka.tm.security
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
authorities = new HashSet<>(); authorities.add(GROUP_NAME); AccountUserDetailsVo accountUserDetailsVo = new AccountUserDetailsBuilder() .setUser(user) .setGrantedAuthorities(authorities) .build(); - Since:
- 19.11.0
-
-
Constructor Summary
Constructors Constructor Description AccountUserDetailsBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountUserDetails
build()
Create an AccountUserDetails VOAccountUserDetailsBuilder
setGrantedAuthorities(Set<String> authorities)
Set the list of Granted Authorities.AccountUserDetailsBuilder
setUser(User user)
Set the User.
-
-
-
Method Detail
-
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
-
-