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

tech.jhipster.lite.module.infrastructure.primary.RestJHipsterLandscapeLevel 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.JHipsterLandscapeLevel;

@Schema(name = "JHipsterLandscapeLevel", description = "One level in the module landscape")
final class RestJHipsterLandscapeLevel {

  private final Collection elements;

  private RestJHipsterLandscapeLevel(Collection elements) {
    this.elements = elements;
  }

  static RestJHipsterLandscapeLevel from(JHipsterLandscapeLevel level) {
    return new RestJHipsterLandscapeLevel(level.elements().stream().map(RestJHipsterLandscapeElement::from).toList());
  }

  @Schema(description = "Elements in this level", requiredMode = RequiredMode.REQUIRED)
  public Collection getElements() {
    return elements;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy