Package org.wso2.synapse.samples.jaxrs.foodsample

## Class FoodService

- java.lang.Object
- - org.wso2.synapse.samples.jaxrs.foodsample.FoodService

-     @Singleton
      @Path("/foodservice/")
      public class FoodService
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FoodService()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `javax.ws.rs.core.Response` | `getAccessToken​(javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.core.MultivaluedMap<String,​String> tokenRequestParams)` |
    `javax.ws.rs.core.Response` | `getAccessTokenWithCustomParams​(javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.core.MultivaluedMap<String,​String> tokenRequestParams)` |
    `javax.ws.rs.core.Response` | `getAccessTokenWithPasswordGrant​(javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.core.MultivaluedMap<String,​String> tokenRequestParams)` |
    `javax.ws.rs.core.Response` | `getFoodItem​(javax.ws.rs.core.HttpHeaders httpHeaders)` |
    `javax.ws.rs.core.Response` | `getUnauthorizedItem​(javax.ws.rs.core.HttpHeaders httpHeaders)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FoodService

          public FoodService()

  - ### Method Detail

    - #### getAccessToken

          @POST
          @Path("/token")
          @Consumes("application/x-www-form-urlencoded")
          @Produces("application/json")
          public javax.ws.rs.core.Response getAccessToken​(@Context
                                                          javax.ws.rs.core.HttpHeaders httpHeaders,
                                                          javax.ws.rs.core.MultivaluedMap<String,​String> tokenRequestParams)

    - #### getAccessTokenWithCustomParams

          @POST
          @Path("/custom-token")
          @Consumes("application/x-www-form-urlencoded")
          @Produces("application/json")
          public javax.ws.rs.core.Response getAccessTokenWithCustomParams​(@Context
                                                                          javax.ws.rs.core.HttpHeaders httpHeaders,
                                                                          javax.ws.rs.core.MultivaluedMap<String,​String> tokenRequestParams)

    - #### getAccessTokenWithPasswordGrant

          @POST
          @Path("/password-token")
          @Consumes("application/x-www-form-urlencoded")
          @Produces("application/json")
          public javax.ws.rs.core.Response getAccessTokenWithPasswordGrant​(@Context
                                                                           javax.ws.rs.core.HttpHeaders httpHeaders,
                                                                           javax.ws.rs.core.MultivaluedMap<String,​String> tokenRequestParams)

    - #### getFoodItem

          @GET
          @Path("/food")
          @Produces("application/json")
          public javax.ws.rs.core.Response getFoodItem​(@Context
                                                       javax.ws.rs.core.HttpHeaders httpHeaders)

    - #### getUnauthorizedItem

          @GET
          @Path("/unauthorized")
          @Produces("application/json")
          public javax.ws.rs.core.Response getUnauthorizedItem​(@Context
                                                               javax.ws.rs.core.HttpHeaders httpHeaders)