public class SystemPrincipal extends Object implements NuxeoPrincipal
PREFIX| Constructor and Description |
|---|
SystemPrincipal(String origUserName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
List<String> |
getAllGroups()
Gets the groups this principal directly or undirectly is member of.
|
String |
getCompany()
Gets the company name of this principal.
|
String |
getEmail()
Get the user email if any.
|
String |
getFirstName()
Gets the first name of this principal.
|
List<String> |
getGroups()
Gets the groups this principal is directly member of.
|
String |
getLastName()
Gets the last name of this principal.
|
DocumentModel |
getModel() |
String |
getName() |
String |
getOriginatingUser() |
String |
getPassword()
Gets the password of this principal.
|
String |
getPrincipalId()
Returns a generated id that is unique for each principal instance.
|
List<String> |
getRoles()
Gets the roles for this principal.
|
int |
hashCode() |
boolean |
isAdministrator()
Returns true if the principal is an administrator.
|
boolean |
isAnonymous()
Checks if the principal is anonymous (guest user).
|
boolean |
isMemberOf(String group)
Recursively test if the user is member of this group.
|
void |
setCompany(String company) |
void |
setEmail(String email) |
void |
setFirstName(String firstName) |
void |
setGroups(List<String> groups) |
void |
setLastName(String lastName) |
void |
setModel(DocumentModel model) |
void |
setName(String userName) |
void |
setOriginatingUser(String originatingUser) |
void |
setPassword(String password) |
void |
setPrincipalId(String principalId)
Sets the principalId.
|
void |
setRoles(List<String> roles) |
String |
toString() |
public SystemPrincipal(String origUserName)
public boolean equals(Object other)
public int hashCode()
public String getCompany()
NuxeoPrincipalgetCompany in interface NuxeoPrincipalpublic String getEmail()
NuxeoPrincipalgetEmail in interface NuxeoPrincipalpublic void setEmail(String email)
setEmail in interface NuxeoPrincipalpublic String getFirstName()
NuxeoPrincipalgetFirstName in interface NuxeoPrincipalpublic String getLastName()
NuxeoPrincipalgetLastName in interface NuxeoPrincipalpublic List<String> getGroups()
NuxeoPrincipalgetGroups in interface NuxeoPrincipalpublic List<String> getAllGroups()
NuxeoPrincipalgetAllGroups in interface NuxeoPrincipalpublic List<String> getRoles()
NuxeoPrincipalgetRoles in interface NuxeoPrincipalpublic String getPassword()
NuxeoPrincipalNote: Some APIs that return principals from the database intentionally do not fill this field
getPassword in interface NuxeoPrincipalpublic String getPrincipalId()
NuxeoPrincipalgetPrincipalId in interface NuxeoPrincipalpublic String getOriginatingUser()
getOriginatingUser in interface NuxeoPrincipalpublic void setOriginatingUser(String originatingUser)
setOriginatingUser in interface NuxeoPrincipalpublic DocumentModel getModel()
getModel in interface NuxeoPrincipalpublic void setCompany(String company)
setCompany in interface NuxeoPrincipalpublic void setFirstName(String firstName)
setFirstName in interface NuxeoPrincipalpublic void setLastName(String lastName)
setLastName in interface NuxeoPrincipalpublic void setName(String userName)
setName in interface NuxeoPrincipalpublic void setGroups(List<String> groups)
setGroups in interface NuxeoPrincipalpublic void setRoles(List<String> roles)
setRoles in interface NuxeoPrincipalpublic void setPassword(String password)
setPassword in interface NuxeoPrincipalpublic void setPrincipalId(String principalId)
NuxeoPrincipalsetPrincipalId in interface NuxeoPrincipalprincipalId - a new principalId for this instancepublic void setModel(DocumentModel model)
setModel in interface NuxeoPrincipalpublic boolean isMemberOf(String group)
NuxeoPrincipalisMemberOf in interface NuxeoPrincipalgroup - The name of the grouppublic String toString()
public boolean isAdministrator()
NuxeoPrincipalSecurity checks still apply on the repository for administrator user. If user is a system user, this method will return true.
isAdministrator in interface NuxeoPrincipalpublic boolean isAnonymous()
NuxeoPrincipalisAnonymous in interface NuxeoPrincipalCopyright © 2011 Nuxeo SA. All Rights Reserved.