com.cosium.hal_mock_mvc.TemplateProperty Maven / Gradle / Ivy
The newest version!
package com.cosium.hal_mock_mvc;
import static java.util.Objects.requireNonNull;
import com.cosium.hal_mock_mvc.template.options.OptionsRepresentation;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import java.util.regex.Pattern;
/**
* @author Réda Housni Alaoui
*/
class TemplateProperty {
private static final Set STRING_HAL_FORMS_TYPES =
Set.of(
"hidden",
"text",
"textarea",
"search",
"tel",
"url",
"email",
"password",
"date",
"time",
"datetime-local",
"range",
"color");
private static final Set NUMBER_HAL_FORMS_TYPES = Set.of("month", "week", "number");
private final RequestExecutor requestExecutor;
private final ObjectMapper objectMapper;
private final TemplatePropertyRepresentation representation;
TemplateProperty(
RequestExecutor requestExecutor,
ObjectMapper objectMapper,
TemplatePropertyRepresentation representation) {
this.requestExecutor = requireNonNull(requestExecutor);
this.objectMapper = requireNonNull(objectMapper);
this.representation = requireNonNull(representation);
}
public String name() {
return representation.name();
}
public Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy