com.atlassian.confluence.servlet.simpledisplay
Class SpacePathConverter

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

public class SpacePathConverter
extends java.lang.Object
implements PathConverter

This path converter takes a friendly space url and converts it into a viewspace or browsespace action url. This converter expects exactly one field, the space key. This converter will return a browse space url if the global setting 'View Space Goes to Browse Space' is turned on, otherwise the home page is returned.


Field Summary
static java.lang.String DISPLAY_SPACE_HOME_PAGE_PATH
           
protected  VelocityEngineResolver resolver
           
 
Constructor Summary
SpacePathConverter()
           
 
Method Summary
 ConvertedPath getPath(java.lang.String simplePath)
          Returns a ConvertedPath based on the passed in path.
 boolean handles(java.lang.String simplePath)
          Return true from this method if your path converter can convert the specified path.
 void setResolver(VelocityEngineResolver resolver)
           
 void setSettingsManager(SettingsManager settingsManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

protected VelocityEngineResolver resolver

DISPLAY_SPACE_HOME_PAGE_PATH

public static final java.lang.String DISPLAY_SPACE_HOME_PAGE_PATH
See Also:
Constant Field Values
Constructor Detail

SpacePathConverter

public SpacePathConverter()
Method Detail

setResolver

public void setResolver(VelocityEngineResolver resolver)

handles

public boolean handles(java.lang.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(java.lang.String simplePath)
Description copied from interface: PathConverter
Returns a ConvertedPath based on the passed in path.

Specified by:
getPath in interface PathConverter
Parameters:
simplePath - the path relative to the servlet mapping
Returns:
a ConvertedPath representing the path conversion

setSettingsManager

public void setSettingsManager(SettingsManager settingsManager)


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.