public JobDetail promoteContent(
@PathParam("env_id") @Verify(Environment.class) String envId,
List<EnvironmentContent> contentToPromote,
@QueryParam("lazy_regen") @DefaultValue("true") Boolean lazyRegen) {
Environment env = lookupEnvironment(envId);
Set<String> contentIds = new HashSet<String>();
for (EnvironmentContent promoteMe : contentToPromote) {
// Make sure the content exists:
promoteMe.setContentId(promoteMe.getContentId());
promoteMe.setEnvironment(env);
envContentCurator.create(promoteMe);
env.getEnvironmentContent().add(promoteMe);
contentIds.add(promoteMe.getContentId());
}
JobDataMap map = new JobDataMap();
map.put(RegenEnvEntitlementCertsJob.ENV, env);