use of com.enonic.xp.repository.RepositoryIds in project xp by enonic.
the class IndexResource method updateSettings.
@POST
@Path("updateSettings")
public UpdateIndexSettingsResultJson updateSettings(final UpdateIndexSettingsRequestJson request) {
final RepositoryIds.Builder repositoryIds = RepositoryIds.create();
if (!isNullOrEmpty(request.repositoryId)) {
repositoryIds.add(RepositoryId.from(request.repositoryId));
} else {
repositoryIds.addAll(this.repositoryService.list().getIds());
}
final UpdateIndexSettingsResult result = this.indexService.updateIndexSettings(UpdateIndexSettingsParams.create().repositories(repositoryIds.build()).settings(request.settings.toString()).requireClosedIndex(request.requireClosedIndex).build());
return UpdateIndexSettingsResultJson.create(result);
}
Aggregations