public void unpublish(DeploymentArtifact artifact, EzSecurityToken callerToken)
     throws DeploymentException {
   EzPublisher publisher = publishers.get(getType(artifact));
   publisher.unpublish(artifact, callerToken);
   // if artifact is purgable remove it from the zookeeper purgeable list
   if (artifact.getMetadata().getManifest().getArtifactInfo().isPurgeable()) {
     unsetPurgeable(artifact);
   }
 }
 /**
  * This will publish the artifact to the correct PaaS, based on the metadata contained in the
  * param.
  *
  * <p>SSLCerts will be injected into the application tar ball at this time.
  *
  * @param artifact - The artifact to deploy
  * @throws DeploymentException - on any exception
  */
 public void publish(DeploymentArtifact artifact, EzSecurityToken callerToken)
     throws DeploymentException {
   fillInExtraFiles(artifact);
   registerSecurityIDWithServiceDiscovery(artifact.getMetadata());
   EzPublisher publisher = publishers.get(getType(artifact));
   // If something is a dataset, the publisher should already be an EzDataSetPublisher, but we also
   // allow apps that aren't datasets to get a database, so we need to use the DataSet publisher
   // there too
   if (ArtifactHelpers.getType(artifact) != ArtifactType.DataSet
       && artifact.getMetadata().getManifest().isSetDatabaseInfo()) {
     EzDataSetPublisher dataSetPublisher =
         new EzDataSetPublisher(publisher, possibleSetups, configuration);
     dataSetPublisher.publish(artifact, callerToken);
   } else {
     publisher.publish(artifact, callerToken);
   }
   // if artifact is purgable add it to the zookeeper purgeable list
   if (artifact.getMetadata().getManifest().getArtifactInfo().isPurgeable()) {
     setPurgeable(artifact);
   }
 }