Package org.bonitasoft.engine.resources
Interface TenantResourcesService
- All Known Implementing Classes:
TenantResourcesServiceImpl
public interface TenantResourcesService
- Author:
- Baptiste Mesta
-
Field Summary
Fields -
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) Returns a single STenantResourceLight of the given type.voidremove(AbstractSTenantResource resource) voidremoveAll(TenantResourceType external)
-
Field Details
-
TENANT_RESOURCE
- See Also:
-
-
Method Details
-
add
void add(String name, TenantResourceType type, byte[] content, long userId) throws SRecorderException - Throws:
SRecorderException
-
removeAll
-
get
List<STenantResource> get(TenantResourceType type, int from, int numberOfElements) throws SBonitaReadException - Throws:
SBonitaReadException
-
count
- Throws:
SBonitaReadException
-
count
- Throws:
SBonitaReadException
-
get
- Throws:
SBonitaReadException
-
getSingleLightResource
Returns 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.- 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
- Throws:
SRecorderException
-