public final class LinkBuilderFactory extends Object
LinkBuilder
instances.Modifier and Type | Method and Description |
---|---|
static LinkBuilder |
forLink(Link link)
Get a builder instance for an existing
Link . |
static LinkBuilder |
forPage(com.day.cq.wcm.api.Page page)
Get a builder instance for a page.
|
static LinkBuilder |
forPage(com.day.cq.wcm.api.Page page,
boolean mapped)
Get a builder instance for a page.
|
static LinkBuilder |
forPage(com.day.cq.wcm.api.Page page,
boolean mapped,
TitleType titleType)
Get a builder instance for a page using the specified title type on the returned builder.
|
static LinkBuilder |
forPage(com.day.cq.wcm.api.Page page,
TitleType titleType)
Get a builder instance for a page using the specified title type on the returned builder.
|
static LinkBuilder |
forPath(String path)
Get a builder instance for a path.
|
static LinkBuilder |
forResource(org.apache.sling.api.resource.Resource resource)
Get a builder instance for a resource.
|
static LinkBuilder |
forResource(org.apache.sling.api.resource.Resource resource,
boolean mapped)
Get a builder instance for a resource using the mapped path on the returned builder.
|
public static LinkBuilder forLink(Link link)
Link
. The path, extension, title, and target are copied from
the link argument.link
- existing linkpublic static LinkBuilder forPage(com.day.cq.wcm.api.Page page)
page
- pagepublic static LinkBuilder forPage(com.day.cq.wcm.api.Page page, TitleType titleType)
page
- pagetitleType
- type of page title to set on the builderpublic static LinkBuilder forPage(com.day.cq.wcm.api.Page page, boolean mapped)
page
- pagemapped
- if true, link path will be mapped through resource resolverpublic static LinkBuilder forPage(com.day.cq.wcm.api.Page page, boolean mapped, TitleType titleType)
page
- pagemapped
- if true, link path will be mapped through resource resolvertitleType
- type of page title to set on the builderpublic static LinkBuilder forPath(String path)
path
- content or external pathpublic static LinkBuilder forResource(org.apache.sling.api.resource.Resource resource)
resource
- resourcepublic static LinkBuilder forResource(org.apache.sling.api.resource.Resource resource, boolean mapped)
resource
- resourcemapped
- if true, link path will be mapped through resource resolverCopyright © 2019 ICF Next. All rights reserved.