private String locatorToString(ProfileLocator locator)
{
StringBuffer keybuf = new StringBuffer();
JetspeedUser user = locator.getUser();
Role role = locator.getRole();
Group group = locator.getGroup();
String name = locator.getName();
String mediaType = locator.getMediaType();
String country = locator.getCountry();
String language = locator.getLanguage();
synchronized (this)
{
if (user != null)
{
keybuf.append("User:").append(user.getUserName());
}
else if (group != null)
{
keybuf.append("Group:").append(group.getName());
}
else if (role != null)
{
keybuf.append("Role:").append(role.getName());
}
if (name != null)
{
keybuf.append('$').append("Page:").append(name);