public interface Link extends Serializable
Link object is a bean that holds information about a link
to a tridion resource. Other functional objects, like PageLink,
ComponentLink and BinaryLink use this object.
All link properties can be modified after creation, allowing Template
Designers to influence the Link object after creation.
| Modifier and Type | Method and Description |
|---|---|
String |
getAnchor()
Returns the anchor for this link.
|
String |
getAttributes()
Returns the attributes for this link.
|
String |
getParameters()
Returns the QueryString for this link.
|
String |
getTargetURI()
Returns the tcm:uri if the Item targeted by this link.
|
String |
getText()
Returns the link text for this link.
|
boolean |
getTextOnFail()
Returns the textOnFail value, which indicates if the link will return
text if the targeted URI cannot be resolved or validated.
|
String |
getURL()
Returns the URL of the resolved item.
|
boolean |
isResolved()
Indicates if this link has been resolved and is targeting a valid URL.
|
void |
setAnchor(String anchor)
Sets the anchor of this
Link instance. |
void |
setAttributes(String attributes)
Sets the attributes for this
Link instance. |
void |
setParameters(String parameters)
Sets the QueryString of this
Link instance. |
void |
setText(String text)
Sets the link text for this
Link instance. |
void |
setTextOnFail(boolean textOnFail)
Sets the textOnFail property for this
Link instance. |
void |
setURL(String url)
Sets the URL of this
Link instance. |
String getURL()
null
if it could not be resolved.void setURL(String url)
Link instance.url - The new URL to which this link object should point.String getAnchor()
void setAnchor(String anchor)
Link instance.anchor - The new anchor for this link.String getParameters()
void setParameters(String parameters)
Link instance.parameters - The new QueryString for this link instance.String getAttributes()
void setAttributes(String attributes)
Link instance.attributes - The new attributes for this link instance.String getText()
void setText(String text)
Link instance.text - The new link text that should appear inside the link.boolean getTextOnFail()
void setTextOnFail(boolean textOnFail)
Link instance.textOnFail - The new textOnFail value.String getTargetURI()
boolean isResolved()
Copyright © 2016 SDL Group. All rights reserved.