@Model(adaptables={org.apache.sling.api.SlingHttpServletRequest.class,org.apache.sling.api.resource.Resource.class})
@ProviderType
public final class InternalCrossScopeLinkType
extends LinkType
LinkType for internal links with supports
links between different configuration scopes (which normally relates to different sites/languages).
Internal links are links to content pages inside the CMS.
This link type ensures that links that are referenced from other configuration scopes (sites/languages) are resolved using the URL handler configuration of the target scope, e.g. with the Site URL from the other site.
| Constructor and Description |
|---|
InternalCrossScopeLinkType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(LinkRequest linkRequest)
Checks whether a link reference can be handled by this link type
|
boolean |
accepts(String linkRef)
Checks whether a link reference string can be handled by this link type
|
String |
getId() |
String |
getPrimaryLinkRefProperty() |
static org.apache.sling.api.resource.Resource |
getSyntheticLinkResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String pageRef)
Get synthetic link resource for this link type.
|
Link |
resolveLink(Link link)
Resolves a link
|
String |
toString() |
public static final String ID
public String getId()
public String getPrimaryLinkRefProperty()
getPrimaryLinkRefProperty in class LinkTypepublic boolean accepts(String linkRef)
LinkTypepublic boolean accepts(LinkRequest linkRequest)
LinkTypepublic Link resolveLink(Link link)
LinkTyperesolveLink in class LinkTypelink - Link metadatapublic static org.apache.sling.api.resource.Resource getSyntheticLinkResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String pageRef)
resourceResolver - Resource resolverpageRef - Path to target pageCopyright © 2014–2017 wcm.io. All rights reserved.