public final class TemplateEditorManagerClient extends CQClient
createDefaultTemplate(String configPath, String title, String Description)
To create a template with give type use createTemplate(String configPath, String templateType, String title, String Description)
To create Default Container on top level of a template use createTopLevelDefaultContainer(String templatePath, String name)
To create a Default container in a template use createDefaultContainer(String templatePath, String location, String name)CQClient.Builder, CQClient.InternalBuilder<T extends CQClient>LOG, STATISTICS_ROOT, wcmCommands| Constructor and Description |
|---|
TemplateEditorManagerClient(org.apache.http.impl.client.CloseableHttpClient http,
org.apache.sling.testing.clients.SlingClientConfig config) |
TemplateEditorManagerClient(URI serverUrl,
String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
String |
createDefaultContainer(String templatePath,
String location,
String nameHint)
Creates default layout container (responsivegrid) on the provided location of the provided template
|
String |
createDefaultTemplate(String configPath,
String title,
String description)
Creates a default page template of type HTML5
|
String |
createTemplate(String configPath,
String templateType,
String title,
String description)
Creates a page template with given template type
|
String |
createTopLevelDefaultContainer(String templatePath,
String nameHint)
Creates a default layout container (responsivegrid) on structure top level of the provided template
|
void |
disable(String templatePath)
Disables an existing template
|
void |
enable(String templatePath)
Enables a existing template
|
String |
importPolicy(String configPath,
String jsonString)
Update the policy of an existing CQConfig with the provides policy
|
String |
setComponentPolicy(String componentPath,
String policyPath)
Set the policy mapping for a component.
|
void |
setStructureComponentLock(String componentPath,
boolean isLocked)
Lock / unlock a component in the structure tree of a template
|
void |
unlockStructureComponent(String componentPath)
Unlock a component in the structure tree of a template
|
copyLanguages, copyPage, createPage, createPageWithRetry, createVersion, deletePage, deletePageWithRetry, getAuthorSitesPage, lockPage, movePage, movePage, pageExists, pageExistsWithRetry, pageExistsWithRetry, resetPageStatistics, restoreTree, restoreVersion, rolloutPage, searchAndReplaceInPages, searchInPages, setPageProperties, setPageProperty, setPagePropertyImage, unlockPage, uploadFileCQStylecreateFolder, createNode, createNodeRecursive, deletePath, doGetJson, exists, getJsonNode, getJsonNode, getNodeNameFromPath, getParentPath, getUUId, getUUID, importContent, importContent, importJson, move, setPropertiesString, setPropertyString, setPropertyStringArray, upload, waitExists, waitUntilExistsadaptTo, addValue, close, doDelete, doGet, doGet, doGet, doHead, doPatch, doPost, doPost, doPut, doRawRequest, doRequest, doStreamGet, doStreamPost, doStreamRequest, execute, execute, execute, execute, execute, execute, execute, execute, getClientId, getConnectionManager, getCookieStore, getCredentialsProvider, getParams, getPassword, getPath, getPath, getUrl, getUrl, getUrl, getUser, getValue, getValues, hasValuepublic TemplateEditorManagerClient(org.apache.http.impl.client.CloseableHttpClient http,
org.apache.sling.testing.clients.SlingClientConfig config)
throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientExceptionpublic String createDefaultTemplate(String configPath, String title, String description) throws org.apache.sling.testing.clients.ClientException, IOException
configPath - path of config to be used to create a page templatetitle - title of the templatedescription - description of the templateorg.apache.sling.testing.clients.ClientException - if the request failsIOException - if json parsing failspublic String createTemplate(String configPath, String templateType, String title, String description) throws org.apache.sling.testing.clients.ClientException, IOException
configPath - path of config to be used to create a page templatetemplateType - type of the templatetitle - title of the templatedescription - description of the templateorg.apache.sling.testing.clients.ClientException - if the request failsIOException - if json parsing failspublic String createDefaultContainer(String templatePath, String location, String nameHint) throws org.apache.sling.testing.clients.ClientException
templatePath: - path of the template the layout container should be created, i.e. /conf/myConfig/settings/wcm/templates/myTemplatelocation: - the location the layout container should be created, i.e. /structure/jcr:content/root/nameHint: - name hint for the layout container or null to create oneorg.apache.sling.testing.clients.ClientException - if the request failspublic String createTopLevelDefaultContainer(String templatePath, String nameHint) throws org.apache.sling.testing.clients.ClientException
templatePath: - path of the template the layout container should be created, i.e. /conf/myConfig/settings/wcm/templates/myTemplatenameHint: - name hint for the layout container or null to create oneorg.apache.sling.testing.clients.ClientException - if the request failspublic void enable(String templatePath) throws org.apache.sling.testing.clients.ClientException
templatePath - path of the template to be enabledorg.apache.sling.testing.clients.ClientException - if the request failspublic void disable(String templatePath) throws org.apache.sling.testing.clients.ClientException
templatePath - path of the template to be disabledorg.apache.sling.testing.clients.ClientException - if the request failspublic String importPolicy(String configPath, String jsonString) throws org.apache.sling.testing.clients.ClientException
configPath - path of the config which needs to be updatedjsonString - policy to be updated in json formatorg.apache.sling.testing.clients.ClientException - if the request failspublic void unlockStructureComponent(String componentPath) throws org.apache.sling.testing.clients.ClientException
componentPath: - path of the component to be unlockedorg.apache.sling.testing.clients.ClientException - if the request failspublic void setStructureComponentLock(String componentPath, boolean isLocked) throws org.apache.sling.testing.clients.ClientException
componentPath: - path of the component to be locked / unlockedisLocked: - true to lock the component, false to unlock the componentorg.apache.sling.testing.clients.ClientException - if the request failspublic String setComponentPolicy(String componentPath, String policyPath) throws org.apache.sling.testing.clients.ClientException
componentPath: - the path of the component for which the policy should be setpolicyPath: - the path of the policy to be set for the component, i.e. wcm/foundation/components/responsivegrid/defaultorg.apache.sling.testing.clients.ClientException - if the request failsCopyright © 2021. All rights reserved.