Class PlatformServiceImpl
- java.lang.Object
-
- org.bonitasoft.engine.platform.impl.PlatformServiceImpl
-
- All Implemented Interfaces:
PlatformService
public class PlatformServiceImpl extends java.lang.Object implements PlatformService
- Author:
- Charles Souillard, Celine Souchet
-
-
Constructor Summary
Constructors Constructor Description PlatformServiceImpl(PersistenceService platformPersistenceService, PlatformRetriever platformRetriever, Recorder recorder, CacheService cacheService, SPlatformProperties sPlatformProperties)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
PlatformServiceImpl
public PlatformServiceImpl(PersistenceService platformPersistenceService, PlatformRetriever platformRetriever, Recorder recorder, CacheService cacheService, SPlatformProperties sPlatformProperties)
-
-
Method Detail
-
getPlatform
public SPlatform getPlatform() throws SPlatformNotFoundException
Description copied from interface:PlatformServiceRetrieve the platform from the cache No need to be in a transaction- Specified by:
getPlatformin interfacePlatformService- Returns:
- sPlatform
- Throws:
SPlatformNotFoundException- occurs when the identifier does not refer to an existing sPlatform
-
getTenant
public STenant getTenant(long id) throws STenantNotFoundException
Description copied from interface:PlatformServiceGet tenant by its id- Specified by:
getTenantin interfacePlatformService- Parameters:
id- tenant id- Returns:
- sTenant
- Throws:
STenantNotFoundException- occurs when the identifier does not refer to an existing sTenant
-
isPlatformCreated
public boolean isPlatformCreated()
Description copied from interface:PlatformServiceReturn true if the platform is created, else return false.- Specified by:
isPlatformCreatedin interfacePlatformService- Returns:
- true or false
-
getDefaultTenant
public STenant getDefaultTenant() throws STenantNotFoundException
Description copied from interface:PlatformServiceGet default tenant- Specified by:
getDefaultTenantin interfacePlatformService- Returns:
- sTenant
- Throws:
STenantNotFoundException- occurs when the identifier does not refer to an existing sTenant
-
isDefaultTenantCreated
public boolean isDefaultTenantCreated() throws SBonitaReadExceptionDescription copied from interface:PlatformServiceIs the default tenant already created?- Specified by:
isDefaultTenantCreatedin interfacePlatformService- Returns:
- true if the default tenant exists, false otherwise.
- Throws:
SBonitaReadException- when we cannot determine if default tenant is created
-
updateTenant
public void updateTenant(STenant tenant, EntityUpdateDescriptor descriptor) throws STenantUpdateException
Description copied from interface:PlatformServiceUpdate a sTenant from given sTenant and new content.- Specified by:
updateTenantin interfacePlatformService- Parameters:
tenant- sTenantdescriptor- new content- Throws:
STenantUpdateException- occurs when an exception is thrown during sTenant update
-
activateTenant
public void activateTenant(long tenantId) throws STenantNotFoundException, STenantActivationExceptionDescription copied from interface:PlatformServiceSet status of the tenant into activated- Specified by:
activateTenantin interfacePlatformService- Throws:
STenantNotFoundException- occurs when the identifier does not refer to an existing sTenantSTenantActivationException- occurs when an exception is thrown during activating sTenant
-
deactivateTenant
public void deactivateTenant(long tenantId) throws STenantNotFoundException, STenantDeactivationExceptionDescription copied from interface:PlatformServiceSet status of the tenant into deactivated- Specified by:
deactivateTenantin interfacePlatformService- Throws:
STenantNotFoundException- occurs when the identifier does not refer to an existing sTenantSTenantDeactivationException- occurs when an exception is thrown during deactivating sTenant
-
pauseTenant
public void pauseTenant(long tenantId) throws STenantUpdateException, STenantNotFoundExceptionDescription copied from interface:PlatformServiceupdate status of tenant object to PAUSED- Specified by:
pauseTenantin interfacePlatformService- Parameters:
tenantId- the id of the tenant to update- Throws:
STenantUpdateExceptionSTenantNotFoundException
-
getSPlatformProperties
public SPlatformProperties getSPlatformProperties()
Description copied from interface:PlatformServiceReturn the platform properties- Specified by:
getSPlatformPropertiesin interfacePlatformService- Returns:
- The platform properties
-
-