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 DefaultLinkBuilderbuilder()Creates an empty DefaultLinkBuilderstatic DefaultLinkBuilderbuilder(Link link)Creates a DefaultLinkBuilder using an existing linkbooleanequals(Object o)StringgetAnchor()LinkBody<?>getBody()ResourceIdentifiergetDestinationResourceIdentifier()Optional<String>getTarget()Returns the target attribute for the link.StringgetTooltip()inthashCode()StringtoString()LinkupdateDestination(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:
getDestinationResourceIdentifierin interfaceLink- Returns:
- a resource identifier to the destination
- See Also:
ResourceIdentifier
-
getBody
public LinkBody<?> getBody()
-
getTooltip
public String getTooltip()
- Specified by:
getTooltipin interfaceLink- Returns:
- tooltip
-
getTarget
public Optional<String> getTarget()
Description copied from interface:LinkReturns 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:
updateDestinationin interfaceLink- Parameters:
destination- the updated destination- Returns:
- a new instance with the updated destination.
-
-