Package org.bonitasoft.engine.resources
Class TenantResourcesServiceImpl
java.lang.Object
org.bonitasoft.engine.resources.TenantResourcesServiceImpl
- All Implemented Interfaces:
TenantResourcesService
- Author:
- Baptiste Mesta
-
Field Summary
Fields inherited from interface org.bonitasoft.engine.resources.TenantResourcesService
TENANT_RESOURCE -
Constructor Summary
ConstructorsConstructorDescriptionTenantResourcesServiceImpl(Recorder recorder, ReadPersistenceService persistenceService) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String name, TenantResourceType type, byte[] content, long userId) longcount(TenantResourceType type) longcount(TenantResourceType type, String name) get(TenantResourceType type, int from, int numberOfElements) get(TenantResourceType type, String name) getLight(TenantResourceType type, int from, int numberOfElements) Returns a single STenantResourceLight of the given type.voidremove(AbstractSTenantResource resource) voidremoveAll(TenantResourceType type)
-
Constructor Details
-
TenantResourcesServiceImpl
-
-
Method Details
-
add
public void add(String name, TenantResourceType type, byte[] content, long userId) throws SRecorderException - Specified by:
addin interfaceTenantResourcesService- Throws:
SRecorderException
-
removeAll
- Specified by:
removeAllin interfaceTenantResourcesService- Throws:
SBonitaReadExceptionSRecorderException
-
getLight
public List<STenantResourceLight> getLight(TenantResourceType type, int from, int numberOfElements) throws SBonitaReadException - Throws:
SBonitaReadException
-
get
public List<STenantResource> get(TenantResourceType type, int from, int numberOfElements) throws SBonitaReadException - Specified by:
getin interfaceTenantResourcesService- Throws:
SBonitaReadException
-
count
- Specified by:
countin interfaceTenantResourcesService- Throws:
SBonitaReadException
-
count
- Specified by:
countin interfaceTenantResourcesService- Throws:
SBonitaReadException
-
get
- Specified by:
getin interfaceTenantResourcesService- Throws:
SBonitaReadException
-
getSingleLightResource
public STenantResourceLight getSingleLightResource(TenantResourceType type) throws SBonitaReadException Description copied from interface:TenantResourcesServiceReturns a single STenantResourceLight of the given type. This is the responsibility of the caller to only call this method when he / she is sure that there are not more than one result of the query. If the result is non unique, a SBonitaReadException is thrown.- Specified by:
getSingleLightResourcein interfaceTenantResourcesService- Parameters:
type- the type of the resource to filter- Returns:
- the found resource if unique, null if none found
- Throws:
SBonitaReadException- if non unique result, or other Hibernate exception is issued
-
remove
- Specified by:
removein interfaceTenantResourcesService- Throws:
SRecorderException
-