|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.usermanager.NuxeoPrincipalImpl
public class NuxeoPrincipalImpl
Field Summary | |
---|---|
List<String> |
allGroups
|
DataModel |
dataModel
|
boolean |
isAdministrator
|
boolean |
isAnonymous
|
DocumentModel |
model
|
String |
origUserName
|
String |
principalId
|
List<String> |
roles
|
List<String> |
virtualGroups
|
Fields inherited from interface org.nuxeo.ecm.core.api.NuxeoPrincipal |
---|
PREFIX |
Constructor Summary | |
---|---|
NuxeoPrincipalImpl(String name)
Constructor that sets principal to not anonymous, not administrator, and updates all the principal groups. |
|
NuxeoPrincipalImpl(String name,
boolean isAnonymous)
Constructor that sets principal to not administrator, and updates all the principal groups. |
|
NuxeoPrincipalImpl(String name,
boolean isAnonymous,
boolean isAdministrator)
Constructor that updates all the principal groups. |
|
NuxeoPrincipalImpl(String name,
boolean isAnonymous,
boolean isAdministrator,
boolean updateAllGroups)
|
Method Summary | |
---|---|
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. |
UserConfig |
getConfig()
|
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()
Deprecated. |
List<String> |
getVirtualGroups()
|
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 |
setConfig(UserConfig config)
|
void |
setEmail(String email)
|
void |
setFirstName(String firstName)
|
void |
setGroups(List<String> groups)
|
void |
setLastName(String lastName)
|
void |
setModel(DocumentModel model)
|
void |
setModel(DocumentModel model,
boolean updateAllGroups)
Sets model and recomputes all groups. |
void |
setName(String name)
|
void |
setOriginatingUser(String originatingUser)
|
void |
setPassword(String password)
|
void |
setPrincipalId(String principalId)
Sets the principalId. |
void |
setRoles(List<String> roles)
|
void |
setVirtualGroups(List<String> virtualGroups)
Sets virtual groups and recomputes all groups. |
void |
setVirtualGroups(List<String> virtualGroups,
boolean updateAllGroups)
|
String |
toString()
|
void |
updateAllGroups()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final List<String> roles
public List<String> virtualGroups
public List<String> allGroups
public final boolean isAnonymous
public boolean isAdministrator
public String principalId
public DocumentModel model
public DataModel dataModel
public String origUserName
Constructor Detail |
---|
public NuxeoPrincipalImpl(String name) throws ClientException
ClientException
public NuxeoPrincipalImpl(String name, boolean isAnonymous) throws ClientException
ClientException
public NuxeoPrincipalImpl(String name, boolean isAnonymous, boolean isAdministrator) throws ClientException
ClientException
public NuxeoPrincipalImpl(String name, boolean isAnonymous, boolean isAdministrator, boolean updateAllGroups) throws ClientException
ClientException
Method Detail |
---|
public void setConfig(UserConfig config)
public UserConfig getConfig()
public String getCompany()
NuxeoPrincipal
getCompany
in interface NuxeoPrincipal
public void setCompany(String company)
setCompany
in interface NuxeoPrincipal
public String getFirstName()
NuxeoPrincipal
getFirstName
in interface NuxeoPrincipal
public void setFirstName(String firstName)
setFirstName
in interface NuxeoPrincipal
public String getLastName()
NuxeoPrincipal
getLastName
in interface NuxeoPrincipal
public void setLastName(String lastName)
setLastName
in interface NuxeoPrincipal
public void setName(String name)
setName
in interface NuxeoPrincipal
public void setRoles(List<String> roles)
setRoles
in interface NuxeoPrincipal
public void setGroups(List<String> groups)
setGroups
in interface NuxeoPrincipal
public String getName()
getName
in interface Principal
public List<String> getGroups()
NuxeoPrincipal
getGroups
in interface NuxeoPrincipal
@Deprecated public List<String> getRoles()
NuxeoPrincipal
getRoles
in interface NuxeoPrincipal
public void setPassword(String password)
setPassword
in interface NuxeoPrincipal
public String getPassword()
NuxeoPrincipal
Note: Some APIs that return principals from the database intentionally do not fill this field
getPassword
in interface NuxeoPrincipal
public String toString()
toString
in interface Principal
toString
in class Object
public String getPrincipalId()
NuxeoPrincipal
getPrincipalId
in interface NuxeoPrincipal
public void setPrincipalId(String principalId)
NuxeoPrincipal
setPrincipalId
in interface NuxeoPrincipal
principalId
- a new principalId for this instancepublic String getEmail()
NuxeoPrincipal
getEmail
in interface NuxeoPrincipal
public void setEmail(String email)
setEmail
in interface NuxeoPrincipal
public DocumentModel getModel()
getModel
in interface NuxeoPrincipal
public void setModel(DocumentModel model, boolean updateAllGroups) throws ClientException
ClientException
public void setModel(DocumentModel model) throws ClientException
setModel
in interface NuxeoPrincipal
ClientException
public boolean isMemberOf(String group)
NuxeoPrincipal
isMemberOf
in interface NuxeoPrincipal
group
- The name of the grouppublic List<String> getAllGroups()
NuxeoPrincipal
getAllGroups
in interface NuxeoPrincipal
public void updateAllGroups() throws ClientException
ClientException
public List<String> getVirtualGroups()
public void setVirtualGroups(List<String> virtualGroups, boolean updateAllGroups) throws ClientException
ClientException
public void setVirtualGroups(List<String> virtualGroups) throws ClientException
ClientException
public boolean isAdministrator()
NuxeoPrincipal
Security checks still apply on the repository for administrator user. If user is a system user, this method will return true.
isAdministrator
in interface NuxeoPrincipal
public boolean isAnonymous()
NuxeoPrincipal
isAnonymous
in interface NuxeoPrincipal
public boolean equals(Object other)
equals
in interface Principal
equals
in class Object
public int hashCode()
hashCode
in interface Principal
hashCode
in class Object
public String getOriginatingUser()
getOriginatingUser
in interface NuxeoPrincipal
public void setOriginatingUser(String originatingUser)
setOriginatingUser
in interface NuxeoPrincipal
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |