public class TenantManagementRequestBuilder
extends java.lang.Object
Constructor and Description |
---|
TenantManagementRequestBuilder(ITenantManagement tenantManagement) |
Modifier and Type | Method and Description |
---|---|
ITenant |
getTenant(java.lang.String id)
Get tenant by unique id.
|
ITenantGroup |
getTenantGroup(java.lang.String token)
Get a tenant group by token.
|
ITenantManagement |
getTenantManagement() |
boolean |
hasTenant(java.lang.String id)
Indicates whether a tenant exists for the given id.
|
boolean |
hasTenantGroup(java.lang.String id)
Indicates whether a tenant group exists for the given id.
|
TenantCreateRequest.Builder |
newTenant(java.lang.String id,
java.lang.String name,
java.lang.String authenticationToken,
java.lang.String logoUrl)
Create builder for new tenant request.
|
TenantCreateRequest.Builder |
newTenant(java.lang.String id,
java.lang.String name,
java.lang.String authenticationToken,
java.lang.String logoUrl,
java.lang.String tenantTemplateId)
Create builder for new tenant request.
|
TenantGroupCreateRequest.Builder |
newTenantGroup(java.lang.String name)
Create builder for new tenant group request.
|
TenantGroupCreateRequest.Builder |
newTenantGroup(java.lang.String token,
java.lang.String name)
Create builder for new tenant group request.
|
TenantGroupElementCreateRequest.Builder |
newTenantGroupElement(java.lang.String tenantId)
Create builder for a tenant group element.
|
java.util.List<ITenantGroupElement> |
persist(ITenantGroup group,
java.util.List<TenantGroupElementCreateRequest.Builder> builders)
Add elements to a tenant group.
|
ITenant |
persist(TenantCreateRequest.Builder builder)
Persist tenant contructed via builder.
|
ITenantGroup |
persist(TenantGroupCreateRequest.Builder builder)
Persist tenant group contructed via builder.
|
void |
setTenantManagement(ITenantManagement tenantManagement) |
public TenantManagementRequestBuilder(ITenantManagement tenantManagement)
public TenantCreateRequest.Builder newTenant(java.lang.String id, java.lang.String name, java.lang.String authenticationToken, java.lang.String logoUrl)
id
- name
- authenticationToken
- logoUrl
- public TenantCreateRequest.Builder newTenant(java.lang.String id, java.lang.String name, java.lang.String authenticationToken, java.lang.String logoUrl, java.lang.String tenantTemplateId)
id
- name
- authenticationToken
- logoUrl
- tenantTemplateId
- public ITenant persist(TenantCreateRequest.Builder builder) throws SiteWhereException
builder
- SiteWhereException
public ITenant getTenant(java.lang.String id) throws SiteWhereException
id
- SiteWhereException
public boolean hasTenant(java.lang.String id) throws SiteWhereException
id
- SiteWhereException
public TenantGroupCreateRequest.Builder newTenantGroup(java.lang.String name)
name
- public TenantGroupCreateRequest.Builder newTenantGroup(java.lang.String token, java.lang.String name)
token
- name
- public ITenantGroup persist(TenantGroupCreateRequest.Builder builder) throws SiteWhereException
builder
- SiteWhereException
public ITenantGroup getTenantGroup(java.lang.String token) throws SiteWhereException
token
- SiteWhereException
public boolean hasTenantGroup(java.lang.String id) throws SiteWhereException
id
- SiteWhereException
public TenantGroupElementCreateRequest.Builder newTenantGroupElement(java.lang.String tenantId)
tenantGroupId
- tenantId
- public java.util.List<ITenantGroupElement> persist(ITenantGroup group, java.util.List<TenantGroupElementCreateRequest.Builder> builders) throws SiteWhereException
group
- builders
- SiteWhereException
public ITenantManagement getTenantManagement()
public void setTenantManagement(ITenantManagement tenantManagement)