Class AbstractNav
- java.lang.Object
-
- com.atlassian.confluence.plugins.rest.navigation.impl.AbstractNav
-
- All Implemented Interfaces:
Navigation.Builder
,RestNavigation.RestBuilder
- Direct Known Subclasses:
BaseNav
public abstract class AbstractNav extends Object implements RestNavigation.RestBuilder
A stateless base class for the nav builders that is safe for the delegating nav builder to extend directly. Other nav builders should probably extend BaseNav instead
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.api.nav.Navigation.Builder
NONE
-
-
Constructor Summary
Constructors Constructor Description AbstractNav()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
addParam(String key, Object value)
String
buildAbsolute()
build an absolute URL http://localhost:8080/confluence/rest/of/urlString
buildCanonicalAbsolute()
build an absolute URL substituting the confuence configured base url and context for the base url and context supplied by the url builderprotected abstract String
buildPath()
String
buildRelative()
build a relative URL without webapp context, i.e.String
buildRelativeWithContext()
build a relative URL with webapp context, i.e.protected abstract AbstractNav
copy()
protected abstract String
getAnchor()
protected abstract String
getBaseUrl()
protected abstract String
getContextPath()
protected abstract Map<String,Object>
getParams()
protected abstract void
setAnchor(String anchor)
javax.ws.rs.core.UriBuilder
toAbsoluteUriBuilder()
converts this builder to a jersey URI builder
-
-
-
Method Detail
-
buildPath
protected abstract String buildPath()
-
setAnchor
protected abstract void setAnchor(String anchor)
-
getAnchor
protected abstract String getAnchor()
-
getBaseUrl
protected abstract String getBaseUrl()
-
getContextPath
protected abstract String getContextPath()
-
copy
protected abstract AbstractNav copy()
-
buildAbsolute
public String buildAbsolute()
Description copied from interface:Navigation.Builder
build an absolute URL http://localhost:8080/confluence/rest/of/url- Specified by:
buildAbsolute
in interfaceNavigation.Builder
-
buildCanonicalAbsolute
public String buildCanonicalAbsolute()
Description copied from interface:Navigation.Builder
build an absolute URL substituting the confuence configured base url and context for the base url and context supplied by the url builder- Specified by:
buildCanonicalAbsolute
in interfaceNavigation.Builder
- Returns:
- a canonical url for this navigation path
-
toAbsoluteUriBuilder
public javax.ws.rs.core.UriBuilder toAbsoluteUriBuilder()
Description copied from interface:RestNavigation.RestBuilder
converts this builder to a jersey URI builder- Specified by:
toAbsoluteUriBuilder
in interfaceRestNavigation.RestBuilder
- Returns:
- a jersey URI builder
-
buildRelative
public String buildRelative()
Description copied from interface:Navigation.Builder
build a relative URL without webapp context, i.e. /rest/of/url- Specified by:
buildRelative
in interfaceNavigation.Builder
-
buildRelativeWithContext
public String buildRelativeWithContext()
Description copied from interface:Navigation.Builder
build a relative URL with webapp context, i.e. /confluence/rest/of/url- Specified by:
buildRelativeWithContext
in interfaceNavigation.Builder
-
-