org.wso2.carbon.user.api
Interface TenantManager


public interface TenantManager


Method Summary
 void activateTenant(int tenantId)
          Activates a tenant
 int addTenant(Tenant tenant)
          Adds a tenant to the system
 void deactivateTenant(int tenantId)
          De-activates a tenant
 void deleteTenant(int tenantId)
          Deletes a tenant from the system
 void deleteTenant(int tenantId, boolean removeFromPersistentStorage)
          Deletes a tenant from the system which use to delete the cache in each worker nodes using clustered message and delete the persistence storage in management node
 Tenant[] getAllTenants()
          Gets all tenants in the system.
 Tenant[] getAllTenantsForTenantDomainStr(String domain)
          Gets tenants in the system which matches the given domain String(which can be used for partial searches).
 String getDomain(int tenantId)
          Retrieves the domain given a tenant Id
 String getSuperTenantDomain()
          Checks whether the super tenant.
 Tenant getTenant(int tenantId)
          Gets a Tenant object
 int getTenantId(String domain)
          Retrieves the tenant Id given the domain
 boolean isTenantActive(int tenantId)
          Checks whether a tenant is active
 void updateTenant(Tenant tenant)
          Updates a tenant in the system
 

Method Detail

addTenant

int addTenant(Tenant tenant)
              throws UserStoreException
Adds a tenant to the system

Parameters:
tenant - The tenant to be added
Returns:
The Id of the tenant
Throws:
UserStoreException

updateTenant

void updateTenant(Tenant tenant)
                  throws UserStoreException
Updates a tenant in the system

Parameters:
tenant - The tenant to be updated
Throws:
UserStoreException

getTenant

Tenant getTenant(int tenantId)
                 throws UserStoreException
Gets a Tenant object

Parameters:
tenantId - The tenant Id of the tenant
Returns:
The tenant object
Throws:
UserStoreException

getAllTenants

Tenant[] getAllTenants()
                       throws UserStoreException
Gets all tenants in the system.

Returns:
An array of all tenants
Throws:
UserStoreException

getAllTenantsForTenantDomainStr

Tenant[] getAllTenantsForTenantDomainStr(String domain)
                                         throws UserStoreException
Gets tenants in the system which matches the given domain String(which can be used for partial searches).

Returns:
An array of tenants which matches the domain
Throws:
UserStoreException

getDomain

String getDomain(int tenantId)
                 throws UserStoreException
Retrieves the domain given a tenant Id

Parameters:
tenantId - The Id of the tenant
Returns:
Throws:
UserStoreException

getTenantId

int getTenantId(String domain)
                throws UserStoreException
Retrieves the tenant Id given the domain

Parameters:
domain - The domain of the tenant
Returns:
Throws:
UserStoreException

activateTenant

void activateTenant(int tenantId)
                    throws UserStoreException
Activates a tenant

Parameters:
tenantId - The Id of the tenant
Throws:
UserStoreException

deactivateTenant

void deactivateTenant(int tenantId)
                      throws UserStoreException
De-activates a tenant

Parameters:
tenantId - The Id of the tenant
Throws:
UserStoreException

isTenantActive

boolean isTenantActive(int tenantId)
                       throws UserStoreException
Checks whether a tenant is active

Parameters:
tenantId - The Id of the tenant
Returns:
Throws:
UserStoreException

deleteTenant

void deleteTenant(int tenantId)
                  throws UserStoreException
Deletes a tenant from the system

Parameters:
tenantId -
Throws:
UserStoreException

deleteTenant

void deleteTenant(int tenantId,
                  boolean removeFromPersistentStorage)
                  throws UserStoreException
Deletes a tenant from the system which use to delete the cache in each worker nodes using clustered message and delete the persistence storage in management node

Parameters:
tenantId -
removeFromPersistentStorage -
Throws:
UserStoreException

getSuperTenantDomain

String getSuperTenantDomain()
                            throws UserStoreException
Checks whether the super tenant.

Returns:
Throws:
UserStoreException


Copyright © 2014 WSO2 Inc. All rights reserved.