use of com.enonic.xp.branch.Branch in project xp by enonic.
the class BaseSiteHandler method doCreatePortalRequest.
protected PortalRequest doCreatePortalRequest(final WebRequest webRequest, final String baseUri, final String baseSubPath) {
final RepositoryId repositoryId = findRepository(baseSubPath);
final Branch branch = findBranch(baseSubPath);
final ContentPath contentPath = findContentPath(baseSubPath);
final PortalRequest portalRequest = new PortalRequest(webRequest);
portalRequest.setBaseUri(baseUri);
portalRequest.setRepositoryId(repositoryId);
portalRequest.setBranch(branch);
portalRequest.setContentPath(contentPath);
return portalRequest;
}
use of com.enonic.xp.branch.Branch in project xp by enonic.
the class LoadRunnableTask method importRepoBranches.
private RepoLoadResult importRepoBranches(final Path rootDir, final Repository repository) {
final RepoLoadResult.Builder builder = RepoLoadResult.create(repository.getId());
for (Branch branch : repository.getBranches()) {
if (isSystemRepoMaster(repository, branch)) {
continue;
}
final NodeImportResult nodeImportResult = importRepoBranch(repository.getId().toString(), branch.getValue(), rootDir);
builder.add(NodeImportResultTranslator.translate(nodeImportResult, branch));
}
return builder.build();
}
Aggregations