@ProviderType public final class Template extends Object
Modifier and Type | Method and Description |
---|---|
static <E extends Enum<E> & TemplatePathInfo> |
forPage(com.day.cq.wcm.api.Page page,
Class<E>... templateEnums)
Lookup template for given page.
|
static TemplatePathInfo |
forPage(com.day.cq.wcm.api.Page page,
TemplatePathInfo... templates)
Lookup template for given page.
|
static <E extends Enum<E> & TemplatePathInfo> |
forTemplatePath(String templatePath,
Class<E>... templateEnums)
Lookup a template by the given template path.
|
static TemplatePathInfo |
forTemplatePath(String templatePath,
TemplatePathInfo... templates)
Lookup a template by the given template path.
|
static String |
getResourceTypeFromTemplatePath(String templatePath)
Gets the resource type for a given template path.
|
static boolean |
is(com.day.cq.wcm.api.Page page,
String... templatePaths)
Checks if the given page uses a specific template.
|
static boolean |
is(com.day.cq.wcm.api.Page page,
TemplatePathInfo... templates)
Checks if the given page uses a specific template.
|
public static String getResourceTypeFromTemplatePath(String templatePath)
templatePath
- Template pathpublic static boolean is(com.day.cq.wcm.api.Page page, TemplatePathInfo... templates)
page
- AEM pagetemplates
- Template(s)public static boolean is(com.day.cq.wcm.api.Page page, String... templatePaths)
page
- AEM pagetemplatePaths
- Template path(s)public static TemplatePathInfo forTemplatePath(String templatePath, TemplatePathInfo... templates)
templatePath
- Path of templatetemplates
- TemplatesTemplatePathInfo
instance or null for unknown template paths@SafeVarargs public static <E extends Enum<E> & TemplatePathInfo> TemplatePathInfo forTemplatePath(String templatePath, Class<E>... templateEnums)
E
- Template enumtemplatePath
- Path of templatetemplateEnums
- TemplatesTemplatePathInfo
instance or null for unknown template pathspublic static TemplatePathInfo forPage(com.day.cq.wcm.api.Page page, TemplatePathInfo... templates)
page
- Pagetemplates
- TemplatesTemplatePathInfo
instance or null for unknown template paths@SafeVarargs public static <E extends Enum<E> & TemplatePathInfo> TemplatePathInfo forPage(com.day.cq.wcm.api.Page page, Class<E>... templateEnums)
E
- Tempalte enumpage
- PagetemplateEnums
- TemplatesTemplatePathInfo
instance or null for unknown template pathsCopyright © 2014–2017 wcm.io. All rights reserved.