Class CandidateTargetedUrlsResolverImpl

java.lang.Object
org.craftercms.engine.targeting.impl.CandidateTargetedUrlsResolverImpl
All Implemented Interfaces:
CandidateTargetedUrlsResolver

public class CandidateTargetedUrlsResolverImpl extends Object implements CandidateTargetedUrlsResolver
Default implementation of CandidateTargetedUrlsResolverImpl, that works by first extracting the root folder URL of the targeted URL, then calling TargetedUrlStrategy.parseTargetedUrl(String) with the relative URL, and finally build the candidate targeted URLs based on the candidate target IDs returned by CandidateTargetIdsResolver.getTargetIds(String, String).
Author:
avasquez
  • Field Details

  • Constructor Details

  • Method Details

    • getUrls

      public List<String> getUrls(String targetedUrl)
      Description copied from interface: CandidateTargetedUrlsResolver
      Resolves all the candidate targeted URLs that should be used for a given targeted URL when attempting content resolution. For example, if the targeted URL is /products/index_en_US.xml, that candidate URL list could look like this: /products/index_en_US.xml, /products/index_en.xml, and /products/index.xml.
      Specified by:
      getUrls in interface CandidateTargetedUrlsResolver
      Parameters:
      targetedUrl - the targeted URL used to generate the candidate URLs
      Returns:
      the list of candidate targeted URLs.