public interface BinaryLink
BinaryLink interface provides functionality to link to a binary
resource based on a tcm:uri. Besides validating that the Binary is
available on the Delivery System, it also makes sure that the correct name and
path are used to link to existing binaries.| Modifier and Type | Method and Description |
|---|---|
Link |
getLink(String binaryComponentURI,
String anchor,
String linkText,
String linkTagAttributes,
boolean showTextOnFail)
The
getLink method tries to find the location of the binary and wraps
this location in a Link object. |
Link |
getLink(String binaryComponentURI,
String variantId,
String anchor,
String linkText,
String linkTagAttributes,
boolean showTextOnFail)
The
getLink method tries to find the location of the binary and wraps
this location in a Link object. |
String |
getLinkAsString(String binaryComponentURI,
String anchor,
String linkText,
String linkTagAttributes,
boolean showTextOnFail)
The
getLinkAsString method calls the getLink method to
create a link object. |
String |
getLinkAsString(String binaryComponentURI,
String variantId,
String anchor,
String linkText,
String linkTagAttributes,
boolean showTextOnFail)
The
getLinkAsString method calls the getLink method to
create a link object. |
Link getLink(String binaryComponentURI, String variantId, String anchor, String linkText, String linkTagAttributes, boolean showTextOnFail)
getLink method tries to find the location of the binary and wraps
this location in a Link object.binaryComponentURI - The binaryComponentURI of the binary to be linked to.variantId - The id of the variant of the binary to be linked toanchor - The anchor on the page where the link has to be
pointing to. Use an empty String or null for this in normal
situations.linkText - The linkText for the linklinkTagAttributes - Optional query that should be placed in the anchor.showTextOnFail - Indicated if the linkText parameter should be used if the link does not
validate.Link getLink(String binaryComponentURI, String anchor, String linkText, String linkTagAttributes, boolean showTextOnFail)
getLink method tries to find the location of the binary and wraps
this location in a Link object.binaryComponentURI - The binaryComponentURI of the binary to be linked to.anchor - The anchor on the page where the link has to be
pointing to. Use an empty String or null for this in normal
situations.linkText - The linkText for the linklinkTagAttributes - Optional query that should be placed in the anchor.showTextOnFail - Indicated if the linkText parameter should be used if the link does not
validate.String getLinkAsString(String binaryComponentURI, String variantId, String anchor, String linkText, String linkTagAttributes, boolean showTextOnFail)
getLinkAsString method calls the getLink method to
create a link object. After this, it calls toString() on this
Link-object and returns this as a return value.binaryComponentURI - The binaryComponentURI of the binary to be linked to.variantId - The variant id of the binary to be linked to.anchor - The anchor on the page where the link has to be
pointing to. Use an empty String or null for this in normal
situations.linkText - The linkText for the linklinkTagAttributes - Optional query that should be placed in the anchor.showTextOnFail - Indicated if the linkText parameter should be used if the link does not
resolve or validate.true the linkText if it doesn't and if
showTextOnFail is false "".String getLinkAsString(String binaryComponentURI, String anchor, String linkText, String linkTagAttributes, boolean showTextOnFail)
getLinkAsString method calls the getLink method to
create a link object. After this, it calls toString() on this
Link-object and returns this as a return value.binaryComponentURI - The binaryComponentURI of the binary to be linked to.anchor - The anchor on the page where the link has to be
pointing to. Use an empty String or null for this in normal
situations.linkText - The linkText for the linklinkTagAttributes - Optional query that should be placed in the anchor.showTextOnFail - Indicated if the linkText parameter should be used if the link does not
resolve or validate.true the linkText if it doesn't and if
showTextOnFail is false "".Copyright © 2016 SDL Group. All rights reserved.