Class TenantController
java.lang.Object
org.craftercms.profile.controllers.rest.TenantController
REST controller for the tenant service.
- Author:
- avasquez
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttributeDefinitions
(String tenantName, Collection<AttributeDefinition> attributeDefinitions) addRoles
(String tenantName, Collection<String> roles) createTenant
(Tenant tenant) void
deleteTenant
(String name) long
removeAttributeDefinitions
(String tenantName, Collection<String> attributeNames) removeRoles
(String tenantName, Collection<String> roles) void
setTenantService
(TenantService tenantService) updateAttributeDefinitions
(String tenantName, Collection<AttributeDefinition> attributeDefinitions) updateTenant
(Tenant tenant) verifyNewProfiles
(String tenantName, boolean verify)
-
Constructor Details
-
TenantController
public TenantController()
-
-
Method Details
-
setTenantService
-
createTenant
@RequestMapping(value="/create", method=POST) @ResponseBody public Tenant createTenant(@RequestBody Tenant tenant) throws ProfileException - Throws:
ProfileException
-
getTenant
@RequestMapping(value="/{name}", method=GET) @ResponseBody public Tenant getTenant(@PathVariable("name") String name) throws ProfileException - Throws:
ProfileException
-
updateTenant
@RequestMapping(value="/update", method=POST) @ResponseBody public Tenant updateTenant(@RequestBody Tenant tenant) throws ProfileException - Throws:
ProfileException
-
deleteTenant
@RequestMapping(value="/{name}/delete", method=POST) @ResponseStatus(OK) public void deleteTenant(@PathVariable("name") String name) throws ProfileException - Throws:
ProfileException
-
getTenantCount
@RequestMapping(value="/count", method=GET) @ResponseBody public long getTenantCount() throws ProfileException- Throws:
ProfileException
-
getAllTenants
@RequestMapping(value="/all", method=GET) @ResponseBody public List<Tenant> getAllTenants() throws ProfileException- Throws:
ProfileException
-
verifyNewProfiles
@RequestMapping(value="/{name}/verify_new_profiles", method=POST) @ResponseBody public Tenant verifyNewProfiles(@PathVariable("name") String tenantName, @RequestParam("verify") boolean verify) throws ProfileException - Throws:
ProfileException
-
addRoles
@RequestMapping(value="/{name}/roles/add", method=POST) @ResponseBody public Tenant addRoles(@PathVariable("name") String tenantName, @RequestParam("role") Collection<String> roles) throws ProfileException - Throws:
ProfileException
-
removeRoles
@RequestMapping(value="/{name}/roles/remove", method=POST) @ResponseBody public Tenant removeRoles(@PathVariable("name") String tenantName, @RequestParam("role") Collection<String> roles) throws ProfileException - Throws:
ProfileException
-
addAttributeDefinitions
@RequestMapping(value="/{name}/attribute_definitions/add", method=POST) @ResponseBody public Tenant addAttributeDefinitions(@PathVariable("name") String tenantName, @RequestBody Collection<AttributeDefinition> attributeDefinitions) throws ProfileException - Throws:
ProfileException
-
updateAttributeDefinitions
@RequestMapping(value="/{name}/attribute_definitions/update", method=POST) @ResponseBody public Tenant updateAttributeDefinitions(@PathVariable("name") String tenantName, @RequestBody Collection<AttributeDefinition> attributeDefinitions) throws ProfileException - Throws:
ProfileException
-
removeAttributeDefinitions
@RequestMapping(value="/{name}/attribute_definitions/remove", method=POST) @ResponseBody public Tenant removeAttributeDefinitions(@PathVariable("name") String tenantName, @RequestParam("attributeName") Collection<String> attributeNames) throws ProfileException - Throws:
ProfileException
-