/** * Retrieves the minLength of a property * * @return the minLength of the property */ public Optional<Integer> getMinlength() { if (property instanceof StringProperty) { StringProperty stringProperty = (StringProperty) property; return Optional.ofNullable(stringProperty.getMinLength()); } else if (property instanceof UUIDProperty) { UUIDProperty uuidProperty = (UUIDProperty) property; return Optional.ofNullable(uuidProperty.getMinLength()); } return Optional.empty(); }
/** * Retrieves the minLength of a property * * @return the minLength of the property */ public Optional<Integer> getMinlength() { if (property instanceof StringProperty) { StringProperty stringProperty = (StringProperty) property; return Optional.ofNullable(stringProperty.getMinLength()); } else if (property instanceof UUIDProperty) { UUIDProperty uuidProperty = (UUIDProperty) property; return Optional.ofNullable(uuidProperty.getMinLength()); } return Optional.empty(); }
payload.append("citrus:randomEnumValue(").append(((StringProperty) property).getEnum().stream().map(value -> "'" + value + "'").collect(Collectors.joining(","))).append(")"); } else { payload.append("citrus:randomString(").append(((StringProperty) property).getMaxLength() != null && ((StringProperty) property).getMaxLength() > 0 ? ((StringProperty) property).getMaxLength() : (((StringProperty) property).getMinLength() != null && ((StringProperty) property).getMinLength() > 0 ? ((StringProperty) property).getMinLength() : 10)).append(")");
break; case "minLength": _switchResult = prop.getMinLength(); break; case "maxLength":
public EmailProperty(StringProperty prop) { this(); this._enum = prop.getEnum(); this.minLength = prop.getMinLength(); this.maxLength = prop.getMaxLength(); this.pattern = prop.getPattern(); this.name = prop.getName(); this.type = prop.getType(); this.example = prop.getExample(); this._default = prop.getDefault(); this.xml = prop.getXml(); this.required = prop.getRequired(); this.position = prop.getPosition(); this.description = prop.getDescription(); this.title = prop.getTitle(); this.readOnly = prop.getReadOnly(); }
StringProperty sp = (StringProperty) schema; result.setMinLength(sp.getMinLength()); result.setMaxLength(sp.getMaxLength()); result.setPattern(sp.getPattern());
StringProperty sp = (StringProperty) schema; result.setMinLength(sp.getMinLength()); result.setMaxLength(sp.getMaxLength()); result.setPattern(sp.getPattern());
StringProperty sp = (StringProperty) schema; result.setMinLength(sp.getMinLength()); result.setMaxLength(sp.getMaxLength()); result.setPattern(sp.getPattern());
StringProperty stringProperty = (StringProperty) property; model.setPattern(stringProperty.getPattern()); model.setMinLength(stringProperty.getMinLength()); model.setMaxLength(stringProperty.getMaxLength()); model.setEnum(stringProperty.getEnum());