Class TemplateUtils
- java.lang.Object
-
- com.adobe.aem.formsndocuments.util.TemplateUtils
-
public class TemplateUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TemplateUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<Resource>
findTemplates(ResourceResolver resolver, java.lang.String title, java.lang.String assetPathSuffix)
This API returns all the valid IC templates with the given title A template is valid when it satisfies following conditions: 1.static java.util.List<Resource>
getConfigurations(ResourceResolver resolver)
This API returns a list of configuration browsers present in /conf folderstatic java.util.List<Resource>
getFilteredAFTemplates(java.util.Iterator<Resource> it, java.lang.String assetPathSuffix)
This API filters AF templates based on the allowedPaths property for template availabilitystatic java.util.List<Resource>
getValidICTemplates(Resource confResource, java.lang.String assetPathSuffix)
This API returns all the valid Interactive Communication web channel templates.static boolean
isEditableTemplate(Template template)
Returns true if editable template, otherwise return false for static templatestatic boolean
isEditableTemplate(Resource resource)
Checks if the given resource represents an editable template.static boolean
isTemplateAllowed(javax.jcr.Session session, java.lang.String templatePath, java.lang.String assetPathSuffix)
-
-
-
Method Detail
-
getConfigurations
public static java.util.List<Resource> getConfigurations(ResourceResolver resolver)
This API returns a list of configuration browsers present in /conf folder- Parameters:
resolver
-- Returns:
- List
-
getValidICTemplates
public static java.util.List<Resource> getValidICTemplates(Resource confResource, java.lang.String assetPathSuffix)
This API returns all the valid Interactive Communication web channel templates. A template is valid when it satisfies following conditions: 1. allowedPaths property for template availability matches assetPathSuffix 2. template should be enabled- Parameters:
confResource
- - Configuration browser resourceassetPathSuffix
- - Destination path suffix for IC- Returns:
- List
-
getFilteredAFTemplates
public static java.util.List<Resource> getFilteredAFTemplates(java.util.Iterator<Resource> it, java.lang.String assetPathSuffix)
This API filters AF templates based on the allowedPaths property for template availability- Parameters:
it
- - An iterator for AF templatesassetPathSuffix
- - Destination path suffix for AF- Returns:
-
findTemplates
public static java.util.List<Resource> findTemplates(ResourceResolver resolver, java.lang.String title, java.lang.String assetPathSuffix)
This API returns all the valid IC templates with the given title A template is valid when it satisfies following conditions: 1. allowedPaths property for template availability matches assetPathSuffix 2. template should be enabled- Parameters:
resolver
-title
-assetPathSuffix
-- Returns:
- List
-
isTemplateAllowed
public static boolean isTemplateAllowed(@Nonnull javax.jcr.Session session, java.lang.String templatePath, java.lang.String assetPathSuffix)
-
isEditableTemplate
public static boolean isEditableTemplate(Template template)
Returns true if editable template, otherwise return false for static template- Parameters:
template
-- Returns:
- boolean
-
isEditableTemplate
public static boolean isEditableTemplate(Resource resource)
Checks if the given resource represents an editable template.- Parameters:
resource
- The resource to check.- Returns:
- true if the resource represents an editable template, false otherwise.
-
-