com.atlassian.confluence.servlet.simpledisplay
Class UserPathConverter

java.lang.Object
  extended by com.atlassian.confluence.servlet.simpledisplay.UserPathConverter
All Implemented Interfaces:
PathConverter

public class UserPathConverter
extends Object
implements PathConverter

This path converter requests for a username to either their personal space (if they have one and the viewer has permission) or their user profile. This path converter expects one parameter, the username with a leading '~'.


Constructor Summary
UserPathConverter()
           
 
Method Summary
 ConvertedPath getPath(String path)
          Returns a ConvertedPath based on the passed in path.
 boolean handles(String simplePath)
          Return true from this method if your path converter can convert the specified path.
 void setPermissionManager(PermissionManager permissionManager)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 void setUserAccessor(UserAccessor userAccessor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserPathConverter

public UserPathConverter()
Method Detail

handles

public boolean handles(String simplePath)
Description copied from interface: PathConverter
Return true from this method if your path converter can convert the specified path. By default, the SimpleDisplayServlet will be mapped to '/display' which will be stripped off the path before being passed to this method. The first converter that returns true for a path will be used to perform the conversion.

Specified by:
handles in interface PathConverter
Parameters:
simplePath - the path relative to the servlet mapping
Returns:
true if your path converter can handle this path

getPath

public ConvertedPath getPath(String path)
Description copied from interface: PathConverter
Returns a ConvertedPath based on the passed in path.

Specified by:
getPath in interface PathConverter
Parameters:
path -
Returns:
returns path to home page of personal space if it exists (and the current user has permission to view it), otherwise send to old profile page

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)

setPermissionManager

public void setPermissionManager(PermissionManager permissionManager)


Copyright © 2003-2012 Atlassian. All Rights Reserved.