The following document contains the results of PMD's CPD 6.55.0.

Duplications

File Line
io/wcm/handler/url/impl/modes/FullUrlForceNonSecureUrlMode.java 76
io/wcm/handler/url/impl/modes/FullUrlForceSecureUrlMode.java 77
return config.getSiteUrl();
  }

  @SuppressWarnings("deprecation")
  @Override
  public String getResourceUrlPrefix(@NotNull Adaptable adaptable, @NotNull Set<String> runModes,
      @Nullable Page currentPage, @Nullable Resource targetResource) {

    // if integrator template mode with placeholders is active return resource url placeholder
    IntegratorHandler integratorHandler = AdaptTo.notNull(adaptable, IntegratorHandler.class);
    if (integratorHandler.isIntegratorTemplateMode()
        && integratorHandler.getIntegratorMode().isUseUrlPlaceholders()) {
      return IntegratorPlaceholder.URL_CONTENT_PROXY;
    }

    UrlConfig config = getUrlConfigForTarget(adaptable, targetResource);

    // in author mode return author site url
    if (!forcePublish && RunMode.isAuthor(runModes) && config.hasSiteUrlAuthor()) {
      return config.getSiteUrlAuthor();
    }

    // return non-secure site url
    return config.getSiteUrl();
File Line
io/wcm/handler/url/impl/modes/FullUrlForceNonSecureUrlMode.java 76
io/wcm/handler/url/impl/modes/FullUrlForceSecureUrlMode.java 77
io/wcm/handler/url/impl/modes/FullUrlProtocolRelativeUrlMode.java 86
return config.getSiteUrl();
  }

  @SuppressWarnings("deprecation")
  @Override
  public String getResourceUrlPrefix(@NotNull Adaptable adaptable, @NotNull Set<String> runModes,
      @Nullable Page currentPage, @Nullable Resource targetResource) {

    // if integrator template mode with placeholders is active return resource url placeholder
    IntegratorHandler integratorHandler = AdaptTo.notNull(adaptable, IntegratorHandler.class);
    if (integratorHandler.isIntegratorTemplateMode()
        && integratorHandler.getIntegratorMode().isUseUrlPlaceholders()) {
      return IntegratorPlaceholder.URL_CONTENT_PROXY;
    }

    UrlConfig config = getUrlConfigForTarget(adaptable, targetResource);

    // in author mode return author site url
    if (!forcePublish && RunMode.isAuthor(runModes) && config.hasSiteUrlAuthor()) {
      return config.getSiteUrlAuthor();
    }

    // return non-secure site url
    return config.getSiteUrl();
File Line
io/wcm/handler/url/impl/modes/FullUrlForceNonSecureUrlMode.java 77
io/wcm/handler/url/impl/modes/FullUrlForceSecureUrlMode.java 78
io/wcm/handler/url/impl/modes/FullUrlProtocolRelativeUrlMode.java 87
io/wcm/handler/url/impl/modes/FullUrlUrlMode.java 91
}

  @SuppressWarnings("deprecation")
  @Override
  public String getResourceUrlPrefix(@NotNull Adaptable adaptable, @NotNull Set<String> runModes,
      @Nullable Page currentPage, @Nullable Resource targetResource) {

    // if integrator template mode with placeholders is active return resource url placeholder
    IntegratorHandler integratorHandler = AdaptTo.notNull(adaptable, IntegratorHandler.class);
    if (integratorHandler.isIntegratorTemplateMode()
        && integratorHandler.getIntegratorMode().isUseUrlPlaceholders()) {
      return IntegratorPlaceholder.URL_CONTENT_PROXY;
    }

    UrlConfig config = getUrlConfigForTarget(adaptable, targetResource);

    // in author mode return author site url
    if (!forcePublish && RunMode.isAuthor(runModes) && config.hasSiteUrlAuthor()) {
      return config.getSiteUrlAuthor();
    }

Back to top

Version: 2.1.1-SNAPSHOT. Last Published: 2024-03-21.