View Javadoc
1   package org.oxerr.commons.ws.rs.provider;
2   
3   import java.lang.annotation.Annotation;
4   import java.lang.reflect.Type;
5   import java.time.OffsetDateTime;
6   import java.time.ZoneOffset;
7   
8   import javax.inject.Singleton;
9   import javax.ws.rs.ext.ParamConverter;
10  import javax.ws.rs.ext.ParamConverterProvider;
11  import javax.ws.rs.ext.Provider;
12  
13  import org.apache.cxf.jaxrs.provider.JavaTimeTypesParamConverterProvider;
14  
15  /**
16   * {@code ParamConverterProvider} for converting between a {@code String} and
17   * {@link OffsetDateTime}.
18   *
19   * @deprecated Use org.apache.cxf.jaxrs.provider.JavaTimeTypesParamConverterProvider instead.
20   */
21  @Provider
22  @Singleton
23  @Deprecated
24  public class OffsetDateTimeProvider implements ParamConverterProvider {
25  
26  	private final JavaTimeTypesParamConverterProvider javaTimeTypesParamConverterProvider = new JavaTimeTypesParamConverterProvider();
27  
28  	/**
29  	 * @since 2.3.1
30  	 */
31  	public OffsetDateTimeProvider() {
32  		this(ZoneOffset.UTC);
33  	}
34  
35  	public OffsetDateTimeProvider(ZoneOffset offset) {
36  	}
37  
38  	/**
39  	 * {@inheritDoc}
40  	 */
41  	@Override
42  	public <T> ParamConverter<T> getConverter(Class<T> rawType,
43  			Type genericType, Annotation[] annotations) {
44  		return javaTimeTypesParamConverterProvider.getConverter(rawType, genericType, annotations);
45  	}
46  
47  }