public class ScpNeoUserFacade extends Object implements UserFacade
Constructor and Description |
---|
ScpNeoUserFacade() |
Modifier and Type | Method and Description |
---|---|
User |
getCurrentUser()
Returns the current
User . |
com.google.common.base.Optional<User> |
getUserByName(String name)
Returns the current
User by its name, if it exists. |
ScpNeoUser |
lookupCurrentUser()
Retrieves the current user via the
UserProvider . |
public ScpNeoUser lookupCurrentUser() throws UserNotAuthenticatedException, UserAccessException
UserProvider
.UserNotAuthenticatedException
- If the current is user not authenticated.UserAccessException
- If there is an issue while retrieving the user.public User getCurrentUser() throws UserNotAuthenticatedException, UserAccessException
User
.getCurrentUser
in interface UserFacade
UserNotAuthenticatedException
- If the current User
is not authenticated.UserAccessException
- If there is an issue while accessing the User
.public com.google.common.base.Optional<User> getUserByName(@Nullable String name) throws UserNotAuthenticatedException, UserAccessException
User
by its name, if it exists.getUserByName
in interface UserFacade
name
- The name of the user to find.UserAccessException
- If there is an issue while accessing the User
.UserNotAuthenticatedException
Copyright © 2018 SAP SE. All rights reserved.