use of com.enonic.xp.lib.repo.mapper.RepositoryMapper in project xp by enonic.
the class ModifyRepositoryHandler method editRepository.
private void editRepository(EditableRepository target) {
final ScriptValue value = this.editor.call(new RepositoryMapper(target.source));
updateRepositoryData(target, value);
}
use of com.enonic.xp.lib.repo.mapper.RepositoryMapper in project xp by enonic.
the class ModifyRepositoryHandler method execute.
public RepositoryMapper execute() {
final RepositoryId repositoryId = RepositoryId.from(id);
final UpdateRepositoryParams updateRepositoryParams = UpdateRepositoryParams.create().repositoryId(repositoryId).editor(this::editRepository).build();
return new RepositoryMapper(repositoryServiceSupplier.get().updateRepository(updateRepositoryParams));
}
use of com.enonic.xp.lib.repo.mapper.RepositoryMapper in project xp by enonic.
the class CreateRepositoryHandler method execute.
public RepositoryMapper execute() {
final RepositorySettings repositorySettings = RepositorySettings.create().indexDefinitions(indexDefinitions).build();
final CreateRepositoryParams createRepositoryParams = CreateRepositoryParams.create().repositoryId(repositoryId).repositorySettings(repositorySettings).rootPermissions(rootPermissions).rootChildOrder(rootChildOrder).build();
final Repository repository = repositoryServiceSupplier.get().createRepository(createRepositoryParams);
return repository == null ? null : new RepositoryMapper(repository);
}
Aggregations