Constructor and Description |
---|
MockHstLink() |
MockHstLink(String path) |
Modifier and Type | Method and Description |
---|---|
boolean |
getContainerResource()
Deprecated.
|
HstSiteMapItem |
getHstSiteMapItem() |
Mount |
getMount() |
String |
getPath()
Note: This is *not* a url!
|
String[] |
getPathElements() |
String |
getSubPath()
Returns the subPath of this
HstLink object. |
boolean |
isContainerResource()
When
HstLink.isContainerResource() returns true , the resulting URL will be webapp relative and not
relative to Mount.getMountPath() |
boolean |
isNotFound()
When for example for some bean the (real) link cannot be created through the HstLinkCreator, a HstLink can be returned
with a path that is for example from some configured property like '/pagenotfound'.
|
void |
setContainerResource(boolean containerResource) |
void |
setHstSiteMapItem(HstSiteMapItem hstSiteMapItem) |
void |
setMount(Mount mount) |
void |
setNotFound(boolean notFound) |
void |
setPath(String path)
(re)-sets the path of the HstLink
|
void |
setSubPath(String subPath)
sets the
subPath of this HstLink . |
String |
toUrlForm(HstRequestContext requestContext,
boolean fullyQualified) |
public MockHstLink()
public MockHstLink(String path)
public String getPath()
HstLink
public void setPath(String path)
HstLink
@Deprecated public boolean getContainerResource()
getContainerResource
in interface HstLink
public boolean isContainerResource()
HstLink
When HstLink.isContainerResource()
returns true
, the resulting URL will be webapp relative and not
relative to Mount.getMountPath()
When HstLink.isContainerResource()
returns false
, the resulting URL WILL include the
Mount.getMountPath()
after the webapp relative part (context path).
isContainerResource
in interface HstLink
true
when the HstLink represents a container resource, like a repository binary, a web file
or a static css file served by the container.public void setContainerResource(boolean containerResource)
setContainerResource
in interface HstLink
containerResource
- sets whether this HstLink
is a containerResource
or not.HstLink.isContainerResource()
public String[] getPathElements()
getPathElements
in interface HstLink
HstLink.getPath()
splitted on slashespublic boolean isNotFound()
HstLink
true
it indicates that the link is some hardcoded path for beans that cannot be linked toisNotFound
in interface HstLink
true
when this HstLink indicates to be a link that is actually a notFound linkpublic void setNotFound(boolean notFound)
setNotFound
in interface HstLink
notFound
- true whether this HstLink is actually a notFound linkpublic Mount getMount()
getMount
in interface HstLink
Mount
that can represent this link. This might be an Mount
which is a different one then the
Mount
the link was created in. This could result in a cross-domain (different hostname) link being created, depending
on the backing Mount.getVirtualHost()
. If no Mount
is set, null
can be returnedpublic void setMount(Mount mount)
public HstSiteMapItem getHstSiteMapItem()
getHstSiteMapItem
in interface HstLink
HstSiteMapItem
that matches this HstLink
or null
if this HstLink
cannot
be matched to any HstSiteMapItem
public void setHstSiteMapItem(HstSiteMapItem hstSiteMapItem)
public String getSubPath()
HstLink
HstLink
object. This part will be appended to the HstLink.getPath()
and delimited by ./
. It will be before the queryString.
Note that an empty String
subPath
will result in a URL having a ./
appended: An empty
subPath
is thus something different then a null
subPath
.getSubPath
in interface HstLink
HstLink
object.public void setSubPath(String subPath)
HstLink
subPath
of this HstLink
. Note that setting the subPath
to an empty String
will result in a URL having a ./
appended: An empty
subPath
is thus something different then a null
subPath
.setSubPath
in interface HstLink
public String toUrlForm(HstRequestContext requestContext, boolean fullyQualified)
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.