public class PlatformIdentityInfoUtil extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends PlatformIdentityInfo> |
findIdentityInfo(String name,
Collection<T> identityInfo) |
static Optional<PlatformIdentityInfo> |
findInfo(String name,
Collection<PlatformIdentityInfo> identityInfo)
Find the identity info with the given nave
|
static PlatformUserEntity |
findPlatformUserById(String userId,
CommandContext commandContext) |
static PlatformUserEntity |
findPlatformUserByIdNoCache(String userId,
CommandContext commandContext) |
static <T> Optional<T> |
findValue(String name,
Class<T> clazz,
Collection<PlatformIdentityInfo> identityInfo)
Find the value with the given name within the provided
identityInfo . |
public static PlatformUserEntity findPlatformUserById(String userId, CommandContext commandContext)
public static PlatformUserEntity findPlatformUserByIdNoCache(String userId, CommandContext commandContext)
public static <T extends PlatformIdentityInfo> Optional<T> findIdentityInfo(String name, Collection<T> identityInfo)
public static <T> Optional<T> findValue(String name, Class<T> clazz, Collection<PlatformIdentityInfo> identityInfo)
identityInfo
.T
- the type of the valuename
- the name of the info that needs to be foundclazz
- the expected type of the valueidentityInfo
- the collection of identity info in which the lookup needs to be doneOptional.empty()
of none existspublic static Optional<PlatformIdentityInfo> findInfo(String name, Collection<PlatformIdentityInfo> identityInfo)
name
- the name of the info that needs to be foundidentityInfo
- the collection of the information in which it needs to be looked intoOptional.empty()
if no such info exists