public class UserInformation extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static UserInformation |
ANONYMOUS |
| Constructor and Description |
|---|
UserInformation(String name) |
UserInformation(String name,
Collection<String> roles) |
UserInformation(String name,
String[] roles) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static UserInformation |
fromPrincipal(Principal principal)
Create a user information object
|
String |
getName()
Get the name of the user
|
Set<String> |
getRoles() |
boolean |
hasAllRoles(Collection<String> roles) |
boolean |
hasAllRoles(String[] roles) |
boolean |
hasAnyRole(Collection<String> roles) |
boolean |
hasAnyRole(String[] roles) |
int |
hashCode() |
boolean |
hasRole(String role) |
boolean |
isAnonymous() |
String |
toString() |
public static final UserInformation ANONYMOUS
public UserInformation(String name)
public UserInformation(String name, Collection<String> roles)
public static UserInformation fromPrincipal(Principal principal)
principal - ANONYMOUS if principal was null. Never
returns null.public boolean isAnonymous()
public String getName()
null if it an anonymous user
informationpublic boolean hasRole(String role)
public boolean hasAllRoles(String[] roles)
public boolean hasAllRoles(Collection<String> roles)
public boolean hasAnyRole(String[] roles)
public boolean hasAnyRole(Collection<String> roles)
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.