public final class User extends Object implements SessionUser
Constructor and Description |
---|
User(String userName,
String ticket,
org.alfresco.service.cmr.repository.NodeRef person)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getCompanyRootId() |
String |
getFullName(org.alfresco.service.cmr.repository.NodeService service)
Return the full name of the Person this User represents
|
static String |
getFullName(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef user)
Returns the full name of the user represented by the given NodeRef
|
static String |
getFullNameAndUserId(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef user)
Returns the full name of the user plus their userid in the form [id]
|
String |
getHomeSpaceId() |
org.alfresco.service.cmr.repository.NodeRef |
getPerson() |
String |
getTicket()
Return the ticket
|
String |
getUserName()
Return the user name
|
boolean |
isAdmin() |
void |
reset()
Forces a clear of any cached or calcluated values
|
void |
setCompanyRootId(String companyRootId) |
void |
setHomeSpaceId(String homeSpaceId) |
String |
toString() |
public void reset()
public String getUserName()
SessionUser
getUserName
in interface SessionUser
public String getFullName(org.alfresco.service.cmr.repository.NodeService service)
service
- NodeService to usepublic String getHomeSpaceId()
public void setHomeSpaceId(String homeSpaceId)
homeSpaceId
- Sets the id of the users home spacepublic String getCompanyRootId()
public void setCompanyRootId(String companyRootId)
companyRootId
- Sets the id of the company home spacepublic String getTicket()
SessionUser
getTicket
in interface SessionUser
public org.alfresco.service.cmr.repository.NodeRef getPerson()
public boolean isAdmin()
public static String getFullName(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.repository.NodeRef user)
nodeService
- The node service instanceuser
- The user to get the full name forpublic static String getFullNameAndUserId(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.repository.NodeRef user)
nodeService
- The node service instanceuser
- The user to get the full name forCopyright © 2005–2017 Alfresco Software. All rights reserved.