![JAR search and dependency download from the Maven repository](/logo.png)
net.savantly.sprout.module.content.model.webPageLayout.WebPageLayoutFixture Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sprout-modules-content Show documentation
Show all versions of sprout-modules-content Show documentation
Provides dynamic content management for the Sprout Platform
The newest version!
package net.savantly.sprout.module.content.model.webPageLayout;
import java.util.List;
import net.savantly.spring.fixture.AbstractBaseFixture;
import net.savantly.spring.fixture.Fixture;
public class WebPageLayoutFixture extends AbstractBaseFixture {
private WebPageLayoutRepository repository;
public static final String defaultWebPageLayoutName = "Default WebPageLayout";
public WebPageLayoutFixture(WebPageLayoutRepository repository) {
super(repository);
this.repository = repository;
}
@Override
public void addEntities(List entityList) {
WebPageLayout webPageLayout = repository.findOneByName(defaultWebPageLayoutName);
if (webPageLayout == null) {
webPageLayout = new WebPageLayout();
webPageLayout.setName(defaultWebPageLayoutName);
webPageLayout.setDescription("Simple 3 column layout");
webPageLayout.getPlaceHolders().add("leftSide");
webPageLayout.getPlaceHolders().add("center");
webPageLayout.getPlaceHolders().add("rightSide");
webPageLayout.setTemplate("${leftSide!}${center!}${rightSide!}");
entityList.add(webPageLayout);
}
}
@Override
public void addDependencies(List> dependencies) {
// TODO Auto-generated method stub
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy