Package org.bonitasoft.engine.platform
Interface PlatformService
-
- All Known Implementing Classes:
PlatformServiceImpl
public interface PlatformService- Author:
- Charles Souillard, Matthieu Chaffotte, Celine Souchet
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTENANT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivateTenant(long tenantId)Set status of the tenant into activatedvoiddeactivateTenant(long tenantId)Set status of the tenant into deactivatedSTenantgetDefaultTenant()Get default tenantSPlatformgetPlatform()Retrieve the platform from the cache No need to be in a transactionSPlatformPropertiesgetSPlatformProperties()Return the platform propertiesSTenantgetTenant(long id)Get tenant by its idbooleanisDefaultTenantCreated()Is the default tenant already created?booleanisPlatformCreated()Return true if the platform is created, else return false.voidpauseTenant(long tenantId)update status of tenant object to PAUSEDvoidupdateTenant(STenant tenant, EntityUpdateDescriptor descriptor)Update a sTenant from given sTenant and new content.
-
-
-
Field Detail
-
TENANT
static final java.lang.String TENANT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPlatform
SPlatform getPlatform() throws SPlatformNotFoundException
Retrieve the platform from the cache No need to be in a transaction- Returns:
- sPlatform
- Throws:
SPlatformNotFoundException- occurs when the identifier does not refer to an existing sPlatform- Since:
- 6.0
-
updateTenant
void updateTenant(STenant tenant, EntityUpdateDescriptor descriptor) throws STenantUpdateException
Update a sTenant from given sTenant and new content.- Parameters:
tenant- sTenantdescriptor- new content- Throws:
STenantUpdateException- occurs when an exception is thrown during sTenant update- Since:
- 6.0
-
getTenant
STenant getTenant(long id) throws STenantNotFoundException
Get tenant by its id- Parameters:
id- tenant id- Returns:
- sTenant
- Throws:
STenantNotFoundException- occurs when the identifier does not refer to an existing sTenant- Since:
- 6.0
-
getDefaultTenant
STenant getDefaultTenant() throws STenantNotFoundException
Get default tenant- Returns:
- sTenant
- Throws:
STenantNotFoundException- occurs when the identifier does not refer to an existing sTenant- Since:
- 6.0
-
isDefaultTenantCreated
boolean isDefaultTenantCreated() throws SBonitaReadExceptionIs the default tenant already created?- Returns:
- true if the default tenant exists, false otherwise.
- Throws:
SBonitaReadException- when we cannot determine if default tenant is created- Since:
- 7.3
-
activateTenant
void activateTenant(long tenantId) throws STenantNotFoundException, STenantActivationExceptionSet status of the tenant into activated- Parameters:
tenantId-- Throws:
STenantNotFoundException- occurs when the identifier does not refer to an existing sTenantSTenantActivationException- occurs when an exception is thrown during activating sTenant- Since:
- 6.0
-
deactivateTenant
void deactivateTenant(long tenantId) throws STenantNotFoundException, STenantDeactivationExceptionSet status of the tenant into deactivated- Parameters:
tenantId-- Throws:
STenantNotFoundException- occurs when the identifier does not refer to an existing sTenantSTenantDeactivationException- occurs when an exception is thrown during deactivating sTenant- Since:
- 6.0
-
pauseTenant
void pauseTenant(long tenantId) throws STenantUpdateException, STenantNotFoundExceptionupdate status of tenant object to PAUSED- Parameters:
tenantId- the id of the tenant to update- Throws:
STenantUpdateExceptionSTenantNotFoundException
-
isPlatformCreated
boolean isPlatformCreated()
Return true if the platform is created, else return false.- Returns:
- true or false
- Since:
- 6.0
-
getSPlatformProperties
SPlatformProperties getSPlatformProperties()
Return the platform properties- Returns:
- The platform properties
- Since:
- 6.1
-
-