public class TenantServiceRestClient extends AbstractProfileRestClientBase implements TenantService
TenantService
.Modifier and Type | Field and Description |
---|---|
static org.springframework.core.ParameterizedTypeReference<List<Tenant>> |
tenantListTypeRef |
accessTokenIdResolver
Constructor and Description |
---|
TenantServiceRestClient() |
Modifier and Type | Method and Description |
---|---|
Tenant |
addAttributeDefinitions(String tenantName,
Collection<AttributeDefinition> attributeDefinitions)
Adds the given attribute definitions to the specified tenant.
|
Tenant |
addRoles(String tenantName,
Collection<String> roles)
Adds the given roles to the specified tenant.
|
Tenant |
createTenant(Tenant tenant)
Creates the given tenant, failing if it already has been created.
|
void |
deleteTenant(String name)
Deletes a tenant.
|
List<Tenant> |
getAllTenants()
Returns a list with all the tenants.
|
Tenant |
getTenant(String name)
Returns a tenant.
|
long |
getTenantCount()
Returns the total number of tenants.
|
Tenant |
removeAttributeDefinitions(String tenantName,
Collection<String> attributeNames)
Removes the given attribute definitions from the specified tenant.
|
Tenant |
removeRoles(String tenantName,
Collection<String> roles)
Removes the given roles from the specified tenant.
|
Tenant |
updateAttributeDefinitions(String tenantName,
Collection<AttributeDefinition> attributeDefinitions)
Updates the given attribute definitions of the specified tenant.
|
Tenant |
updateTenant(Tenant tenant)
Updates the given tenant.
|
Tenant |
verifyNewProfiles(String tenantName,
boolean verify)
Sets if new profiles for the specified tenant should be verified or not.
|
createBaseParams, doGetForObject, doGetForObject, doGetForObject, doGetForObject, doPostForLocation, doPostForObject, doPostForUpload, getAbsoluteUrlWithAccessTokenIdParam, handleException, handleRestServiceException, setAccessTokenIdResolver
public Tenant createTenant(Tenant tenant) throws ProfileException
TenantService
createTenant
in interface TenantService
tenant
- the tenant to createProfileException
public Tenant getTenant(String name) throws ProfileException
TenantService
getTenant
in interface TenantService
name
- the tenant's nameProfileException
public Tenant updateTenant(Tenant tenant) throws ProfileException
TenantService
updateTenant
in interface TenantService
tenant
- the tenant to updateProfileException
public void deleteTenant(String name) throws ProfileException
TenantService
deleteTenant
in interface TenantService
name
- the tenant's nameProfileException
public long getTenantCount() throws ProfileException
TenantService
getTenantCount
in interface TenantService
ProfileException
public List<Tenant> getAllTenants() throws ProfileException
TenantService
getAllTenants
in interface TenantService
ProfileException
public Tenant verifyNewProfiles(String tenantName, boolean verify) throws ProfileException
TenantService
verifyNewProfiles
in interface TenantService
tenantName
- the tenant's nameverify
- true to verify new profiles through email, false otherwiseProfileException
public Tenant addRoles(String tenantName, Collection<String> roles) throws ProfileException
TenantService
addRoles
in interface TenantService
tenantName
- the tenant's nameroles
- the roles to addProfileException
public Tenant removeRoles(String tenantName, Collection<String> roles) throws ProfileException
TenantService
removeRoles
in interface TenantService
tenantName
- the tenant's nameroles
- the roles to removeProfileException
public Tenant addAttributeDefinitions(String tenantName, Collection<AttributeDefinition> attributeDefinitions) throws ProfileException
TenantService
addAttributeDefinitions
in interface TenantService
tenantName
- the tenant's nameattributeDefinitions
- the definitions to addProfileException
public Tenant updateAttributeDefinitions(String tenantName, Collection<AttributeDefinition> attributeDefinitions) throws ProfileException
TenantService
updateAttributeDefinitions
in interface TenantService
tenantName
- the tenant's nameattributeDefinitions
- the definitions to update (should have the same name as definitions that the
tenant already has)ProfileException
public Tenant removeAttributeDefinitions(String tenantName, Collection<String> attributeNames) throws ProfileException
TenantService
removeAttributeDefinitions
in interface TenantService
tenantName
- the tenant's nameattributeNames
- the name of the attributes whose definitions should be removedProfileException
Copyright © 2023 CrafterCMS. All rights reserved.