com.bea.wlp.rest.command
Interface RestCommand


public interface RestCommand

Interface to be implemented by all RestCommands. Each RestCommand can be configured via wlp-restapi-config.xml to handle a specific URI, which can then be mapped to a full URL via it's configured namespace and servlet context information.

Depending on the HTTP method used for a request that is dispatched to a RestCommand one of the four method handling interface members will be invoked.


Method Summary
 RestResult doDelete(RestContext restContext)
          Handles DELETE method command requests.
 RestResult doGet(RestContext restContext)
          Handles GET method command requests.
 RestResult doHead(RestContext restContext)
          Handles HEAD method command requests.
 RestResult doOptions(RestContext restContext)
          Handles OPTIONS method command requests.
 RestResult doPost(RestContext restContext)
          Handles POST method command requests.
 RestResult doPut(RestContext restContext)
          Handles PUT method command requests.
 RestResult execute(RestContext restContext)
          Handles unknown command requests.
 

Method Detail

doGet

RestResult doGet(RestContext restContext)
Handles GET method command requests.

Parameters
restContext - the RestContext for the current command request
Returns
a RestResult containing the results of running the RestCommand

doHead

RestResult doHead(RestContext restContext)
Handles HEAD method command requests.

Parameters
restContext - the RestContext for the current command request
Returns
a RestResult containing the results of running the RestCommand

doPost

RestResult doPost(RestContext restContext)
Handles POST method command requests.

Parameters
restContext - the RestContext for the current command request
Returns
a RestResult containing the results of running the RestCommand

doPut

RestResult doPut(RestContext restContext)
Handles PUT method command requests.

Parameters
restContext - the RestContext for the current command request
Returns
a RestResult containing the results of running the RestCommand

doDelete

RestResult doDelete(RestContext restContext)
Handles DELETE method command requests.

Parameters
restContext - the RestContext for the current command request
Returns
a RestResult containing the results of running the RestCommand

doOptions

RestResult doOptions(RestContext restContext)
Handles OPTIONS method command requests.

Parameters
restContext - the RestContext for the current command request
Returns
a RestResult containing the results of running the RestCommand

execute

RestResult execute(RestContext restContext)
Handles unknown command requests.

Parameters
restContext - the RestContext for the current command request
Returns
a RestResult containing the results of running the RestCommand


Copyright © 2011, Oracle. All rights reserved.