public static void deployStreams(DeployableTemplate template) {
   if (template.getStreams() != null) {
     for (String stream : template.getStreams()) {
       StreamDefinition streamDefinition = null;
       try {
         streamDefinition = EventDefinitionConverterUtils.convertFromJson(stream);
         BatchScriptDeployerValueHolder.getEventStreamService()
             .addEventStreamDefinition(streamDefinition);
       } catch (MalformedStreamDefinitionException e) {
         log.error("Stream definition is incorrect in domain template " + stream, e);
       } catch (EventStreamConfigurationException e) {
         log.error("Exception occurred when configuring stream " + streamDefinition.getName(), e);
       } catch (StreamDefinitionAlreadyDefinedException e) {
         log.error(
             "Same template stream name "
                 + streamDefinition.getName()
                 + " has been defined for another definition ",
             e);
         throw e;
       }
     }
   }
 }