gedi-geode-extensions-spring/gedi-geode-spring-security/src/main/java/gedi/solutions/geode/spring/security/data/RegistrationDTO.java
public UserProfileDetails toUserDetails(Collection<String> authorities)
	{
		if (this.userName == null || this.userName.length() == 0)
			throw new IllegalArgumentException("userName is required");
		
		if (password == null || password.length == 0)
			throw new IllegalArgumentException("Password is required");
		
		if (authorities == null || authorities.isEmpty())
			throw new IllegalArgumentException("authorities is required");
		
		Collection<GrantedAuthority> grantAuthorities = authorities.stream()
		.map(a -> new SimpleGrantedAuthority(a)).collect(Collectors.toSet());
		
		UserProfileDetails user = new UserProfileDetails(this.userName,String.valueOf(password),
		grantAuthorities);
		
		user.setEmail(email);
		user.setFirstName(firstName);
		user.setLastName(lastName);
		return user;
	}
public UserProfileDetails toUserDetails(Collection<String> authorities)
	{
		if (this.userName == null || this.userName.length() == 0)
			throw new IllegalArgumentException("userName is required");
		
		if (password == null || password.length == 0)
			throw new IllegalArgumentException("Password is required");
		
		if (authorities == null || authorities.isEmpty())
			throw new IllegalArgumentException("authorities is required");
		
		Collection<GrantedAuthority> grantAuthorities = authorities.stream()
		.map(a -> new SimpleGrantedAuthority(a)).collect(Collectors.toSet());
		
		UserProfileDetails user = new UserProfileDetails(this.userName,String.valueOf(password),
		grantAuthorities);
		
		user.setEmail(email);
		user.setFirstName(firstName);
		user.setLastName(lastName);
		return user;
	}
public UserProfileDetails toUserDetails ( Collection < String > authorities ) { if ( this . userName == null || this . userName . length ( ) == 0 ) throw new IllegalArgumentException ( "userName is required" ) ; if ( password == null || password . length == 0 ) throw new IllegalArgumentException ( "Password is required" ) ; if ( authorities == null || authorities . isEmpty ( ) ) throw new IllegalArgumentException ( "authorities is required" ) ; Collection < GrantedAuthority > grantAuthorities = authorities . stream ( ) . map ( a -> new SimpleGrantedAuthority ( a ) ) . collect ( Collectors . toSet ( ) ) ; UserProfileDetails user = new UserProfileDetails ( this . userName , String . valueOf ( password ) , grantAuthorities ) ; user . setEmail ( email ) ; user . setFirstName ( firstName ) ; user . setLastName ( lastName ) ; return user ; }
------------------------------------------------
------------------------------------------------