All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.sitebricks.http.Select Maven / Gradle / Ivy

package com.google.sitebricks.http;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * This annotation is used to select request handlers based on
 * request parameters. For example, in a single resource URL, you
 * may wish to call different handlers for POST based on the request
 * parameter "action" (action=update, action=delete, etc.). These
 * maybe modeled as form parameters or as part of the query string.
 *
 * 
 *   {@literal @}At("/city/atlantis") {@literal @} Select("action")
 *   public class PictureWebService {
 *
 *     {@literal @}Post("update")
 *     public void update() {
 *       // edit resource in place
 *     }
 *
 *     {@literal @}Post("delete")
 *     public void delete() {
 *       // remove the item...
 *     }
 *   }
 * 
* * @author Dhanji R. Prasanna ([email protected]) */ @Retention(RetentionPolicy.RUNTIME) public @interface Select { String value(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy