Package br.com.caelum.tubaina.builder

Source Code of br.com.caelum.tubaina.builder.SectionBuilder

package br.com.caelum.tubaina.builder;

import java.util.List;

import br.com.caelum.tubaina.Section;
import br.com.caelum.tubaina.SectionsManager;
import br.com.caelum.tubaina.resources.Resource;

public class SectionBuilder {

  private final String sectionTitle;

  private final String sectionContent;

  private final List<Resource> resources;

  private final SectionsManager sectionsManager;

  public SectionBuilder(String sectionTitle, String sectionContent, List<Resource> resources, SectionsManager sectionsManager) {
    this.sectionTitle = sectionTitle;
    this.sectionContent = sectionContent;
    this.resources = resources;
    this.sectionsManager = sectionsManager;
  }

  public Section build() {
    return new Section(sectionTitle, new ChunkSplitter(resources, "all", sectionsManager).splitChunks(sectionContent));
  }
}
TOP

Related Classes of br.com.caelum.tubaina.builder.SectionBuilder

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.