Hi, I just wondering is there any way to get the full name of a lockowner? As a the username of a lockowner can be obtained by using the following code in the Node class:
So is there any method using username to get the fullname of that user? I saw a method named "getPerson(String userName)" in the PersonServiceImp class, so is it possible to use this? I really feel confusing about the search mechnism used in Alfresco.
Yes you can use the PersonService to get the Person node that represents that username. Then you can get the properties from that node such as "cm:firstName" and "cm:lastName" to build up the full name string.
In the web-client, 99% of the public services can be obtained through the ServiceRegistry, which is obtained via the client Repository static helper class. You will see the pattern used quite a bit in client code, but not in the JSF beans (which use Spring injection of the specific services). So in the Node class there is already a helper to get the ServiceRegistry, just call: getServiceRegistry().getPersonService()