Class DefaultLink
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.model.links.DefaultLink
-
-
Constructor Summary
Constructors Constructor Description DefaultLink(ResourceIdentifier destinationResourceIdentifier, LinkBody<?> body)
Deprecated.since 5.10.DefaultLink(ResourceIdentifier destinationResourceIdentifier, LinkBody<?> body, String tooltip, String anchor)
Deprecated.since 5.10.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultLinkBuilder
builder()
Creates an empty DefaultLinkBuilderstatic DefaultLinkBuilder
builder(Link link)
Creates a DefaultLinkBuilder using an existing linkboolean
equals(Object o)
String
getAnchor()
LinkBody<?>
getBody()
ResourceIdentifier
getDestinationResourceIdentifier()
Optional<String>
getTarget()
Returns the target attribute for the link.String
getTooltip()
int
hashCode()
String
toString()
Link
updateDestination(ResourceIdentifier destination)
Returns a new instance of this link with an updated destination.
-
-
-
Constructor Detail
-
DefaultLink
@Deprecated public DefaultLink(ResourceIdentifier destinationResourceIdentifier, LinkBody<?> body)
Deprecated.since 5.10. Usebuilder()
orbuilder(Link)
-
DefaultLink
@Deprecated public DefaultLink(ResourceIdentifier destinationResourceIdentifier, LinkBody<?> body, String tooltip, String anchor)
Deprecated.since 5.10. Usebuilder()
orbuilder(Link)
-
-
Method Detail
-
builder
public static DefaultLinkBuilder builder()
Creates an empty DefaultLinkBuilder- Returns:
- an empty DefaultLinkBuilder
- Since:
- 5.10
-
builder
public static DefaultLinkBuilder builder(Link link)
Creates a DefaultLinkBuilder using an existing link- Parameters:
link
-- Returns:
- a DefaultLinkBuilder populated from the provided link
- Since:
- 5.10
-
getDestinationResourceIdentifier
public ResourceIdentifier getDestinationResourceIdentifier()
- Specified by:
getDestinationResourceIdentifier
in interfaceLink
- Returns:
- a resource identifier to the destination
- See Also:
ResourceIdentifier
-
getBody
public LinkBody<?> getBody()
-
getTooltip
public String getTooltip()
- Specified by:
getTooltip
in interfaceLink
- Returns:
- tooltip
-
getTarget
public Optional<String> getTarget()
Description copied from interface:Link
Returns the target attribute for the link. Only "_blank" is supported.
-
updateDestination
public Link updateDestination(ResourceIdentifier destination)
Returns a new instance of this link with an updated destination.- Specified by:
updateDestination
in interfaceLink
- Parameters:
destination
- the updated destination- Returns:
- a new instance with the updated destination.
-
-