public abstract class Link extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
aliasSpecified
Whether an alias is included in the
originalLinkText. |
protected String |
iconName |
protected String |
linkBody
The contents that are being marked up by the link.
|
protected boolean |
relativeUrl |
protected String |
title |
protected List |
titleArgs |
protected String |
titleKey |
protected String |
url |
protected String |
wikiDestination
The destination portion of the
originalLinkText. |
protected String |
wikiTitle
The optional title portion of the
originalLinkText. |
| Constructor and Description |
|---|
Link(String originalLinkText)
Construct a link from some text (as passed into LinkResolver#createLink)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getIconName()
A name that the renderer can use to look up an appropriate icon.
|
String |
getLinkAttributes()
This is a method that will allow a link to set any additional attributes that are related to
the specific link type.
|
String |
getLinkBody()
Get the contents that are being marked up by the link
|
String |
getOriginalLinkText()
Get the original text used to build this link
|
String |
getTitle()
Get the link title text
|
List |
getTitleArgs()
Retrieves the arguments to use in the internationalised message identified by
getTitleKey() |
String |
getTitleKey()
Retrieve the i18n key for the title if defined.
|
String |
getUnpermittedLinkBody()
Get the link body as it would be displayed if the link wasn't permitted to be viewed
|
String |
getUrl()
Get the destination URL for this link.
|
String |
getWikiDestination()
Gets the destination portion of the
originalLinkText. |
String |
getWikiTitle()
Gets the optional title portion of the
originalLinkText. |
int |
hashCode() |
boolean |
isAliasSpecified()
Returns true if the link markup specifies an alias.
|
boolean |
isRelativeUrl()
Is the URL relativeUrl to the application's context path?
|
protected String url
protected String title
protected String linkBody
protected boolean relativeUrl
protected String iconName
protected String titleKey
protected List titleArgs
protected String wikiDestination
originalLinkText.protected String wikiTitle
originalLinkText.protected boolean aliasSpecified
originalLinkText.public Link(String originalLinkText)
originalLinkText - the original text of the linkpublic String getOriginalLinkText()
public String getUrl()
It should be html escaped so it can be embedded directly into html without any XSS attacks.
public String getTitle()
public String getLinkBody()
public String getUnpermittedLinkBody()
public boolean isRelativeUrl()
public String getLinkAttributes()
public String getIconName()
public String getTitleKey()
public List getTitleArgs()
getTitleKey()public String getWikiDestination()
originalLinkText.public String getWikiTitle()
originalLinkText. Returns null if no title was present
in the original link text.public boolean isAliasSpecified()
Copyright © 2019 Atlassian. All rights reserved.