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) public class ResourceLink extends Object
Generic resource-based link model.
-
-
Constructor Summary
Constructors Constructor Description ResourceLink()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getAttributes()Returns a map of attributes which can be applied to a HTML anchor element.LinkgetMetadata()Returns aLinkobject with the metadata of the resolved link.booleanisValid()Returns true if the link was resolved successful.
-
-
-
Method Detail
-
getMetadata
public Link 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
-
-