private CookieValueNamedValueInfo(CookieValue annotation) { super(annotation.name(), annotation.required(), annotation.defaultValue()); } }
private CookieValueNamedValueInfo(CookieValue annotation) { super(annotation.name(), annotation.required(), annotation.defaultValue()); } }
private CookieValueNamedValueInfo(CookieValue annotation) { super(annotation.name(), annotation.required(), annotation.defaultValue()); } }
@Override protected void fillParameter(Object annotation, OperationGenerator operationGenerator, int paramIdx, CookieParameter parameter) { super.fillParameter(annotation, operationGenerator, paramIdx, parameter); Object defaultValue = parameter.getDefaultValue(); if (!ObjectUtils.isEmpty(defaultValue)) { parameter.setRequired(false); return; } CookieValue cookie = (CookieValue) annotation; parameter.setRequired(cookie.required()); }
private CookieParameter extractCookieValue(Type type, CookieValue cookieValue) { String paramName = StringUtils.defaultIfEmpty(cookieValue.value(), cookieValue.name()); CookieParameter cookieParameter = new CookieParameter().name(paramName) .required(cookieValue.required()); Property schema = readAsPropertyIfPrimitive(type); if (!DEFAULT_VALUE.equals(cookieValue.defaultValue())) { cookieParameter.setDefaultValue(cookieValue.defaultValue()); cookieParameter.setRequired(false); } if (schema != null) { cookieParameter.setProperty(schema); } return cookieParameter; }
@Override protected void fillParameter(Object annotation, OperationGenerator operationGenerator, int paramIdx, CookieParameter parameter) { super.fillParameter(annotation, operationGenerator, paramIdx, parameter); CookieValue cookie = (CookieValue) annotation; parameter.setRequired(cookie.required()); }
private CookieValueNamedValueInfo(CookieValue annotation) { super(annotation.name(), annotation.required(), annotation.defaultValue()); } }
private CookieValueNamedValueInfo(CookieValue annotation) { super(annotation.name(), annotation.required(), annotation.defaultValue()); } }
private CookieValueNamedValueInfo(CookieValue annotation) { super(annotation.name(), annotation.required(), annotation.defaultValue()); } }
@Override boolean doCollect(ApiParamObject apiParamObject, AnnotatedElement element) { CookieValue cookieValue = element.getAnnotation(CookieValue.class); if (cookieValue == null) { return false; } String name = null; if (StringUtils.hasText(cookieValue.value())) { name = cookieValue.value(); } if (StringUtils.hasText(cookieValue.name())) { name = cookieValue.name(); } apiParamObject.setName(name); boolean required = cookieValue.required(); apiParamObject.setRequired(required); String paramSample = cookieValue.defaultValue(); if (StringUtils.hasText(paramSample)) { if (ValueConstants.DEFAULT_NONE.equals(paramSample)) { paramSample = ""; } apiParamObject.setSample(paramSample); } return true; } },
required = cookieParam.required(); parameterName = cookieParam.value(); if (parameterName.isEmpty()) {
this.name = cookieValue.value(); this.required = cookieValue.required(); this.defaultValue = ValueConstants.DEFAULT_NONE.equals( cookieValue.defaultValue()) ? null : cookieValue.defaultValue();
CookieValue cookieValue = (CookieValue) paramAnn; cookieName = cookieValue.name(); required = cookieValue.required(); defaultValue = parseDefaultValueAttribute(cookieValue.defaultValue()); annotationsFound++;