/*
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 * $Id$
 */

package com.sun.ts.tests.jaxrs.ee.rs.cookieparam.locator;

import java.util.List;
import java.util.Set;
import java.util.SortedSet;

import javax.ws.rs.POST;
import javax.ws.rs.core.Response;

import com.sun.ts.tests.jaxrs.ee.rs.ParamEntityThrowingExceptionGivenByName;
import com.sun.ts.tests.jaxrs.ee.rs.ParamEntityThrowingWebApplicationException;
import com.sun.ts.tests.jaxrs.ee.rs.ParamEntityWithConstructor;
import com.sun.ts.tests.jaxrs.ee.rs.ParamEntityWithFromString;
import com.sun.ts.tests.jaxrs.ee.rs.ParamEntityWithValueOf;
import com.sun.ts.tests.jaxrs.ee.rs.cookieparam.CookieParamTest;

public class MiddleResource extends CookieParamTest {

	private final Response returnValue;

	public MiddleResource() {
		returnValue = null;
	}

	protected MiddleResource(
			String todo,
			String value,
			ParamEntityWithConstructor paramEntityWithConstructor,
			ParamEntityWithFromString paramEntityWithFromString,
			ParamEntityWithValueOf paramEntityWithValueOf,
			Set<ParamEntityWithFromString> setParamEntityWithFromString,
			SortedSet<ParamEntityWithFromString> sortedSetParamEntityWithFromString,
			List<ParamEntityWithFromString> listParamEntityWithFromString,
			ParamEntityThrowingWebApplicationException paramEntityThrowingWebApplicationException,
			ParamEntityThrowingExceptionGivenByName paramEntityThrowingExceptionGivenByName) {
		returnValue = cookieParamHandling(todo, value,
				paramEntityWithConstructor, paramEntityWithFromString,
				paramEntityWithValueOf, setParamEntityWithFromString,
				sortedSetParamEntityWithFromString,
				listParamEntityWithFromString,
				paramEntityThrowingWebApplicationException,
				paramEntityThrowingExceptionGivenByName);
	}

	@POST
	public Response returnValue() {
		return returnValue;
	}

}
