Class WebLink
- All Implemented Interfaces:
Serializable
You should use get()
or SimpleValueObject.toString()
to get the link as
String
. Normally a root relative URL (without protocol, hostname)
will be returned. Except if the host part is needed because it points to
another host than the current engine host.
Example:
import ch.ivyteam.ivy.model.value.WebLink;
WebLink relative = WebLink.of("/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi", () -> URI.create(http://localhost));
relative.get(); -> /Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
relative.toString(); -> /Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
relative.getRelative(); -> /Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
relative.getAbsolute(); -> http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
WebLink absolute = WebLink.of("http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi");
absolute.get(); -> http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
absolute.toString(); -> http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
absolute.getRelative(); -> /Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
absolute.getAbsolute(); -> http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
- Since:
- 6.6.2
- See Also:
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionget()
Returns normally a root relative uri, except if the host part is needed because it points to another host than the current engine host.Example:Example:Example:Example:queryParam
(String name, String value) Adds a new query parameter to the uri.queryParams
(Map<String, String> params) Adds the query parameters to the uri.Returns the absolute uri.Returns the root relativeURI
.toUri()
Returns theURI
.Methods inherited from class ch.ivyteam.ivy.model.SimpleValueObject
equals, hashCode, toString
-
Method Details
-
get
Returns normally a root relative uri, except if the host part is needed because it points to another host than the current engine host.Example:
import ch.ivyteam.ivy.model.value.WebLink;
WebLink relative = WebLink.of("/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi", () -> URI.create(http://localhost));
relative.get(); -> /Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
WebLink absolute = WebLink.of("http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi");
absolute.get(); -> http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
- Returns:
- the root relative uri without protocol, hostname etc.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getRelative
Example:import ch.ivyteam.ivy.model.value.WebLink;
WebLink link = WebLink.of("http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi");
link.getRelative(); -> /Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
- Returns:
- the root relative uri without protocol, hostname etc.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getRelativeEncoded
Example:import ch.ivyteam.ivy.model.value.WebLink;
WebLink link = WebLink.of("http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi");
link.getRelativeEncoded(); -> /Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=gr%C3%BCezi
- Returns:
- the ASCII encoded relative uri without protocol, hostname etc.
- See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getAbsolute
Example:import ch.ivyteam.ivy.model.value.WebLink;
WebLink link = WebLink.of("http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi");
link.getAbsolute(); -> http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi
Note: Normally you should prefer
get()
if not explicitly an absolute uri is needed- Returns:
- the absolute uri including protocol, host name etc.
- See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getAbsoluteEncoded
Example:import ch.ivyteam.ivy.model.value.WebLink;
WebLink link = WebLink.of("http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=grüezi");
link.getAbsoluteEncoded(); -> http://localhost/Portal/pro/SelfServiceBpm/14232C3D829C4D71/start.ivp?search=gr%C3%BCezi
- Returns:
- the ASCII encoded absolute uri including protocol, host name etc.
- See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
toUri
Returns theURI
. Normally a root relativeURI
, except if the host part is needed because it points to another host than the current engine host.- Returns:
- the
URI
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
toRelativeUri
Returns the root relativeURI
. -
toAbsoluteUri
Returns the absolute uri.
Note: Normally you should prefer the
toUri()
if not explicitly an absoluteURI
is needed- Returns:
- the absolute uri
- See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
queryParam
Adds a new query parameter to the uri.- Parameters:
name
- of the query parametervalue
- of the query parameter.- Returns:
- returns a new WebLink with the added query parameter.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
queryParams
Adds the query parameters to the uri.- Parameters:
params
- name value map of the query parameters to add.- Returns:
- returns a new WebLink with the added query parameters.
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-