@Controller @RequestMapping(value="/api/whitelist") @PreAuthorize(value="hasRole(\'ROLE_USER\')") public class WhitelistAPI extends Object
Constructor and Description |
---|
WhitelistAPI() |
Modifier and Type | Method and Description |
---|---|
String |
addNewWhitelistedSite(String jsonString,
org.springframework.ui.ModelMap m,
Principal p)
Create a new whitelisted site
|
String |
deleteWhitelistedSite(Long id,
org.springframework.ui.ModelMap m)
Delete a whitelisted site
|
String |
getAllWhitelistedSites(org.springframework.ui.ModelMap m)
Get a list of all whitelisted sites
|
String |
getWhitelistedSite(Long id,
org.springframework.ui.ModelMap m)
Get a single whitelisted site
|
String |
updateWhitelistedSite(Long id,
String jsonString,
org.springframework.ui.ModelMap m,
Principal p)
Update an existing whitelisted site
|
public static final String URL
public WhitelistAPI()
@RequestMapping(method=GET, produces="application/json") public String getAllWhitelistedSites(org.springframework.ui.ModelMap m)
m
- @PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") @RequestMapping(method=POST, consumes="application/json", produces="application/json") public String addNewWhitelistedSite(@RequestBody String jsonString, org.springframework.ui.ModelMap m, Principal p)
jsonString
- m
- p
- @PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") @RequestMapping(value="/{id}", method=PUT, consumes="application/json", produces="application/json") public String updateWhitelistedSite(@PathVariable(value="id") Long id, @RequestBody String jsonString, org.springframework.ui.ModelMap m, Principal p)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\')") @RequestMapping(value="/{id}", method=DELETE) public String deleteWhitelistedSite(@PathVariable(value="id") Long id, org.springframework.ui.ModelMap m)
@RequestMapping(value="/{id}", method=GET, produces="application/json") public String getWhitelistedSite(@PathVariable(value="id") Long id, org.springframework.ui.ModelMap m)
Copyright © 2018. All rights reserved.