Package org.jboss.resteasy.core
Class PrefixedFormInjector
- java.lang.Object
-
- org.jboss.resteasy.core.FormInjector
-
- org.jboss.resteasy.core.PrefixedFormInjector
-
- All Implemented Interfaces:
ValueInjector
- Direct Known Subclasses:
AbstractCollectionFormInjector
public class PrefixedFormInjector extends FormInjector
Extension ofFormInjector
that handles prefixes for associated classes.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
prefix
-
Constructor Summary
Constructors Constructor Description PrefixedFormInjector(java.lang.Class type, java.lang.String prefix, ResteasyProviderFactory factory)
Constructor setting the prefix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
containsPrefixedFormFieldsWithValue(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> decodedFormParameters)
Checks to see if the decodedParameters contains any form fields starting with the prefix.protected java.lang.Object
doInject(java.lang.String prefix, HttpRequest request, HttpResponse response)
Calls the superinject(org.jboss.resteasy.spi.HttpRequest, org.jboss.resteasy.spi.HttpResponse)
method.protected boolean
hasValue(java.util.List<java.lang.String> list)
Checks that the list has an non empty value.java.lang.Object
inject(HttpRequest request, HttpResponse response)
Inject inside the context of an HTTP request.-
Methods inherited from class org.jboss.resteasy.core.FormInjector
inject
-
-
-
-
Constructor Detail
-
PrefixedFormInjector
public PrefixedFormInjector(java.lang.Class type, java.lang.String prefix, ResteasyProviderFactory factory)
Constructor setting the prefix.
-
-
Method Detail
-
inject
public java.lang.Object inject(HttpRequest request, HttpResponse response)
Inject inside the context of an HTTP request. Wraps the request in a- Specified by:
inject
in interfaceValueInjector
- Overrides:
inject
in classFormInjector
- Returns:
-
doInject
protected java.lang.Object doInject(java.lang.String prefix, HttpRequest request, HttpResponse response)
Calls the superinject(org.jboss.resteasy.spi.HttpRequest, org.jboss.resteasy.spi.HttpResponse)
method.
-
containsPrefixedFormFieldsWithValue
private boolean containsPrefixedFormFieldsWithValue(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> decodedFormParameters)
Checks to see if the decodedParameters contains any form fields starting with the prefix. Also checks if the value is not empty.
-
hasValue
protected boolean hasValue(java.util.List<java.lang.String> list)
Checks that the list has an non empty value.
-
-