Class ServerlessDeliveryDeployer
java.lang.Object
org.craftercms.studio.impl.v2.deployment.AbstractDeployer
org.craftercms.studio.impl.v2.deployment.ServerlessDeliveryDeployer
- All Implemented Interfaces:
Deployer
Implementation of
Deployer that interacts with the Serverless
Delivery Deployer, only if serverless delivery is enabled.- 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
ConstructorsConstructorDescriptionServerlessDeliveryDeployer(StudioConfiguration studioConfiguration, org.craftercms.commons.rest.RestTemplate restTemplate) -
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.voidduplicateTargets(String sourceSiteId, String siteId) Call Crafter Deployer API to duplicate the site targetsprotected Stringprotected StringgetDeleteTargetUrl(String site, String environment) getSourceTemplateParams(String sourceSiteId) Get a source site parameters Map to pass to the target template.protected booleanMethods inherited from class org.craftercms.studio.impl.v2.deployment.AbstractDeployer
addAdditionalParams, addChildParams, doCreateTarget, doDeleteTarget, doDuplicateTarget, getCreateTargetRequestBody, getDuplicateTargetRequestBody, getDuplicateTargetUrl, getRepoUrl
-
Constructor Details
-
ServerlessDeliveryDeployer
public ServerlessDeliveryDeployer(StudioConfiguration studioConfiguration, org.craftercms.commons.rest.RestTemplate restTemplate)
-
-
Method Details
-
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
-
duplicateTargets
Description copied from interface:DeployerCall Crafter Deployer API to duplicate the site targets- Parameters:
sourceSiteId- the site to duplicate fromsiteId- the new site id
-
getSourceTemplateParams
Description copied from class:AbstractDeployerGet a source site parameters Map to pass to the target template. This is useful for deployer to get context on the duplicate source site- Overrides:
getSourceTemplateParamsin classAbstractDeployer- Parameters:
sourceSiteId- the source site to duplicate from- Returns:
- a
Mapcontaining the parameters
-
getCreateTargetUrl
- Specified by:
getCreateTargetUrlin classAbstractDeployer
-
getDeleteTargetUrl
- Specified by:
getDeleteTargetUrlin classAbstractDeployer
-
isServerlessDeliveryEnabled
protected boolean isServerlessDeliveryEnabled()
-