@Model(adaptables={org.apache.sling.api.SlingHttpServletRequest.class,org.apache.sling.api.resource.Resource.class})
@ProviderType
public final class MediaLinkType
extends LinkType
LinkType for media links.
Media links are links to media items from media sources
that implement the MediaSource interface.| Constructor and Description |
|---|
MediaLinkType() |
| Modifier and Type | Method and Description |
|---|---|
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 mediaRef)
Get synthetic link resource for this link type.
|
static boolean |
isDefaultMediaContentPath(String path) |
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 Link resolveLink(Link link)
LinkTyperesolveLink in class LinkTypelink - Link metadatapublic static boolean isDefaultMediaContentPath(String path)
path - Content pathpublic static org.apache.sling.api.resource.Resource getSyntheticLinkResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String mediaRef)
resourceResolver - Resource resolvermediaRef - Media asset referenceCopyright © 2014–2017 wcm.io. All rights reserved.