Codota Logo
SitemapRequestDto.toBuilder
Code IndexAdd Codota to your IDE (free)

How to use
toBuilder
method
in
com.sdl.dxa.common.dto.SitemapRequestDto

Best Java code snippets using com.sdl.dxa.common.dto.SitemapRequestDto.toBuilder (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: com.sdl.dxa/dxa-tridion-common

/**
 * Ancestors for a page is a list of same ROOT node with different children.
 * Basically, these different ROOTs (with same ID, because we are still within one taxonomy) contain
 * different children for different paths your page may be in.
 * <p>Unless other methods for descendants, this method returns {@link List} because the root Taxonomies will be the same object
 * even if page is in multiple places.</p>
 *
 * @param uris       URIs of your current context taxonomy node
 * @param requestDto current request data
 * @return a list of roots of taxonomy with different paths for items
 */
@NotNull
private List<SitemapItemModelData> collectAncestorsForPage(@NotNull TaxonomyUrisHolder uris, @NotNull SitemapRequestDto requestDto) {
  if (!uris.isPage()) {
    throw new IllegalArgumentException(String.format("Method for pages was called for not a page! uris: %s, request: %s", uris, requestDto));
  }
  TaxonomyFilter depthFilter = new DepthFilter(DepthFilter.UNLIMITED_DEPTH, DepthFilter.FILTER_UP);
  Keyword[] keywords = getRelationTaxonomyKeywords(uris, depthFilter);
  if (keywords == null || keywords.length == 0) {
    log.debug("Page {} is not classified in taxonomy {}", uris.getPageUri(), uris.getTaxonomyUri());
    return Collections.emptyList();
  }
  return Arrays.stream(keywords)
      .map(keyword -> createTaxonomyNode(keyword, requestDto.toBuilder().expandLevels(DepthCounter.UNLIMITED_DEPTH).build()))
      .collect(Collectors.toList());
}
origin: com.sdl.dxa/dxa-common

public synchronized SitemapRequestDto nextExpandLevel() {
  return this.toBuilder().expandLevels(new DepthCounter(expandLevels.getCounter() - 1)).build();
}
origin: com.sdl.dxa/dxa-tridion-common

/**
 * One single ancestor for a given keyword. Although same keyword may be in few places, we don't expect it due to
 * technical limitation in CME. So basically we ignore the fact that keyword may be in many places (like page) and
 * expect only a single entry. Because of that we have only one taxonomy root for Keyword's ancestors.
 *
 * @param uris       URIs of your current context taxonomy node
 * @param requestDto current request data
 * @return root of a taxonomy
 */
@NotNull
private Optional<SitemapItemModelData> expandAncestorsForKeyword(TaxonomyUrisHolder uris, SitemapRequestDto requestDto) {
  if (!uris.isKeyword()) {
    throw new IllegalArgumentException(String.format("Method for keywords was called for not a keyword! uris: %s, request: %s", uris, requestDto));
  }
  TaxonomyFilter depthFilter = new DepthFilter(DepthFilter.UNLIMITED_DEPTH, DepthFilter.FILTER_UP);
  Keyword taxonomyRoot = taxonomyFactory.getTaxonomyKeywords(uris.getTaxonomyUri(), depthFilter, uris.getKeywordUri());
  if (taxonomyRoot == null) {
    log.warn("Keyword {} in taxonomy {} wasn't found", uris.getKeywordUri(), uris.getTaxonomyUri());
    return Optional.empty();
  }
  return Optional.of(createTaxonomyNode(taxonomyRoot, requestDto.toBuilder().expandLevels(DepthCounter.UNLIMITED_DEPTH).build()));
}
origin: com.sdl.dxa/dxa-tridion-common

log.trace("Original sitemapRequestDto {}", requestDto);
SitemapRequestDto request = requestDto.toBuilder()
    .expandLevels(new DepthCounter(requestDto.getNavigationFilter().getDescendantLevels()))
    .build();
com.sdl.dxa.common.dtoSitemapRequestDtotoBuilder

Popular methods of SitemapRequestDto

  • getLocalizationId
  • getNavigationFilter
  • getSitemapId
  • builder
  • getExpandLevels
  • hiddenBuilder
  • nextExpandLevel
  • wholeTree

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now