Package org.bonitasoft.engine.platform
Interface PlatformService
-
- All Known Implementing Classes:
PlatformServiceImpl
public interface PlatformService- Author:
- Charles Souillard, Matthieu Chaffotte, Celine Souchet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated 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 tenantlonggetDefaultTenantId()Get the default tenant id !! Internal use only !! Tenant notion should be removed soon.SPlatformgetPlatform()Retrieve the platform from the cache No need to be in a transactionSPlatformPropertiesgetSPlatformProperties()Return the platform propertiesSTenantgetTenant(long id)Deprecated.There is only one tenant.booleanisPlatformCreated()Return true if the platform is created, else return false.voidpauseTenant(long tenantId)update status of tenant object to PAUSEDvoidupdatePlatform(EntityUpdateDescriptor descriptor)voidupdateTenant(STenant tenant, EntityUpdateDescriptor descriptor)Update a sTenant from given sTenant and new content.
-
-
-
Field Detail
-
PLATFORM
static final java.lang.String PLATFORM
- See Also:
- Constant Field Values
-
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
@Deprecated STenant getTenant(long id) throws STenantNotFoundException
Deprecated.There is only one tenant. UsegetDefaultTenant()instead.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
-
getDefaultTenantId
long getDefaultTenantId() throws STenantNotFoundExceptionGet the default tenant id !! Internal use only !! Tenant notion should be removed soon.- Returns:
- the default tenant id
- Throws:
STenantNotFoundException- if cannot retrieve tenant from database
-
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
-
updatePlatform
void updatePlatform(EntityUpdateDescriptor descriptor) throws SPlatformUpdateException
- Throws:
SPlatformUpdateException
-
-