// Path: restannotations/src/main/java/org/wicketstuff/rest/contenthandling/RestMimeTypes.java
// public class RestMimeTypes {
// 	public static final String APPLICATION_RSS_XML = "application/rss+xml";
// 
// 	public static final String TEXT_CSS = "text/css";
// 
// 	public static final String TEXT_CSV = "text/csv";
// 
// 	public static final String TEXT_PLAIN = "text/plain";
// 
// 	public static final String TEXT_HTML = "text/html";
// 
// 	public static final String APPLICATION_XML = "application/xml";
// 	
// 	public static final String TEXT_XML = "text/xml";
// 	
// 	public static final String APPLICATION_JSON = "application/json";
// 	
// 	public static final String IMAGE_GIF = "image/gif";
// 	
// 	public static final String IMAGE_JPEG = "image/jpeg";
// 	
// 	public static final String IMAGE_PNG = "image/png";
// 	
// 	public static final String OCTET_STREAM = "application/octet-stream";
// }
// 
// Path: restannotations/src/main/java/org/wicketstuff/rest/utils/http/HttpMethod.java
// public enum HttpMethod {
// 	GET("GET"), POST("POST"), HEAD("HEAD"), OPTIONS("OPTIONS"), PUT("PUT"), PATCH("PATCH"), DELETE(
// 			"DELETE"), TRACE("TRACE");
// 
// 	private String method;
// 
// 	private HttpMethod(String method) {
// 		this.method = method;
// 	}
// 
// 	/**
// 	 * Converts a string (like "put", "get", "post", etc...) to the
// 	 * corresponding HTTP method.
// 	 * 
// 	 * @param httpMethod
// 	 *            the string value we want to convert. The conversion mechanism
// 	 *            is case-insensitive.
// 	 * @return
// 	 */
// 	public static HttpMethod toHttpMethod(String httpMethod) {
// 		HttpMethod[] values = HttpMethod.values();
// 		httpMethod = httpMethod.toUpperCase();
// 
// 		for (int i = 0; i < values.length; i++) {
// 			if (values[i].method.equals(httpMethod))
// 				return values[i];
// 		}
// 
// 		throw new RuntimeException("The string value '" + httpMethod
// 				+ "' does not correspond to any valid HTTP request method");
// 	}
// 
// 	public String getMethod() {
// 		return method;
// 	}
// }


import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.wicketstuff.rest.contenthandling.RestMimeTypes;
import org.wicketstuff.rest.utils.http.HttpMethod;
/**
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.wicketstuff.rest.annotations;



/**
 * Annotation used to map a resource method to a given URL.
 * The specified URL can contain parameter segment (for example '{id}') and we can
 * specify also the request method that must be used.
 * 
 * @author andrea del bene
 * @see HttpMethod
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface MethodMapping {
	String value();
// Path: restannotations/src/main/java/org/wicketstuff/rest/contenthandling/RestMimeTypes.java
// public class RestMimeTypes {
// 	public static final String APPLICATION_RSS_XML = "application/rss+xml";
// 
// 	public static final String TEXT_CSS = "text/css";
// 
// 	public static final String TEXT_CSV = "text/csv";
// 
// 	public static final String TEXT_PLAIN = "text/plain";
// 
// 	public static final String TEXT_HTML = "text/html";
// 
// 	public static final String APPLICATION_XML = "application/xml";
// 	
// 	public static final String TEXT_XML = "text/xml";
// 	
// 	public static final String APPLICATION_JSON = "application/json";
// 	
// 	public static final String IMAGE_GIF = "image/gif";
// 	
// 	public static final String IMAGE_JPEG = "image/jpeg";
// 	
// 	public static final String IMAGE_PNG = "image/png";
// 	
// 	public static final String OCTET_STREAM = "application/octet-stream";
// }
// 
// Path: restannotations/src/main/java/org/wicketstuff/rest/utils/http/HttpMethod.java
// public enum HttpMethod {
// 	GET("GET"), POST("POST"), HEAD("HEAD"), OPTIONS("OPTIONS"), PUT("PUT"), PATCH("PATCH"), DELETE(
// 			"DELETE"), TRACE("TRACE");
// 
// 	private String method;
// 
// 	private HttpMethod(String method) {
// 		this.method = method;
// 	}
// 
// 	/**
// 	 * Converts a string (like "put", "get", "post", etc...) to the
// 	 * corresponding HTTP method.
// 	 * 
// 	 * @param httpMethod
// 	 *            the string value we want to convert. The conversion mechanism
// 	 *            is case-insensitive.
// 	 * @return
// 	 */
// 	public static HttpMethod toHttpMethod(String httpMethod) {
// 		HttpMethod[] values = HttpMethod.values();
// 		httpMethod = httpMethod.toUpperCase();
// 
// 		for (int i = 0; i < values.length; i++) {
// 			if (values[i].method.equals(httpMethod))
// 				return values[i];
// 		}
// 
// 		throw new RuntimeException("The string value '" + httpMethod
// 				+ "' does not correspond to any valid HTTP request method");
// 	}
// 
// 	public String getMethod() {
// 		return method;
// 	}
// }


// Path: restannotations/src/main/java/org/wicketstuff/rest/annotations/MethodMapping.java
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.wicketstuff.rest.contenthandling.RestMimeTypes;
import org.wicketstuff.rest.utils.http.HttpMethod;

/**
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.wicketstuff.rest.annotations;



/**
 * Annotation used to map a resource method to a given URL.
 * The specified URL can contain parameter segment (for example '{id}') and we can
 * specify also the request method that must be used.
 * 
 * @author andrea del bene
 * @see HttpMethod
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface MethodMapping {
	String value();
	HttpMethod httpMethod() default HttpMethod.GET;