Search in sources :

Example 1 with CreateRepositoryParams

use of com.enonic.xp.repository.CreateRepositoryParams in project xp by enonic.

the class AuditLogRepoInitializer method initializeRepository.

private void initializeRepository() {
    final CreateRepositoryParams createRepositoryParams = CreateRepositoryParams.create().repositoryId(AuditLogConstants.AUDIT_LOG_REPO_ID).rootPermissions(AuditLogConstants.AUDIT_LOG_REPO_DEFAULT_ACL).build();
    this.repositoryService.createRepository(createRepositoryParams);
}
Also used : CreateRepositoryParams(com.enonic.xp.repository.CreateRepositoryParams)

Example 2 with CreateRepositoryParams

use of com.enonic.xp.repository.CreateRepositoryParams in project xp by enonic.

the class ContentInitializer method initializeRepository.

private void initializeRepository() {
    final CreateRepositoryParams createRepositoryParams = CreateRepositoryParams.create().repositoryId(repositoryId).data(data).rootPermissions(ContentConstants.CONTENT_REPO_DEFAULT_ACL).rootChildOrder(ContentConstants.DEFAULT_CONTENT_REPO_ROOT_ORDER).build();
    this.repositoryService.createRepository(createRepositoryParams);
}
Also used : CreateRepositoryParams(com.enonic.xp.repository.CreateRepositoryParams)

Example 3 with CreateRepositoryParams

use of com.enonic.xp.repository.CreateRepositoryParams in project xp by enonic.

the class SystemRepoInitializer method doInitialize.

@Override
public void doInitialize() {
    createAdminContext().runWith(() -> {
        final CreateRepositoryParams createRepositoryParams = CreateRepositoryParams.create().repositoryId(SystemConstants.SYSTEM_REPO_ID).rootChildOrder(ChildOrder.from("_name ASC")).rootPermissions(SystemConstants.SYSTEM_REPO_DEFAULT_ACL).build();
        this.repositoryService.createRepository(createRepositoryParams);
        initRepositoryFolder();
    });
}
Also used : CreateRepositoryParams(com.enonic.xp.repository.CreateRepositoryParams)

Example 4 with CreateRepositoryParams

use of com.enonic.xp.repository.CreateRepositoryParams in project xp by enonic.

the class DumpServiceImplTest method doCreateRepository.

private Repository doCreateRepository(final RepositoryId repositoryId, final AccessControlList permissions, final ChildOrder childOrder) {
    final CreateRepositoryParams params = CreateRepositoryParams.create().repositoryId(repositoryId).data(new PropertyTree()).build();
    this.nodeRepositoryService.create(params);
    final Repository createRepositoryParams = Repository.create().id(repositoryId).branches(Branches.from(RepositoryConstants.MASTER_BRANCH)).build();
    this.repositoryEntryService.createRepositoryEntry(createRepositoryParams);
    final Repository repo = this.repositoryEntryService.getRepositoryEntry(repositoryId);
    createRootNode(repositoryId, permissions, childOrder);
    return repo;
}
Also used : CreateRepositoryParams(com.enonic.xp.repository.CreateRepositoryParams) Repository(com.enonic.xp.repository.Repository) PropertyTree(com.enonic.xp.data.PropertyTree)

Example 5 with CreateRepositoryParams

use of com.enonic.xp.repository.CreateRepositoryParams in project xp by enonic.

the class SchedulerRepoInitializer method initializeRepository.

private void initializeRepository() {
    final CreateRepositoryParams createRepositoryParams = CreateRepositoryParams.create().repositoryId(SchedulerConstants.SCHEDULER_REPO_ID).rootPermissions(SchedulerConstants.SCHEDULER_REPO_DEFAULT_ACL).build();
    this.repositoryService.createRepository(createRepositoryParams);
}
Also used : CreateRepositoryParams(com.enonic.xp.repository.CreateRepositoryParams)

Aggregations

CreateRepositoryParams (com.enonic.xp.repository.CreateRepositoryParams)9 Repository (com.enonic.xp.repository.Repository)3 PropertyTree (com.enonic.xp.data.PropertyTree)1 RepositoryMapper (com.enonic.xp.lib.repo.mapper.RepositoryMapper)1 RepositoryService (com.enonic.xp.repository.RepositoryService)1 RepositorySettings (com.enonic.xp.repository.RepositorySettings)1