Class CompositeDeployer

java.lang.Object
org.craftercms.studio.impl.v2.deployment.CompositeDeployer
All Implemented Interfaces:
Deployer

public class CompositeDeployer extends Object implements Deployer
Composite Deployer that calls createTargets(String) and deleteTargets(String) in multiple Deployers.

On create, if one of the Deployer fails, the targets that were created successfully previously are roll-backed (with deleteTargets(String)

  • Constructor Details

    • CompositeDeployer

      public CompositeDeployer(List<Deployer> deployers)
  • Method Details

    • createTargets

      public void createTargets(String site) throws org.springframework.web.client.RestClientException
      Description copied from interface: Deployer
      Calls a Crafter Deployer to create any necessary targets for the site.
      Specified by:
      createTargets in interface Deployer
      Parameters:
      site - the site
      Throws:
      org.springframework.web.client.RestClientException - if an error occurs
    • deleteTargets

      public void deleteTargets(String site) throws org.springframework.web.client.RestClientException
      Description copied from interface: Deployer
      Deletes the targets associated with the site.
      Specified by:
      deleteTargets in interface Deployer
      Parameters:
      site - the site
      Throws:
      org.springframework.web.client.RestClientException - if an error occurs
    • duplicateTargets

      public void duplicateTargets(String sourceSiteId, String siteId)
      Description copied from interface: Deployer
      Call Crafter Deployer API to duplicate the site targets
      Specified by:
      duplicateTargets in interface Deployer
      Parameters:
      sourceSiteId - the site to duplicate from
      siteId - the new site id