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 TypeMethodDescriptionvoid
createTargets
(String site) Calls a Crafter Deployer to create any necessary targets for the site.void
deleteTargets
(String site) Deletes the targets associated with the site.void
duplicateTargets
(String sourceSiteId, String siteId) Call Crafter Deployer API to duplicate the site targetsprotected String
protected String
getDeleteTargetUrl
(String site, String environment) getSourceTemplateParams
(String sourceSiteId) Get a source site parameters Map to pass to the target template.protected boolean
Methods 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:Deployer
Calls 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:Deployer
Deletes 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:Deployer
Call Crafter Deployer API to duplicate the site targets- Parameters:
sourceSiteId
- the site to duplicate fromsiteId
- the new site id
-
getSourceTemplateParams
Description copied from class:AbstractDeployer
Get 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:
getSourceTemplateParams
in classAbstractDeployer
- Parameters:
sourceSiteId
- the source site to duplicate from- Returns:
- a
Map
containing the parameters
-
getCreateTargetUrl
- Specified by:
getCreateTargetUrl
in classAbstractDeployer
-
getDeleteTargetUrl
- Specified by:
getDeleteTargetUrl
in classAbstractDeployer
-
isServerlessDeliveryEnabled
protected boolean isServerlessDeliveryEnabled()
-