@Override public String getValueOf(CookieParam a) { return a.value(); }
@Override public String getValueOf(CookieParam a) { return a.value(); }
@Override public String getValueOf(CookieParam a) { return a.value(); }
/** * Derives member's name and type from it's annotations */ public static Optional<String> getParameterNameFromAnnotations(Annotation[] memberAnnotations) { for (Annotation a : memberAnnotations) { if (a instanceof QueryParam) { return Optional.of("query param " + ((QueryParam) a).value()); } else if (a instanceof PathParam) { return Optional.of("path param " + ((PathParam) a).value()); } else if (a instanceof HeaderParam) { return Optional.of("header " + ((HeaderParam) a).value()); } else if (a instanceof CookieParam) { return Optional.of("cookie " + ((CookieParam) a).value()); } else if (a instanceof FormParam) { return Optional.of("form field " + ((FormParam) a).value()); } else if (a instanceof Context) { return Optional.of("context"); } else if (a instanceof MatrixParam) { return Optional.of("matrix param " + ((MatrixParam) a).value()); } } return Optional.empty(); }
final String name = ((CookieParam) ann).value(); Cookie c; if (value instanceof Collection) {
@Override public String getAnnotationParameterName(Object annotation) { return ((CookieParam) annotation).value(); }
@Override public String getValueOf(CookieParam a) { return a.value(); }
Parameter pp = new Parameter(); pp.setIn(COOKIE_PARAM); pp.setName(param.value()); parameter = pp; } else if (annotation instanceof io.swagger.v3.oas.annotations.Parameter) {
public static String retrieveVisibleParamName(Annotation annotation) { if (CookieParam.class.isInstance(annotation)) { return ((CookieParam) annotation).value();
private CookieParameter extractCookieParameter(Type type, String defaultValue, CookieParam param) { CookieParameter cookieParameter = new CookieParameter().name(param.value()); if (!Strings.isNullOrEmpty(defaultValue)) { cookieParameter.setDefaultValue(defaultValue); } Property schema = ModelConverters.getInstance().readAsProperty(type); if (schema != null) { cookieParameter.setProperty(schema); } String parameterType = cookieParameter.getType(); if (parameterType == null || parameterType.equals("ref") || parameterType.equals("array")) { cookieParameter.setType("string"); } return cookieParameter; }
cookieParam.value(), defaultVal, annotations, factory).inject(request, null, false);
@Override public String getValueOf(CookieParam a) { return a.value(); }
@Override public String getAnnotationParameterName(Object annotation) { return ((CookieParam) annotation).value(); }
parameter.paramName = cookie.value();
private void processCookieParamAnnotation(final CookieParam cookieParam) { setStrategy(Strategy.COOKIE); setName(cookieParam.value()); }
cookie.value()); } else if ((uriParam = FindAnnotation.findAnnotation(annotations, PathParam.class)) != null)
CookieParam.class)) != null) { addParameter(type, annotations, ResteasyWadlMethodParamMetaData.MethodParamType.COOKIE_PARAMETER, cookieParam.value()); } else if ((pathParam = FindAnnotation.findAnnotation(annotations, PathParam.class)) != null) {
return new CookieParamInjector(type, genericType, injectTarget, cookie.value(), defaultVal, annotations, providerFactory);
CookieParam.class)) != null) processor = new CookieParamProcessor(cookie.value(), genericType, annotations);
private void addCookieParam(Request request, String representationAsText, Annotation annotation) { Series<Cookie> cookies = request.getCookies(); if (cookies == null) { cookies = new Series<Cookie>(Cookie.class); } cookies.add(new Cookie(((CookieParam) annotation).value(), representationAsText)); request.setCookies(cookies); }