@ConsumerType
public interface Link<T>
Modifier and Type | Field and Description |
---|---|
static String |
PN_LINK_ACCESSIBILITY_LABEL
Deprecated.
|
static String |
PN_LINK_TARGET
Property name for storing link target.
|
static String |
PN_LINK_TITLE_ATTRIBUTE
Deprecated.
|
static String |
PN_LINK_URL
Default property name for storing link URL.
|
Modifier and Type | Method and Description |
---|---|
default @Nullable String |
getExternalizedURL()
The externalized URL which also contains the scheme and host information.
|
default @NotNull Map<String,String> |
getHtmlAttributes()
Returns a Map with attributes for HTML anchor tag for this link.
|
default @Nullable String |
getMappedURL()
The mapped URL, which supports mapping and vanity path.
|
default T |
getReference()
Returns the referenced WCM/DAM object.
|
default @Nullable String |
getURL()
The link URL, supports context path and escaping.
|
default boolean |
isValid()
Checks if the link defined for the component is valid.
|
static final String PN_LINK_URL
static final String PN_LINK_TARGET
@Deprecated static final String PN_LINK_ACCESSIBILITY_LABEL
@Deprecated static final String PN_LINK_TITLE_ATTRIBUTE
default boolean isValid()
true
if component has a valid link defined@Nullable default @Nullable String getURL()
null
if link is invalid@Nullable default @Nullable String getMappedURL()
null
if link is invalid or no processing can be done@Nullable default @Nullable String getExternalizedURL()
Externalizer
servicenull
if link is invalid or can't be externalized.@NotNull default @NotNull Map<String,String> getHtmlAttributes()
href
attribute,
but may contain additional attributes like target
and others.Map
with HTML-specific anchor attributes, or an empty map if link is invalid@Nullable default T getReference()
null
Copyright © 2022. All rights reserved.