public class MockResolvedSiteMapItem extends Object implements ResolvedSiteMapItem
ResolvedSiteMapItem
for testing purposes.Constructor and Description |
---|
MockResolvedSiteMapItem() |
Modifier and Type | Method and Description |
---|---|
void |
addLocalParameter(String key,
String value) |
void |
addParameter(String key,
String value) |
int |
getErrorCode() |
HstComponentConfiguration |
getHstComponentConfiguration() |
HstSiteMapItem |
getHstSiteMapItem() |
String |
getLocalParameter(String name)
See
ResolvedSiteMapItem.getParameter(String) only without inheritance of ancestor items |
Properties |
getLocalParameters()
See
ResolvedSiteMapItem.getParameters() only without inheritance of ancestor items |
String |
getNamedPipeline()
Returns the
namedPipeline to be used for the Hst Request Processing. |
String |
getPageTitle() |
String |
getParameter(String name)
Returns a property from the HstSiteMapItem configuration but should have replaced possible property placeholders.
|
Properties |
getParameters()
Return the parameter map from the HstSiteMapItem configuration, but all values containing property placeholders should be resolved.
|
String |
getPathInfo()
Returns a relative path from hst request path to the SiteMapItem that was matched.
|
String |
getRelativeContentPath()
This method returns a content path, relative to the
Mount.getContentPath() . |
ResolvedMount |
getResolvedMount() |
Set<String> |
getRoles() |
int |
getStatusCode() |
Set<String> |
getUsers() |
boolean |
isAuthenticated() |
void |
removeLocalParameter(String key) |
void |
removeParameter(String key) |
void |
setAuthenticated(boolean authenticated) |
void |
setErrorCode(int errorCode) |
void |
setHstComponentConfiguration(HstComponentConfiguration hstComponentConfiguration) |
void |
setHstSiteMapItem(HstSiteMapItem hstSiteMapItem) |
void |
setNamedPipeline(String namedPipeline) |
void |
setPageTitle(String pageTitle) |
void |
setPathInfo(String pathInfo) |
void |
setRelativeContentPath(String relativeContentPath) |
void |
setResolvedMount(ResolvedMount resolvedMount) |
void |
setRoles(Set<String> roles) |
void |
setStatusCode(int statusCode) |
void |
setUsers(Set<String> users) |
public String getRelativeContentPath()
ResolvedSiteMapItem
Mount.getContentPath()
. This value should
have resolved property placeholders, like ${1}/${2}. If a property placeholder cannot be resolved, the implementation may return null
getRelativeContentPath
in interface ResolvedSiteMapItem
Mount.getContentPath()
or null
if not present or has unresolvable property placeholderspublic void setRelativeContentPath(String relativeContentPath)
public String getPathInfo()
ResolvedSiteMapItem
getPathInfo
in interface ResolvedSiteMapItem
ResolvedSiteMapItem
, relative to the mount pathpublic void setPathInfo(String pathInfo)
public String getPageTitle()
getPageTitle
in interface ResolvedSiteMapItem
ResolvedSiteMapItem
or null
if not configured or configured incorrect:
An incorrect configuration is the case when there are property placeholders used for wildcards that cannot be resolved.public void setPageTitle(String pageTitle)
public String getParameter(String name)
ResolvedSiteMapItem
null
. Parameters are inherited from ancestor items,
but in case of the same name, ancestor items have a lower precedencegetParameter
in interface ResolvedSiteMapItem
name
- the name of the parameternull
if the parameter is not there or a property placeholder cannot be resolvedpublic Properties getParameters()
ResolvedSiteMapItem
getParameters
in interface ResolvedSiteMapItem
public void removeParameter(String key)
public String getLocalParameter(String name)
ResolvedSiteMapItem
ResolvedSiteMapItem.getParameter(String)
only without inheritance of ancestor itemsgetLocalParameter
in interface ResolvedSiteMapItem
name
- the name of the parameternull
if the parameter is not there or a property placeholder cannot be resolvedpublic Properties getLocalParameters()
ResolvedSiteMapItem
ResolvedSiteMapItem.getParameters()
only without inheritance of ancestor itemsgetLocalParameters
in interface ResolvedSiteMapItem
public void removeLocalParameter(String key)
public HstSiteMapItem getHstSiteMapItem()
getHstSiteMapItem
in interface ResolvedSiteMapItem
HstSiteMapItem
that is matched for this requestpublic void setHstSiteMapItem(HstSiteMapItem hstSiteMapItem)
public int getStatusCode()
getStatusCode
in interface ResolvedSiteMapItem
HstSiteMapItem.getStatusCode()
public void setStatusCode(int statusCode)
public int getErrorCode()
getErrorCode
in interface ResolvedSiteMapItem
HstSiteMapItem.getErrorCode()
public void setErrorCode(int errorCode)
public Set<String> getRoles()
getRoles
in interface ResolvedSiteMapItem
public Set<String> getUsers()
getUsers
in interface ResolvedSiteMapItem
public boolean isAuthenticated()
isAuthenticated
in interface ResolvedSiteMapItem
true
if ResolvedSiteMapItem.getRoles()
should be applied to this ResolvedSiteMap itempublic void setAuthenticated(boolean authenticated)
public HstComponentConfiguration getHstComponentConfiguration()
getHstComponentConfiguration
in interface ResolvedSiteMapItem
HstComponentConfiguration
that is configured on the backing ResolvedSiteMapItem.getHstSiteMapItem()
of this ResolvedSiteMapItempublic void setHstComponentConfiguration(HstComponentConfiguration hstComponentConfiguration)
public String getNamedPipeline()
ResolvedSiteMapItem
namedPipeline
to be used for the Hst Request Processing. When the backing HstSiteMapItem
does not contain one,
possibly, when present, it is inherited from its backing Mount
. If this one does not have it either, null
is returned
implying the default pipeline will be calledgetNamedPipeline
in interface ResolvedSiteMapItem
namedPipeline
for this ResolvedSiteMapItem or null
implying the default should be usedpublic void setNamedPipeline(String namedPipeline)
public ResolvedMount getResolvedMount()
getResolvedMount
in interface ResolvedSiteMapItem
ResolvedMount
for this resolvedSiteMapItem instancepublic void setResolvedMount(ResolvedMount resolvedMount)
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.