public interface PlatformAPI extends PlatformAPI
Modifier and Type | Method and Description |
---|---|
void |
activateTenant(long tenantId)
Activate a tenant.
|
long |
createTenant(TenantCreator tenantCreator)
Create a new tenant
|
void |
deactiveTenant(long tenantId)
De-activate a tenant.
|
void |
deleteTenant(long tenantId)
Delete a tenant.
|
Tenant |
getDefaultTenant()
Get default tenant.
|
int |
getNumberOfTenants()
Return the total number of tenants.
|
Tenant |
getTenantById(long tenantId)
get a tenant using its tenantId
|
Tenant |
getTenantByName(String tenantName)
Get a tenant using its name.
|
List<Tenant> |
getTenants(int startIndex,
int maxResults,
TenantCriterion pagingCriterion)
Get a list of tenants.
|
SearchResult<Tenant> |
searchTenants(SearchOptions searchOptions)
Search tenant under the given condition, including pagination, term, filter, sort.
|
Tenant |
updateTenant(long tenantId,
TenantUpdater udpater)
Update a tenant with its tenantId and new content.
|
cleanAndDeletePlaftorm, cleanPlatform, createAndInitializePlatform, createPlatform, deletePlatform, getPlatform, getPlatformState, initializePlatform, isNodeStarted, isPlatformCreated, rescheduleErroneousTriggers, startNode, stopNode
long createTenant(TenantCreator tenantCreator) throws CreationException, AlreadyExistsException
tenantCreator
- the creator object with the fields defining new Tenant to createCreationException
- occurs when an exception is thrown during tenant creationAlreadyExistsException
- occurs when a tenant with the same name already existsInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.void deleteTenant(long tenantId) throws DeletionException
tenantId
- the tenant identifierDeletionException
- occurs when an exception is thrown during tenant deletionInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.void activateTenant(long tenantId) throws TenantNotFoundException, TenantActivationException
tenantId
- the tenant identifierTenantNotFoundException
- occurs when the identifier does not refer to an existing tenantTenantActivationException
- occurs when an exception is thrown during tenant activationInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.void deactiveTenant(long tenantId) throws TenantNotFoundException, TenantDeactivationException
tenantId
- the tenant identifierTenantNotFoundException
- occurs when the identifier does not refer to an existing tenantTenantDeactivationException
- occurs when an exception is thrown during tenant deactivationInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.List<Tenant> getTenants(int startIndex, int maxResults, TenantCriterion pagingCriterion)
startIndex
- the starting point, the first page is 1maxResults
- the number of Tenants to be retrievedpagingCriterion
- the criterion used to sort the retrieved tenantsInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.Tenant getTenantByName(String tenantName) throws TenantNotFoundException
tenantName
- the tenant nameTenantNotFoundException
- occurs when the identifier does not refer to an existing tenantInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.Tenant getDefaultTenant() throws TenantNotFoundException
TenantNotFoundException
- occurs when the identifier does not refer to an existing tenantInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.Tenant getTenantById(long tenantId) throws TenantNotFoundException
tenantId
- the tenant identifierTenantNotFoundException
- occurs when the identifier does not refer to an existing tenantInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.int getNumberOfTenants()
InvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.Tenant updateTenant(long tenantId, TenantUpdater udpater) throws UpdateException
tenantId
- the tenant identifierudpater
- the update descriptorUpdateException
- occurs when an exception is thrown during tenant updatedInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.SearchResult<Tenant> searchTenants(SearchOptions searchOptions) throws SearchException
searchOptions
- the search options (pagination parameters, filters, sort)SearchResult
The criterion used to search tenantsInvalidSessionException
- Generic exception thrown if API Session is invalid, e.g session has expired.SearchException
- if the search could not be fulfilled correclyCopyright © 2014 Bonitasoft S.A.. All Rights Reserved.