|
VolD 0.1
|
REST Controller for Spring framework. More...
Collaboration diagram for de.zib.vold.userInterface.RESTController:Public Member Functions | |
| ResponseEntity< Map< String, String > > | post (@ModelAttribute("clientIpAddress") String clientIpAddress,@RequestParam MultiValueMap< String, String > args,@RequestBody MultiValueMap< String, String > argsbody, HttpServletRequest request) |
| Handles Post requests. | |
| ResponseEntity< Map< Key, Set < String > > > | get (@RequestParam Map< String, String > keys, HttpServletRequest request) |
| Handles Get requests. | |
| String | populateClientIpAddress (HttpServletRequest request) |
| void | setFrontend (Frontend frontend) |
| void | setEnc (String enc) |
Protected Attributes | |
| final Logger | log = LoggerFactory.getLogger( this.getClass() ) |
Private Member Functions | |
| void | checkState () |
Private Attributes | |
| Frontend | frontend |
| String | enc = "utf-8" |
Static Private Attributes | |
| static String | defaulttype = "list" |
REST Controller for Spring framework.
This class provides a REST based interface to VolD. It is built to act as a Controller in the Spring framework.
Definition at line 42 of file RESTController.java.
| void de.zib.vold.userInterface.RESTController.checkState | ( | ) | [private] |
Definition at line 50 of file RESTController.java.
| ResponseEntity< Map< Key, Set< String > > > de.zib.vold.userInterface.RESTController.get | ( | @RequestParam Map< String, String > | keys, |
| HttpServletRequest | request | ||
| ) |
Handles Get requests.
This method is used by clients to lookup some keys.
| keys | The URL arguments of the request. |
Definition at line 184 of file RESTController.java.
References de.zib.vold.common.URIKey.fromURIString(), de.zib.vold.common.Key.get_keyname(), de.zib.vold.common.Key.get_scope(), de.zib.vold.common.Key.get_type(), de.zib.vold.common.URIKey.getKey(), and de.zib.vold.frontend.Frontend.lookup().
Here is the call graph for this function:| String de.zib.vold.userInterface.RESTController.populateClientIpAddress | ( | HttpServletRequest | request | ) |
Definition at line 262 of file RESTController.java.
| ResponseEntity< Map< String, String > > de.zib.vold.userInterface.RESTController.post | ( | @ModelAttribute("clientIpAddress") String | clientIpAddress, |
| @RequestParam MultiValueMap< String, String > | args, | ||
| @RequestBody MultiValueMap< String, String > | argsbody, | ||
| HttpServletRequest | request | ||
| ) |
Handles Post requests.
This method is used by clients to submit new keys, refresh their registration or delete them.
| clientIpAddress | The ip of the sending client, it's extracted from the request itself. |
| args | The URL arguments of the request. |
| argsbody | The POST body arguments of the request. |
Definition at line 69 of file RESTController.java.
References de.zib.vold.frontend.Frontend.delete(), de.zib.vold.common.URIKey.fromURIString(), de.zib.vold.common.Key.get_keyname(), de.zib.vold.common.Key.get_scope(), de.zib.vold.common.Key.get_type(), de.zib.vold.common.URIKey.getKey(), de.zib.vold.common.URIKey.getSource(), de.zib.vold.frontend.Frontend.insert(), de.zib.vold.common.URIKey.isDelete(), de.zib.vold.common.URIKey.isRefresh(), and de.zib.vold.frontend.Frontend.refresh().
Here is the call graph for this function:| void de.zib.vold.userInterface.RESTController.setEnc | ( | String | enc | ) |
Definition at line 273 of file RESTController.java.
| void de.zib.vold.userInterface.RESTController.setFrontend | ( | Frontend | frontend | ) |
Definition at line 268 of file RESTController.java.
String de.zib.vold.userInterface.RESTController.defaulttype = "list" [static, private] |
Definition at line 45 of file RESTController.java.
String de.zib.vold.userInterface.RESTController.enc = "utf-8" [private] |
Definition at line 48 of file RESTController.java.
Definition at line 47 of file RESTController.java.
final Logger de.zib.vold.userInterface.RESTController.log = LoggerFactory.getLogger( this.getClass() ) [protected] |
Definition at line 44 of file RESTController.java.