Package io.wcm.handler.link.ui
Class ResourceLink
java.lang.Object
io.wcm.handler.link.ui.ResourceLink
@Model(adaptables={org.apache.sling.api.SlingHttpServletRequest.class,org.apache.sling.api.resource.Resource.class})
public class ResourceLink
extends Object
Generic resource-based link model.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ResourceLink
public ResourceLink()
-
-
Method Details
-
getMetadata
Returns aLinkobject with the metadata of the resolved link. Result is never null, check for validness with theLink.isValid()method.- Returns:
- Link
-
isValid
public boolean isValid()Returns true if the link was resolved successful.- Returns:
- Link is valid
-
getAttributes
Returns a map of attributes which can be applied to a HTML anchor element.- Returns:
- Anchor attributes
-