Class PreviewDeployer
java.lang.Object
org.craftercms.studio.impl.v2.deployment.AbstractDeployer
org.craftercms.studio.impl.v2.deployment.PreviewDeployer
- All Implemented Interfaces:
Deployer
Implementation of
Deployer that interacts with the
Preview Deployer in Authoring. This Deployer:
- Creates both and authoring and preview target on create
- Deletes the authoring and preview target on delete
- Issues deployments to the authoring and preview target on a preview sync event
- Author:
- avasquez
-
Field Summary
Fields inherited from class org.craftercms.studio.impl.v2.deployment.AbstractDeployer
DISABLE_DEPLOY_CRON_TEMPLATE_PARAM, ENV_TEMPLATE_PARAM, LOCAL_REPO_PATH_TEMPLATE_PARAM, REPLACE_TEMPLATE_PARAM, REPO_URL_TEMPLATE_PARAM, restTemplate, SITE_NAME_TEMPLATE_PARAM, SOURCE_TEMPLATE_PARAM, studioConfiguration, TEMPLATE_NAME_TEMPLATE_PARAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateTargets(String site) Calls a Crafter Deployer to create any necessary targets for the site.voiddeleteTargets(String site) Deletes the targets associated with the site.protected voiddoCreateAuthTarget(String site) protected voiddoCreatePreviewTarget(String site) protected voiddoDeployment(String site, String environment, boolean waitTillDone) protected voiddoPreviewSync(String siteId, boolean waitTillDone) voidduplicateTargets(String sourceSiteId, String siteId) Call Crafter Deployer API to duplicate the site targetsprotected Stringprotected StringgetDeleteTargetUrl(String site, String environment) protected StringgetDeployTargetUrl(String site, String environment) voidonContentChange(ContentEvent event) voidvoidMethods inherited from class org.craftercms.studio.impl.v2.deployment.AbstractDeployer
addAdditionalParams, addChildParams, doCreateTarget, doDeleteTarget, doDuplicateTarget, getCreateTargetRequestBody, getDuplicateTargetRequestBody, getDuplicateTargetUrl, getRepoUrl, getSourceTemplateParams
-
Constructor Details
-
PreviewDeployer
-
-
Method Details
-
onSiteCreateComplete
-
onRepositorySyncComplete
-
onContentChange
-
doPreviewSync
-
createTargets
Description copied from interface:DeployerCalls a Crafter Deployer to create any necessary targets for the site.- Parameters:
site- the site- Throws:
org.springframework.web.client.RestClientException- if an error occurs
-
deleteTargets
Description copied from interface:DeployerDeletes the targets associated with the site.- Parameters:
site- the site- Throws:
org.springframework.web.client.RestClientException- if an error occurs
-
doDeployment
-
doCreateAuthTarget
protected void doCreateAuthTarget(String site) throws IllegalStateException, org.springframework.web.client.RestClientException - Throws:
IllegalStateExceptionorg.springframework.web.client.RestClientException
-
doCreatePreviewTarget
protected void doCreatePreviewTarget(String site) throws IllegalStateException, org.springframework.web.client.RestClientException - Throws:
IllegalStateExceptionorg.springframework.web.client.RestClientException
-
getDeployTargetUrl
-
getCreateTargetUrl
- Specified by:
getCreateTargetUrlin classAbstractDeployer
-
getDeleteTargetUrl
- Specified by:
getDeleteTargetUrlin classAbstractDeployer
-
duplicateTargets
public void duplicateTargets(String sourceSiteId, String siteId) throws org.springframework.web.client.RestClientException Description copied from interface:DeployerCall Crafter Deployer API to duplicate the site targets- Parameters:
sourceSiteId- the site to duplicate fromsiteId- the new site id- Throws:
org.springframework.web.client.RestClientException- if an error occurs while calling Deployer API
-