/**
  * Populate content for short haul.
  *
  * @param target the target
  * @param leg the leg
  */
 private void populateContentForShortHaul(final ContentViewData target, final Leg leg) {
   if (StringUtil.isNotEquals(
       durationHaulTypeService.findHaultypeForAirports(
           leg.getArrivalAirport().getCode(), leg.getDepartureAirport().getCode()),
       "LH")) {
     final List<DynamicContentConfigModel> dynamicContents =
         genericContentService.getDynamicContentConfig("FM", StringUtils.EMPTY, StringUtils.EMPTY);
     getDynamicContents(target, dynamicContents);
   }
 }
コード例 #2
0
  /**
   * Gets the description from content.
   *
   * @param key the key
   * @param value the value
   * @return the description
   */
  private String getDescription(final String key, final String... value) {
    final Map<String, String> summaryContentMap = staticContentServ.getSummaryContents();

    if (StringUtils.isNotEmpty(key)) {
      final String summaryContent = summaryContentMap.get(key);
      if (SyntacticSugar.isNotNull(summaryContent)) {
        if (SyntacticSugar.isEmpty(value)) {
          return summaryContent;
        }
        return StringUtil.substitute(summaryContent, value);
      }
    }
    return StringUtils.EMPTY;
  }