public AlertTemplate getTemplate(String type) {
      for (AlertTemplate template : m_templates) {
        if (type.equals(template.getType())) {
          return template;
        }
      }

      return null;
    }
Gets the alert template given the specified template type.

@param type
         the template type.
@return the template, or {@code null} if none.
@see AlertTargetEntity#getNotificationType()
ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java