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

tech.jhipster.lite.module.infrastructure.primary.RestJHipsterModulePropertiesDefinition 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 java.util.Collection;
import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition;

@Schema(name = "JHipsterModulePropertiesDefinition", description = "Definition for module properties")
final class RestJHipsterModulePropertiesDefinition {

  private final Collection definitions;

  private RestJHipsterModulePropertiesDefinition(Collection definitions) {
    this.definitions = definitions;
  }

  static RestJHipsterModulePropertiesDefinition from(JHipsterModulePropertiesDefinition propertiesDefinition) {
    return new RestJHipsterModulePropertiesDefinition(
      propertiesDefinition.stream().map(RestJHipsterModulePropertyDefinition::from).toList()
    );
  }

  @Schema(description = "Definition of the properties for a module")
  public Collection getDefinitions() {
    return definitions;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy