All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.jhipster.lite.module.infrastructure.primary.RestJHipsterLandscape Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package tech.jhipster.lite.module.infrastructure.primary;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import java.util.Collection;
import tech.jhipster.lite.module.domain.landscape.JHipsterLandscape;

@Schema(name = "JHipsterLandscape", description = "Landscape of modules in JHipster")
final class RestJHipsterLandscape {

  private final Collection levels;

  private RestJHipsterLandscape(Collection levels) {
    this.levels = levels;
  }

  static RestJHipsterLandscape from(JHipsterLandscape landscape) {
    return new RestJHipsterLandscape(landscape.levels().stream().map(RestJHipsterLandscapeLevel::from).toList());
  }

  @Schema(description = "Levels in the landscape", requiredMode = RequiredMode.REQUIRED)
  public Collection getLevels() {
    return levels;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy