Class PreviewDeployer

  • All Implemented Interfaces:
    Deployer

    public class PreviewDeployer
    extends AbstractDeployer
    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
    • Constructor Detail

      • PreviewDeployer

        public PreviewDeployer()
    • Method Detail

      • onSiteCreateComplete

        @EventListener
        public void onSiteCreateComplete​(SiteEvent event)
      • onRepositorySyncComplete

        @Order(20)
        @EventListener
        public void onRepositorySyncComplete​(RepositoryEvent event)
      • onContentChange

        @EventListener
        public void onContentChange​(ContentEvent event)
      • doPreviewSync

        protected void doPreviewSync​(String siteId,
                                     boolean waitTillDone)
      • 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.
        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.
        Parameters:
        site - the site
        Throws:
        org.springframework.web.client.RestClientException - if an error occurs
      • doDeployment

        protected void doDeployment​(String site,
                                    String environment,
                                    boolean waitTillDone)
      • doCreatePreviewTarget

        protected void doCreatePreviewTarget​(String site)
                                      throws IllegalStateException,
                                             org.springframework.web.client.RestClientException
        Throws:
        IllegalStateException
        org.springframework.web.client.RestClientException
      • getDeployTargetUrl

        protected String getDeployTargetUrl​(String site,
                                            String environment)