|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NuxeoPrincipal
Class to represent a principal in Nuxeo. This class holds the list of roles and groups for this principal.
Field Summary | |
---|---|
static String |
PREFIX
|
Method Summary | |
---|---|
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 |
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. |
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 name)
|
void |
setOriginatingUser(String originatingUser)
|
void |
setPassword(String password)
|
void |
setPrincipalId(String principalId)
Sets the principalId. |
void |
setRoles(List<String> roles)
|
Methods inherited from interface java.security.Principal |
---|
equals, getName, hashCode, toString |
Field Detail |
---|
static final String PREFIX
Method Detail |
---|
String getFirstName()
String getLastName()
String getPassword()
Note: Some APIs that return principals from the database intentionally do not fill this field
String getCompany()
String getEmail()
List<String> getGroups()
List<String> getAllGroups()
boolean isMemberOf(String group)
group
- The name of the groupList<String> getRoles()
void setName(String name)
void setFirstName(String firstName)
void setLastName(String lastName)
void setGroups(List<String> groups)
void setRoles(List<String> roles)
void setCompany(String company)
void setPassword(String password)
void setEmail(String email)
String getPrincipalId()
void setPrincipalId(String principalId)
principalId
- a new principalId for this instanceDocumentModel getModel()
void setModel(DocumentModel model) throws ClientException
ClientException
boolean isAdministrator()
Security checks still apply on the repository for administrator user. If user is a system user, this method will return true.
boolean isAnonymous()
String getOriginatingUser()
void setOriginatingUser(String originatingUser)
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |