|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HstLink
HstLink is the object representing a link. The getPath()
return you the value of the link, and getPathElements()
returns you the path splitted on "/"'s. The String[] version is more practical because the HttpServletResponse.encodeURL(String)
also encodes slashes.
Furthermore, the HstSite
that the link is meant for is accessible through this HstLink, because it is needed if the link is
out of the scope of the current HstSite. The HstSite can access the VirtualHost
through which
in turn even links to different hosts can be created.
Field Summary | |
---|---|
static String |
PATH_SUBPATH_DELIMITER
Deprecated. fetch the PATH_SUBPATH_DELIMITER from the HstManager.getPathSuffixDelimiter() instead |
Method Summary | |
---|---|
boolean |
getContainerResource()
|
Mount |
getMount()
|
String |
getPath()
Note: This is *not* a url! |
String[] |
getPathElements()
|
String |
getSubPath()
Returns the subPath of this HstLink object. |
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 |
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)
|
Field Detail |
---|
@Deprecated static final String PATH_SUBPATH_DELIMITER
HstManager.getPathSuffixDelimiter()
insteadMethod Detail |
---|
String getPath()
void setPath(String path)
path
- String getSubPath()
HstLink
object. This part will be appended to the 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
.
HstLink
object.void setSubPath(String subPath)
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
.
subPath
- boolean getContainerResource()
true
when the HstLink represents a container resource, like a repository binaryvoid setContainerResource(boolean containerResource)
containerResource
- sets the containerResourceString toUrlForm(HstRequestContext requestContext, boolean fullyQualified)
requestContext
- fullyQualified
- if true, the returned link is a fully qualified URL, in other words including http/https etc
String[] getPathElements()
getPath()
splitted on slashesMount getMount()
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 returnedboolean isNotFound()
true
it indicates that the link is some hardcoded path for beans that cannot be linked to
true
when this HstLink indicates to be a link that is actually a notFound linkvoid setNotFound(boolean notFound)
notFound
- true whether this HstLink is actually a notFound link
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |