Search in sources :

Example 61 with RepositoryId

use of com.enonic.xp.repository.RepositoryId 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;
}
Also used : Branch(com.enonic.xp.branch.Branch) ContentPath(com.enonic.xp.content.ContentPath) RepositoryId(com.enonic.xp.repository.RepositoryId) PortalRequest(com.enonic.xp.portal.PortalRequest)

Aggregations

RepositoryId (com.enonic.xp.repository.RepositoryId)61 Test (org.junit.jupiter.api.Test)21 AbstractNodeTest (com.enonic.xp.repo.impl.node.AbstractNodeTest)19 Branch (com.enonic.xp.branch.Branch)14 Repository (com.enonic.xp.repository.Repository)11 Node (com.enonic.xp.node.Node)9 ByteSource (com.google.common.io.ByteSource)8 IOException (java.io.IOException)7 PropertyTree (com.enonic.xp.data.PropertyTree)6 Segment (com.enonic.xp.blob.Segment)5 Context (com.enonic.xp.context.Context)5 ContextAccessor (com.enonic.xp.context.ContextAccessor)5 ContextBuilder (com.enonic.xp.context.ContextBuilder)5 BlobKey (com.enonic.xp.blob.BlobKey)4 EventPublisher (com.enonic.xp.event.EventPublisher)4 BinaryAttachment (com.enonic.xp.node.BinaryAttachment)4 Project (com.enonic.xp.project.Project)4 DumpConstants (com.enonic.xp.repo.impl.dump.DumpConstants)4 DumpBlobRecord (com.enonic.xp.repo.impl.dump.blobstore.DumpBlobRecord)4 RepositoryIds (com.enonic.xp.repository.RepositoryIds)4