public class DefaultPrincipal extends Object implements Principal
Constructor and Description |
---|
DefaultPrincipal(String principalId,
Set<Authorization> authorizations,
Map<String,PrincipalAttribute> attributes) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
io.vavr.control.Try<PrincipalAttribute> |
getAttribute(String attributeName)
Returns the attribute specified by the given name, wrapped in a
Try . |
Map<String,PrincipalAttribute> |
getAttributes() |
Set<Authorization> |
getAuthorizations()
The authorizations this Principal has.
|
String |
getPrincipalId()
The identifier for this Principal.
|
int |
hashCode() |
String |
toString() |
public DefaultPrincipal(@Nonnull String principalId, @Nonnull Set<Authorization> authorizations, @Nonnull Map<String,PrincipalAttribute> attributes)
@Nonnull public Set<Authorization> getAuthorizations()
getAuthorizations
in interface Principal
Set
with the authentications.@Nonnull public io.vavr.control.Try<PrincipalAttribute> getAttribute(@Nonnull String attributeName)
Try
.getAttribute
in interface Principal
attributeName
- The name of the attribute to get.@Nonnull public Map<String,PrincipalAttribute> getAttributes()
protected boolean canEqual(Object other)
@Nonnull public String getPrincipalId()
getPrincipalId
in interface Principal
Copyright © 2019 SAP SE. All rights reserved.