Class PlatformServiceImpl
java.lang.Object
org.bonitasoft.engine.platform.impl.PlatformServiceImpl
- All Implemented Interfaces:
PlatformService
- Author:
- Charles Souillard, Celine Souchet
-
Field Summary
Fields inherited from interface org.bonitasoft.engine.platform.PlatformService
PLATFORM -
Constructor Summary
ConstructorsConstructorDescriptionPlatformServiceImpl(PersistenceService platformPersistenceService, PlatformRetriever platformRetriever, Recorder recorder, SPlatformProperties sPlatformProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateTenant(long tenantId) Set status of the tenant into activatedvoiddeactivateTenant(long tenantId) Set status of the tenant into deactivatedGet default tenantlongGet the default tenant id !! Internal use only !! Tenant notion should be removed soon.Retrieve the platform from the cache No need to be in a transactionReturn the platform propertiesgetTenant(long id) Deprecated.booleanReturn 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.
-
Constructor Details
-
PlatformServiceImpl
public PlatformServiceImpl(PersistenceService platformPersistenceService, PlatformRetriever platformRetriever, Recorder recorder, SPlatformProperties sPlatformProperties)
-
-
Method Details
-
getPlatform
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
Deprecated.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
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
-
getDefaultTenantId
Description copied from interface:PlatformServiceGet the default tenant id !! Internal use only !! Tenant notion should be removed soon.- Specified by:
getDefaultTenantIdin interfacePlatformService- Returns:
- the default tenant id
- Throws:
STenantNotFoundException- if cannot retrieve tenant from database
-
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, STenantActivationException Description 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, STenantDeactivationException Description 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
Description 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
Description copied from interface:PlatformServiceReturn the platform properties- Specified by:
getSPlatformPropertiesin interfacePlatformService- Returns:
- The platform properties
-
updatePlatform
- Specified by:
updatePlatformin interfacePlatformService- Throws:
SPlatformUpdateException
-