public abstract class AbstractUser extends Object implements User
Constructor and Description |
---|
AbstractUser(String name,
Locale locale,
Set<Authorization> authorizations,
Map<String,UserAttribute> attributes) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
Optional<UserAttribute> |
getAttribute(String name)
Returns the attribute specified by the given name, wrapped in an
Optional . |
Map<String,UserAttribute> |
getAttributes() |
Set<Authorization> |
getAuthorizations()
A set containing all authorizations the user has.
|
Optional<Locale> |
getLocale() |
String |
getName() |
boolean |
hasAuthorization(Authorization authorization)
Checks whether the user has the given authorization.
|
int |
hashCode() |
String |
toString() |
public boolean hasAuthorization(@Nonnull Authorization authorization)
hasAuthorization
in interface User
authorization
- The authorization the user should have.@Nonnull public Set<Authorization> getAuthorizations()
getAuthorizations
in interface User
@Nonnull public Optional<UserAttribute> getAttribute(@Nonnull String name)
Optional
.getAttribute
in interface User
name
- The name of the attribute to get.@Nonnull public Map<String,UserAttribute> getAttributes()
protected boolean canEqual(Object other)
Copyright © 2018 SAP SE. All rights reserved.